Metadata-Version: 2.4
Name: qpel
Version: 0.7.0
Summary: A portable kernel language and translator between CUDA and Apple Metal
Author: Alex Shatalov
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/shatalov-alex/qpel
Project-URL: Source, https://github.com/shatalov-alex/qpel
Project-URL: Issues, https://github.com/shatalov-alex/qpel/issues
Project-URL: Changelog, https://github.com/shatalov-alex/qpel/blob/main/CHANGELOG.md
Keywords: cuda,metal,gpu,kernels,compiler,translation,apple-silicon,triton,cub
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Compilers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
License-File: TRADEMARKS.md
Provides-Extra: mps
Requires-Dist: torch>=2.6; extra == "mps"
Requires-Dist: numpy>=2.0; extra == "mps"
Provides-Extra: verify
Requires-Dist: numpy>=2.0; extra == "verify"
Dynamic: license-file

<p align="center"><img src="https://raw.githubusercontent.com/shatalov-alex/qpel/main/assets/qpel-icon-512.png" width="128" alt="qpel"></p>

# qpel

qpel is a small portable kernel language between CUDA and Apple Metal: CUDA or Metal
kernels import to qpel, and qpel builds both CUDA and Metal again, with documented numerics.

```sh
pip install qpel                 # the compiler: standard library only
pip install "qpel[mps]"          # PyTorch and NumPy, to run the generated Metal hosts on Apple GPUs
qpel build program.qpel --out build/
qpel translate kernels.cu --out translated/      # needs clang on the PATH
qpel torch-op translated/ --launches extension_api.cu
pip install "qpel[verify]"       # NumPy, for checking ports
qpel verify original.cu port.metal               # a port against its original, on the same cases
qpel mcp                                         # verify and translate as MCP tools for AI agents
```

Importing CUDA needs clang (Xcode's or LLVM's); importing Metal needs Xcode's Metal toolchain.
Source, documentation and changelog: https://github.com/shatalov-alex/qpel.
This is a development release. The name qpel is a trademark (TRADEMARKS.md); the code is
Apache-2.0.
