Hi Andreas,

> Le 3 févr. 2018 à 00:11, Andreas Kloeckner <li...@informa.tiker.net> a écrit :
> In your case, I would attribute the issue mainly to the fact that you
> have an ICD loader (libOpenCL.so) that does not match the installed
> headers. If you ended up installing 'nvidia-libopencl1', that's what you
> get. Realistically, 'nvidia-libopencl1' should depend on the correct
> version of the CL headers (1.2 only) because otherwise those declare
> symbols that don't exist--and PyOpenCL has no easy way of finding out.
> 
> Fortunately, a 'proper' fix is easy--in particular one that does not
> require unnecessarily clamping down PyOpenCL's feature support. Simply
> uninstall nvidia-libopencl1 and replace it with
> 'ocl-icd-opencl-dev'. This exports the CL2 symbols, and PyOpenCL's
> compilation will succeed. (independently of whether CL2 devices--or
> really *any* devices are available)
> 
> If you're in a blaming mood, another party that deserves some blame is
> perhaps Nvidia, for shipping an ICD loader that is artificially limited
> to OpenCL 1.2. I have a sneaking suspicion that this is deliberate on
> their part, so as to backstab the OpenCL developer experience through
> a thousand paper cuts. (Note that this is entirely different from
> supporting CL 2 on their devices, which requires much more engineering
> resources that simply updating the version of the Khronos ICD loader [1]
> that they ship.)


        Thanks for the detailed answer, indeed the correction in this case will
be to fix the debian dependencies. I’ve tried installing ocl-icd-opencl-dev,
which does work but still declares a conflict - not sure if that could lead to 
update issues later. Sticking to the opencl-headers 1.2 may be safest.

        I’ve filed a Debian bug against nvidia-opencl-dev:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889287 
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889287>
we’ll see if this can be  corrected even if it’s just a backports issue.. 
There’s
a bit of history here, I just saw old bug #755513 seems to be related. 
There are probably bigger issues with nvidia packages though, like
getting the cuda 9 to install (with the gcc/clang mess of cuda 8..)
        
        And yes the policy of nvidia not to support better OpenCL 2 is becoming
annoying… Recently I also saw one case where the OpenCL version of a code
would run much slower for a card hooked up to a screen, whereas basically
the same code in cuda  with the same card (easy thanks to pycuda & pyopencl) 
would run at full speed. Small annoyances...

        Thanks,
                Vincent
— 
Vincent Favre-Nicolin

Co-editor, J. Synchrotron Radiation  http://journals.iucr.org/s/ 
<http://journals.iucr.org/s/>

Director, HERCULES school   http://hercules-school.eu 
<http://hercules-school.eu/>

ESRF-The European Synchrotron    http://www.esrf.eu <http://www.esrf.eu/>
71, Avenue des Martyrs
Grenoble, France

X-Ray NanoProbe (XNP) group
Tel: +33 4 76 88 28 11

On leave from Univ. Grenoble Alpes

_______________________________________________
PyOpenCL mailing list
PyOpenCL@tiker.net
https://lists.tiker.net/listinfo/pyopencl

Reply via email to