Skip to main content

Python interface for generating and executing OpenCL kernels

Project description

OpenCL Interface

OpenCL Interface: run custom OpenCL (and CUDA) kernels and neural networks converted from ONNX format.

Features

  • 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)

Install

From Pypi:

pip install opencl-interface

From 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

Quick start

You can try looking at the file example.py.

Contributing

Contributions are welcome via Pull Requests or in form of Issues.

License

This project is licensed under MIT License.

Citation

Please cite this project using CITATION.cff.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opencl_interface-1.0.1.tar.gz (99.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opencl_interface-1.0.1-py3-none-any.whl (115.3 kB view details)

Uploaded Python 3

File details

Details for the file opencl_interface-1.0.1.tar.gz.

File metadata

  • Download URL: opencl_interface-1.0.1.tar.gz
  • Upload date:
  • Size: 99.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for opencl_interface-1.0.1.tar.gz
Algorithm Hash digest
SHA256 933372135ef823409f9619777d9e82bf70e5e730b6771d2f5e2d5125cdfd0a84
MD5 6ad451ad0961e99b7e3e0616b22c6386
BLAKE2b-256 9d504aacbd3942e44574b589b033275742a178694e8c182e1435fe50968edb4b

See more details on using hashes here.

File details

Details for the file opencl_interface-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opencl_interface-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d257013949e8b17f15193b9e579a1efa6c1846b1d9f05a5ca4895cdaab4f3a7
MD5 ce6f09c4cd7946f672a8de27ce075ccf
BLAKE2b-256 3ec312ac95e97f3f378a804271e322f6174de5f9726a9bf075f5e7923b9b0e39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page