gpuemu logo gpuemu

Get started

gpuemu ships as a Rust daemon + CLI and a Python client. The validation step runs without a GPU.

1. Install

# Rust daemon + CLI

cargo install gpuemu

# Python client (PyTorch / JAX / TensorFlow)

pip install gpuemu[torch]

2. Validate a kernel

from gpuemu import Client

client = Client()

# Fuzz with op-schema-aware inputs against the fp64 oracle.
results = client.fuzz_op_client_side(
    "flash_attention",
    run_op=lambda i: my_flash_attn(i["q"], i["k"], i["v"]),
    iterations=100,
    value_distribution="adversarial",  # the P3 default — 99% recall
)

print(f"Passed: {results.passed}/{results.total}")

Any failure reports the seed, dtype, shape, and a base64 snapshot of the failing input — re-run it byte-for-byte with gpuemu reproduce <seed>.

3. Gate CI

# fuzz + lint + baseline-diff, emit SARIF for code scanning
gpuemu ci --baseline v1.0 --format sarif --output gpuemu.sarif