cancel
Showing results for 
Search instead for 
Did you mean: 

Request for supporting dynamic loading OpenCL

 

I am developing a native app that utilizes OpenCL, Vulkan, and OpenXR, but I’ve encountered a significant roadblock: `libOpenCL.so` cannot be dynamically loaded with dlopen because it is not included in `/etc/public.libraries.txt`.

While it’s technically possible to extract the library using `adb pull /vendor/lib/libOpenCL.so` and bundle it within the APK, this is not a scalable solution for supporting a diverse range of devices, even within the Meta ecosystem. I understand this limitation may be due to security considerations, but it’s worth noting that `libvulkan.so` is already accessible. Restricting developers to Vulkan forces additional effort to convert OpenCL kernels into SPIR-V, which seems unnecessary, IMHO.

Providing support for `libOpenCL.so` would significantly enhance compatibility and streamline development. This is especially important given that many deep learning frameworks rely on dynamic loading of the OpenCL library through stub code.

2 REPLIES 2

Dens1ty
Protege

The lib was available before v71 update.

I suggest to follow this thread as well:
https://communityforums.atmeta.com/t5/Mobile-Development/OpenCL-broken-after-v71-update/m-p/1263245

wealth.468739
Honored Guest

Allowing libOpenCL.so access via dlopen would simplify development and boost compatibility. Relying only on Vulkan adds avoidable complexity.  https://wealthdt5apk.com/