-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyOpenCl #367
Comments
Thanks for the request. PyOpenCL isn't currently a priority, but if anyone else wants it too, please click the thumbs up button above, and subscribe to this issue for updates. As for NumPy, I'm not sure why you're trying to install version 1.19.1, as the current version of PyOpenCL has no version number requirement. Chaquopy currently provides NumPy version 1.17.4: if you need a newer version than that, please explain why. |
If I understand, PyOpenCl not available now? I want NumPy because in error, version of NumPy was 1.19.1. But, if PyOpenCl does not work, Numpy 1.17.4 is ok. Thanks for answer. |
Unfortunately not. |
I would love to have this. I am currently using compute shaders on Android, but PyOpenCL would be an amazing option to have. How difficult is it to get this to work? Is it something I could work on myself? |
It might be tricky because OpenCL isn't one of the standard Android libraries. But TensorFlow recently announced that they were using it anyway by "check[ing] the availability of OpenCL at runtime". Since recent versions of Android don't allow apps to access non-standard system libraries, I'm not sure how they've done this. The post says that "major Android vendors include OpenCL as part of their system library", so maybe that means it's built into libc or one of the other standard libraries. If you'd like to try building PyOpenCL yourself, then you can license our package build tool, which was used to build everything in our native package repository. For more details, see #175 (comment). We would provide support for any general Android build issues, but we have no expertise in OpenCL specifically. |
I was able to load the OpenCL library in Chaquopy using ctypes, initial attempts crashed but I may have been initializing the library incorrectly. It did load libOpenCL.so though and attempt to access the gpu, i could see it loaded mali drivers in logcat. Currently OpenGL Compute shaders are working well for me, but if I find myself really badly needing a feature of OpenCL that OpenGL lacks then I will definitely take up that offer. That or any other native packages I come across. |
Interesting, thanks. How exactly did you load it: was it as simple as |
On my Huawei P30 Pro yes it was as simple as that. Hopefully Tensorflow and/or Pytorch get better OpenCL support. So far the tensorflow-gpu package did not seem to actually use the GPU in Chaquopy when I tried it. Is your tensorflow-gpu package built from this? The SYSCL port of Tensorflow: https://github.com/codeplaysoftware/tensorflow If not, I would definitely be interested in that. Having a true GPU accelerated full Tensorflow, not the standard Android/Java tflite would be very interesting. |
That's correct: since TensorFlow 2.0, the As well as OpenCL, the Java TensorFlow Lite library also supports acceleration on Android via OpenGL and NNAPI, but none of these are supported by its Python API yet. Hopefully this will improve in the future, as there also have been some requests for OpenGL acceleration on the Raspberry Pi.
No, we have our own patches against the main TensorFlow repository. |
Hi, I try to install PyOpenCl in Andriod Studio, but I have this error.
File "C:\Users\sdjordje\AppData\Local\Temp\easy_install-pu9wdfp0\numpy-1.19.1\tools\cythonize.py", line 59, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'.
Install cython and try to install numpy-1.19.1, but same problem. Can you help me?
The text was updated successfully, but these errors were encountered: