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()
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.