OpenCL Interface: run custom OpenCL (and CUDA) kernels and neural networks converted from ONNX format.
- Platform-agnostic OpenCL compilation with PyOpenCL
- Supported numerical formats: single, double, quantized fixed-precision, posit
- [Beta] ONNX model conversion using onnx2ocl module
- [Beta] Seamless CUDA compilation with nvcc with respect to OpenCL-written kernel (i.e., no modification of original OpenCL code)
From Pypi:
pip install opencl-interfaceFrom Github:
git clone git@github.com:giabattag/opencl-interface.git
cd opencl-interface
pip install -e .Requirements:
- python >= 3.8
- numpy
- onnx
- onnxsim
- [Optional] pyopencl
- [Optional] pycuda
You can try looking at the file example.py.
Contributions are welcome via Pull Requests or in form of Issues.
This project is licensed under MIT License.
Please cite this project using CITATION.cff.