Skip to content

emprice/pocky

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pocky: A Python bridge to OpenCL

build-docs action License: MIT CodeFactor grade GitHub repo stars

Example usage

import pocky

# Display all OpenCL platforms and devices available
for plat in pocky.list_all_platforms():
    print(plat)
    print(pocky.list_all_devices(plat))
    print()

# Create a context for the default platform
ctx = pocky.Context.default()

Installing

The easiest way to install is using pip directly:

pip install git+https://github.com/emprice/pocky.git@main

To build from source, you can follow this pattern:

git clone https://github.com/emprice/pocky
cd pocky
python -m build .
pip install --force-reinstall --ignore-installed dist/pocky-1.0-cp311-cp311-linux_x86_64.whl

You may need to change the path to the wheel depending on your OS, architecture, and Python version.