-----BEGIN PGP SIGNED MESSAGE-----
On 15/10/13 02:51, Andreas Kloeckner wrote:
Antoine Martin <antoine(a)nagafix.co.uk> writes:
>> What OpenCL implementation are you using (sounds like Nvidia...)? Can
>> you try another (say AMD CPU)?
> The OpenCL implementation does not matter, the TLS problem is constant.
> Did you somehow manage to run the example I posted without hitting the
> TLS error?
> To double check I have just tested again with all of these:
>  <pyopencl.Platform 'FreeOCL' at 0x7f73d72f88c8>
>  <pyopencl.Platform 'Portable Computing Language' at
>  <pyopencl.Platform 'AMD Accelerated Parallel Processing' at
>  <pyopencl.Platform 'Intel(R) OpenCL' at 0x1923910>
> And the AMD one was even tested with both GPU and CPU backends.
> I also remember testing the Nvidia implementation with the same results,
> and on an Intel CPU too (above is AMD).
I can't reproduce this. Which ICD loader (libOpenCL.so) are you using?
tried both ocd-icl and AMD's icl.
But this got me thinking (and I would have mentioned it sooner had I not
forgotten about it):
I had built PyOpenCL against the OpenCL 1.1 headers to get it to work
with the Nvidia icd.
Rebuilding PyOpenCL against the 1.2 headers fixed the problem.
I'll be doing some more Nvidia testing soon, so I will be forced to
revisit this problem (and probably ask again..).
Hopefully I misunderstood something or built it wrong somehow. Perhaps a
mismatch between the 1.1 headers and the ICD loader?
In the meantime, here are some notes below that I've made as I installed
PyOpenCL on various distro configurations for testing - others may find
this useful. These notes are more distro specific than the ones from the
Covering other distros, and trying to use distro provided packages
(and I have verified that the gtk import works fine on all of them)
* Debian sid:
Either use the ocl-icd:
apt-get install ocl-icd-libopencl1
Or use AMD's ("non-free"):
apt-get install amd-opencl-icd
Then we can use AMD's ("non-free") opencl lib:
apt-get install amd-libopencl1
And use the packaged version of PyOpenCL:
apt-get install python-pyopencl python-pkg-resources
Note: python-pkg-resources is required to resolve paths at runtime.
To make it easy to verify that everything is setup correctly we can also
apt-get install amd-clinfo
AMD, pocl and freeocl are all easy to install, Intel SDK not so much
* Debian Wheezy:
just like sid, except you have to choose between amd-opencl-icd and ocl-icd.
(and pocl is harder to build because of llvm version requirements)
* Fedora 19:
yum install ocl-icd opencl-filesystem python-opencl
Fedora has pocl in the repos so we can use that for testing:
yum install pocl
But there are no PyOpenCL packages because of this blocker bug:
So we have to build it from source:
yum install opencl-headers opencl-utils-devel python-devel boost-python
Ugly workaround for library name (--cl-libname does not help us here):
ln -sf /usr/lib64/libOpenCL.so.1 /usr/lib64/libOpenCL.so
or on x86:
ln -sf /usr/lib/libOpenCL.so.1 /usr/lib/libOpenCL.so
make && make install
AMD, Intel, pocl and freeocl are all fairly easy to build or install.
* CentOS 6.x:
Install the AMD SDK via the script provided.
Install the build tools and libraries:
yum install gcc-c++ boost-python-devel
#swap x86_64 for x86 on 32-bit:
make && make install
All except pocl are easy enough to install.
* Ubuntu 13.04:
apt-get install python-pyopencl
Note: if you want to build from source on 13.04, you should use
"libboost-all-dev" instead of what is shown here:
Install the AMD SDK
pocl built OK, FreeOCL had some weird build problems (atomic ops?), and
the Intel SDK is still problematic (RPM as above).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----