computeml
Python API for ComputeML: ML inference and training on any GPU through Vulkan compute shaders. The wheel ships the compiled library, so you only need NumPy and a Vulkan driver.
Install
pip install computeml
uv add computeml
Requirements:
- Linux x86_64 (glibc 2.27 or newer).
- A Vulkan driver: NVIDIA, AMD, or Intel GPU drivers include one. With no GPU, Mesa lavapipe
(
apt install mesa-vulkan-drivers) runs on the CPU.
Usage
import computeml as cml
import numpy as np
ctx = cml.Context() # or Context(backend="vulkan")
print(ctx.backend) # "Vulkan"
a = ctx.from_numpy(np.random.rand(512, 512).astype(np.float32))
b = ctx.from_numpy(np.random.rand(512, 512).astype(np.float32))
c = cml.ops.matmul(a, b) # recorded on GPU
print(c.numpy()) # flush + download
# Quantized weights
w_q8 = b.quantize(cml.Dtype.Q8_0)
c2 = cml.ops.matmul(a, w_q8) # dequantizes in-register on GPU
Ops are recorded into a command buffer and submitted on ctx.flush().
Tensor.numpy() flushes implicitly. Available ops: element-wise math,
matmul (fp32/fp16/Q8/Q4), softmax, layernorm/rmsnorm, fused linear+activation,
flash attention (multi-head, causal), RoPE, embeddings, reductions, see
computeml/ops.py.
Models
from computeml.models import BertEncoder
enc = BertEncoder(ctx, "models/bert-tiny") # weights from scripts/export_bert_tiny.py
hidden = enc.forward([101, 7592, 2088, 102]) # (seq, hidden) np.ndarray
Build from source
Set $COMPUTEML_LIB to use your own libcomputeml.so. To build it and run the tests from a
checkout of the repo:
cmake -B build -S . && cmake --build build --target computeml_shared
cd python && uv run --with pytest python -m pytest -q
Metadata
Release files for computeml 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| computeml-0.1.1-py3-none-manylinux_2_27_x86_64.whl | Python 3 | none | Linux glibc 2.27+ x86-64 | Details |
Release files / computeml-0.1.1-py3-none-manylinux_2_27_x86_64.whl
| Download URL | computeml-0.1.1-py3-none-manylinux_2_27_x86_64.whl |
|---|---|
| Size | 331.4 kB |
| Tags | Linux glibc 2.27+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
eb7f8f55030894eeff19f742eeba6f60b2d78217453cbeac04eeb90f16f8f0d7
|
|
BLAKE2b-256 checksum How to use checksums |
c32aefd2130306cf0986aca30581a52f5687855fb7d2055106542c5f10631708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for computeml 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.