-
Notifications
You must be signed in to change notification settings - Fork 241
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 does not respect OCL_ICD_FILENAMES #797
Comments
Apparently this is because of the ICD loader pyopencl uses. Khronos own ICD loader supports environment variables but ocl-icd does not: https://github.com/KhronosGroup/OpenCL-ICD-Loader Looking at repo activity it seems ocl-icd doesn't get many updates. |
I'm confused here.
If you need a Linux/Mac wheel with Khronos, I'm happy to consider PRs that either replace ocl-icd or offer Khronos as an alternative. |
Ah, ok. I think I understand what is going on. The pip package puts a libOpenCL.so file in a ".libs" directory which shadows the system-installed libOpenCL.so. This libOpenCL.so comes from ocl-icd and not from Khronos official ICD loader. Shadowing system libraries is always dubious. Honestly, on Linux not including any ICD loader would be better since the user likely already has one installed. And if they don't it's just one "apt-get install ocl-icd" away. If not that then swapping ocl-icd with Kronos' ICD loader would be good. It appears to be more feature-complete and better maintained. |
MWE:
So pyopencl does not find platforms whose shared objects are found in the
OCL_ICD_FILENAMES
environment variable. I'm not sure why sinceget_platforms
simply wrapsclGetPlatformIDs
, doesn't it?The text was updated successfully, but these errors were encountered: