inducer / pyopencl

OpenCL integration for Python, plus shiny features
http://mathema.tician.de/software/pyopencl
Other
1.06k stars 241 forks source link

ocl-icd installed via conda replaces previous loader used by pip-installed PyOpenCL #399

Closed zachjweiner closed 3 years ago

zachjweiner commented 3 years ago

Installing PyOpenCL via pip first links to the libOpenCL.so.1 already present on my system (installed with CUDA, in my case). After a conda install ocl-icd, ldd instead says PyOpenCL's shared library points to the libOpenCL.so.1 installed by ocl-icd. This results in, e.g., system icd files no longer appearing as available platforms.

I'm not sure whether this is expected (or whether mixing pip-installed PyOpenCL with conda-installed loaders is ill-advised). If so, it might be useful to note in the installation docs (happy to contribute).

(FWIW, I discovered this by accident - for reasons I cannot determine as I can no longer reproduce, ocl-icd-system was leading to segfaults at get_platforms(), and in testing I explored installing PyOpenCL with pip rather than conda.)

inducer commented 3 years ago

I'm not sure whether this is expected (or whether mixing pip-installed PyOpenCL with conda-installed loaders is ill-advised).

I wouldn't expect this to work.

If so, it might be useful to note in the installation docs (happy to contribute).

Agree. I'd be happy to look at a doc PR.