1019 B
1019 B
Using OpenCL from Python
The examples in this directory illustrate how to use OpenCL from Python using PyOpenCL.
If you would like to try them out on your own computer (Linux/mac/Windows are all supported), follow the installation instructions and then simply run the example file:
python3 example-file.py
There is no build process and no need to compile anything.
Examples
demo.pydemonstrates memory allocation and running kernels.demo-array.pydemonstrates memory allocation and running kernels, but using the minimal array package that comes with PyOpenCL.dump-properties.pydemonstrates access to properties with a sort-of reimplementation of theclinfoutility.transpose.pydemonstrates a matrix transposition kernel.
You can find many more examples in PyOpenCL's Github repository.