How to enable OpenCL on Nexus 5
source link: https://maxlv.net/how-to-enable-opencl-on-nexus-5/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to enable OpenCL on Nexus 5
Google added OpenCL drivers in Android 4.2, but then removed them from Android 4.3. As a result, with Android 4.4 we're unable to run OpenCL applications on Nexus 5, even if the GPU (Qualcomm's Adreno 330) supports OpenCL 1.2.
However, Qualcomm still leaves a backdoor to enable OpenCL in their latest Android driver (shipped with Kitkat KOT49H), which is located at /system/vendor/lib/libllvm-a3xx.so
as an user-mode driver. It means we can still enable OpenCL functions by installing the missing libraries back to the device.
Here is the steps (ROOT only):
$ adb push jellybean/system/lib /sdcard/
$ adb shell
$ su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/libOpenCL.so /system/lib/
# cp /sdcard/libllvm-a3xx.so /system/lib/
# chmod 644 /system/lib/libOpenCL.so
# chmod 644 /system/lib/libllvm-a3xx.so
Share this post
Author
Max Lv
A programmer focusing on High-performance Computing.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK