PyOpenCL lets you access the OpenCL parallel computation API from Python. Here's what sets PyOpenCL apart:
- Object cleanup tied to lifetime of objects. This idiom, often called RAII in C++, makes it much easier to write correct, leak- and crash-free code.
- Completeness. PyOpenCL puts the full power of OpenCL’s API at your disposal, if you wish.
- Convenience. While PyOpenCL's primary focus is to make all of OpenCL accessible, it tries hard to make your life less complicated as it does so--without taking any shortcuts.
- Automatic Error Checking. All OpenCL errors are automatically translated into Python exceptions.
- Speed. PyOpenCL’s base layer is written in C++, so all the niceties above are virtually free.
- Helpful, complete documentation and a wiki.
- Liberal licensing (MIT).
Documentation
See the PyOpenCL Documentation.
Support
Having trouble with PyOpenCL?
First, you may want to check the PyOpenCL Wiki.
If that doesn't help, maybe the nice people on the PyOpenCL mailing list can.
Download
Download PyOpenCL here.
Or get it directly from my source code repository by typing
git clone --recursive http://git.tiker.net/trees/pyopencl.git
You may also browse the source.
Prerequisites: All you need is an OpenCL implementation. And Python obviously.
Hi Andreas,
Sorry for making troubles, but spent a few days but can't build PyOpenCL against MacOS X 10.6. I went through procedures described in Wiki, but I've got the output:
It seems to me that it wants to build it against MacOSX10.5 and link with BOOST Libraries built on MacOSX10.6. Any comment is appreciated.
Thank you, Alex shurik.kuzmin@gmail.com
I was going to recommend that you ask on the mailing list for a solution, but it appears you've already done so. :)
Andreas
Very nice. Works great. Thanks!
PS! The OpenCL link has got a typo (http://khronos.org/openl should be http://khronos.org/opencl)
Fixed, thanks!
Andreas
Hello,
I've installed PyOpenCL on Mac OS X 10.6, after a little bit of tweaking, but now when I try to run the example I get this error:
Traceback (most recent call last): File "demo.py", line 1, in
import pyopencl as cl
File "/Library/Python/2.6/site-packages/pyopencl-0.90-py2.6-macosx-10.6-i386.egg/pyopencl/init.py", line 5, in
import pyopencl._cl as _cl
ImportError: dlopen(/Library/Python/2.6/site-packages/pyopencl-0.90-py2.6-macosx-10.6-i386.egg/pyopencl/_cl.so, 2): Symbol not found: _clUnloadCompiler
Referenced from: /Library/Python/2.6/site-packages/pyopencl-0.90-py2.6-macosx-10.6-i386.egg/pyopencl/_cl.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/pyopencl-0.90-py2.6-macosx-10.6-i386.egg/pyopencl/_cl.so
I'm out of ideas, if you could give me a hand I would be very glad, my email is royger at gmail dot com
This comment received a reply on the mailing list. -Andreas