[Cython] OpenCL support
sturla at molden.no
Tue Feb 7 14:52:05 CET 2012
On 05.02.2012 23:39, Dimitri Tcaciuc wrote:
> 3. Does it make sense to make OpenCL more explicit?
No, it takes the usefuness of OpenCL away, which is that kernels are
text strings and compiled at run-time.
> Heuristics and
> automatic switching between, say, CPU and GPU is great for eg. Sage
> users, but maybe not so much if you know exactly what you're doing
> with your machine resources. E.g just having a library with thin
> cython-adapted wrappers would be awesome. I imagine this can be
> augmented by arrays having a knowledge of device-side/client-side
> (which would go towards addressing the issue 1. above)
Just use PyOpenCL and manipulate kernels as text. Python is excellent
for that - Cython is not needed. If you think using Cython instead of
Python (PyOpenCL and NumPy) will be important, you don't have a CPU
bound problem that warrants the use of OpenCL.
More information about the cython-devel