Skip to content

Small Python wrapper for OpenCL based on ctypes

License

Notifications You must be signed in to change notification settings

bjourne/myopencl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyOpenCL

MyOpenCL is a small Python wrapper for OpenCL based on ctypes. I wrote MyOpenCL primarily because I wanted a very minimal, low-level wrapper, but also because I wanted to verify whether ctypes is good enough for "real" wrappers. I think it is. There is not a lot of documentation other than the test suites.

If you want a fully-featured binding use PyOpenCL instead.

Installation

git clone https://github.com/bjourne/myopencl
cd myopencl
pip install -U . --break-system-packages

It installes mcl-tool to be used for diagnostics:

$ mcl-tool list-platforms
...
$ mcl-tool build-kernel kernel/path.cl

Unit tests

$ PYTHONPATH=. pytest -vs tests

Future work

  • There are some tricky attributes cl.get_info currently doesn't handle.

About

Small Python wrapper for OpenCL based on ctypes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published