Do you wish that there were simple wrappers for GPU libraries in Python? Like not pyopencl, pycuda, and (HIP library someday?) here, but just raw access to the APIs?
That's what gpuctypes does! While high level libraries have their place, the world needs more low level libraries. Like gpuctypes. Welcome home.
pip install gpuctypes
import gpuctypes.hip as hip
import gpuctypes.cuda as cuda
import gpuctypes.opencl as opencl
gpuctypes uses ctypeslib to autogenerate Python files from the headers of the respective libraries.
git clone https://github.com/tinygrad/gpuctypes.git
cd gpuctypes
pip install -e .
- ROCm 6.0.0
- CUDA 11.5
- OpenCL (whatever is in Ubuntu 22.04)