Closed lsnnt closed 2 months ago
OpenCL already supported by Termux.
But why i get this type of error and if i can fix it
clgetPlatformIDs(0): Unknown code -1001
Could not open any device clGetPlatformIDs(0):
Unknown code -1001
Available OpenCL platforms:
same type of error in ubuntu (when occured in google colab) i currently don't have gpu can be fixed by this
Install clinfo
and run
LD_LIBRARY_PATH=/vendor/lib64 clinfo
For 32bit devices you'll need
LD_LIBRARY_PATH=/vendor/lib clinfo
There should be long output with contents similar to:
If you have errors at this step, you are out of luck and can't use OpenCL.
If clinfo
confirmed that OpenCL is usable, then you can try running your program:
LD_LIBRARY_PATH=/vendor/lib64 /path/to/binary
Replace /path/to/binary
with proper path to your executable file.
Thank you it worked
Feature description
Many mobile have their gpu for video decoding, for playing games etc. I want to integrate the gpu in termux so that i can perform some gpu based programming such as geting a custom public key using https://github.com/10gic/vanitygen-plusplus faster as compared to its cpu version
Additional information
i know most mobile manufactures include the libOpenCL.so file in
/vendor/lib/libOpenCL.so
or under/vendor/lib64/libOpenCL.so
for more detailed knowledge see this stackoverflow not related to android but may help