Skip to main content

KernelAtlas

KernelAtlas: a transformer kernel quest

All KernelAtlas code was generated by AI.

Give KernelAtlas a Hugging Face model ID to find out which kernels and compilation settings to use on your GPU. It profiles Transformers inference, searches the Kernel Hub, and reports which configurations passed its checks and how much time they saved.

Install

Use Python 3.11 or later with PyTorch for your target GPU.

python3 -m venv .venv
source .venv/bin/activate
python -m pip install 'kernelatlas[profile]'

From a source checkout, install with python -m pip install -e '.[profile]'.

Profile a model

Run the command for your GPU with any supported Transformers causal language model.

# NVIDIA GPU with CUDA-enabled PyTorch
kernelatlas profile Qwen/Qwen3-0.6B --device cuda

# Apple Silicon with PyTorch MPS
kernelatlas profile Qwen/Qwen3-0.6B --device mps

The summary tells you which settings to keep, which Hub kernels were tested, and which operations might benefit from a new kernel. Run the printed best_combo.py command to use the selected configuration. Reopen the findings any time or export them for an agent.

kernelatlas atlas show --model-id Qwen/Qwen3-0.6B
kernelatlas atlas show --model-id Qwen/Qwen3-0.6B --format json

The CLI defaults to MPS when you omit --device. The end-to-end workflow has been tested on Apple M5. Validation on NVIDIA hardware is pending.

Choose what to measure

  • To inspect automatic and selective Hub loading options without downloading weights, run kernelatlas recommend MODEL_ID --device cuda or --device mps. A pretrained, unquantized profile also saves examples. Run kernelatlas compare-kernels RUN_DIRECTORY to check bindings, logits, and latency against the profiled baseline.
  • To measure your generation workload, add --prompt-length 512 --max-new-tokens 32 to the profile command. The first output token comes from the prompt. The report includes prefill, cached-token, and total latency.
  • Floating-point inference defaults to BF16 on supported GPUs and FP16 elsewhere. Use --dtype bf16, --dtype fp16, or --dtype fp32 to override it.
  • By default, profiling compares eager execution with whole-model and MLP compilation where available. It checks logits and greedy tokens before timing. Use --no-compile for an eager-only run.

On MPS, KernelAtlas also supports packed linear weights (--quantization int4 or int8), reduced random-weight text profiles for Inkling-2-Mini and Qwen3.8-27B, and local Metal kernel and static-cache trials for eligible workloads. Run a local optimization trial

Benchmark evidence · Release guide · Apache License 2.0

Metadata

Release files for kernelatlas 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kernelatlas 0.1.0
File Size Uploaded Provenance Actions
kernelatlas-0.1.0.tar.gz 576.4 kB With provenance Details for kernelatlas-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kernelatlas 0.1.0
File Interpreter ABI Platform Actions
kernelatlas-0.1.0-py3-none-any.whl Python 3 none any Details for kernelatlas-0.1.0-py3-none-any.whl

Total release size: 654.6 kB

Release files / kernelatlas-0.1.0.tar.gz

Download URL kernelatlas-0.1.0.tar.gz
Size 576.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a33beadc395b443abe52e2d6e47026e0a734fa85b79abfc8ee80ddf1626be2c8
BLAKE2b-256 checksum
How to use checksums
1b743b3d487a68d0fcea68f726baa66a41c06e73ed7fb91223c1b54ff776ee69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / kernelatlas-0.1.0-py3-none-any.whl

Download URL kernelatlas-0.1.0-py3-none-any.whl
Size 78.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9e0593131bdf49e4379ec34587c7a4f6fe315b3259d67e543063d31cf64bdfb
BLAKE2b-256 checksum
How to use checksums
45f1769e195e93d7f9cd2d3be3dd654fc9215ecbdeea937f6289bf5da88dd731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for kernelatlas 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kernelatlas-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page