[Pkg-opencl-devel] pocl ITP, and opencl-icd selection
Rebecca N. Palmer
r.palmer at bham.ac.uk
Fri Feb 21 00:24:57 UTC 2014
> the pkg-opencl-devel
> list. Are you subscribed?
Not yet, but I probably should be.
> Beignet should show a platform, but no devices, in the same way it
> should show two devices if there are two compatible cards.
The 0.2-2 in Ubuntu shows a platform, then exits when asked for the list
of devices; I haven't yet tested the 0.3-1 in sid.
> It is up to the application to select which devices to use. I'm not
> sure the ICD loader should present a "default", and the OpenCL API
> does not really suggest that the first platform is in any way meant to
> be used that way.
pyopencl's create_some_context() does appear to default to the first
platform, which on my system prefers pocl to the ~10x faster nvidia.
Given the above, defaulting to installing all the ICDs would not be a
good idea, at least for the time being.
palmer at lap14:~$ python
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyopencl
>>> pyopencl.get_platforms()
[<pyopencl.Platform 'Experiment Intel Gen OCL Driver' at
0x7f83adaf1280>, <pyopencl.Platform 'Portable Computing Language' at
0x7f83a9c704a0>, <pyopencl.Platform 'NVIDIA CUDA' at 0x106c110>]
>>> pyopencl.get_platforms()[1].get_devices()
[<pyopencl.Device 'pthread-Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz' on
'Portable Computing Language' at 0x1035190>]
>>> ctx=pyopencl.create_some_context(interactive=True)
Choose platform:
[0] <pyopencl.Platform 'Experiment Intel Gen OCL Driver' at 0x7f83adaf1280>
[1] <pyopencl.Platform 'Portable Computing Language' at 0x7f83a9c704a0>
[2] <pyopencl.Platform 'NVIDIA CUDA' at 0x106c110>
Choice [0]:2
Set the environment variable PYOPENCL_CTX='2' to avoid being asked again.
>>> pyopencl.get_platforms()[0].get_devices()
X server found. dri2 connection failed!
Trying to open directly...Device open failed
palmer at lap14:~$
[gdb says this is an exit code 0377 not a crash; the messages match
beignet's src/intel/intel_driver.c lines 200-220]
More information about the Pkg-opencl-devel
mailing list