helion
A Python-embedded DSL that makes it easy to write ML kernels
What it is and what it does
Helion is a higher-level abstraction over Triton that lets you write GPU kernels using familiar syntax, then automatically optimizes them through an extensive search process. Instead of manually tuning tile sizes, grid dimensions, memory access patterns, and kernel configurations, you write a kernel using operations inside Helion's tiling loops, and the system generates and evaluates hundreds of candidate implementations to find the fastest one for your hardware.
The package compiles code inside `@helion.kernel()` decorated functions into a single optimized GPU kernel. It automates decisions about tensor indexing strategies, masking, grid layout, loop reordering, warp specialization, and persistent kernel strategies. First execution triggers autotuning (typically around 10 minutes), after which you can hardcode the best configuration to skip re-tuning on subsequent runs.
Use it for:
- Write custom matrix multiplication kernels without manually tuning configurations for each GPU architecture.
- Optimize reduction operations by letting Helion automatically choose loop strategies and memory access patterns.
- Develop portable GPU kernels that perform well across different hardware through broad search space exploration.
- Prototype GPU-accelerated operations before committing to hand-tuned implementations.
- Automate kernel argument handling and closure lifting for complex tensor operations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Helion is a Python-embedded domain-specific language for writing machine learning kernels that compile to Triton, with built-in autotuning to optimize GPU kernel performance.
Yes, if you need to write custom GPU kernels and want to avoid manual tuning. Low install friction, active maintenance, and zero known vulnerabilities support adoption. However, the unclear license classification and 10-minute autotuning overhead on first run are real constraints—verify license compatibility for your use case and expect startup latency. Best suited for teams with GPU access and kernels that justify the autotuning investment.
Install
helion on PyPI
pip
pip install helionuv
uv add helionpoetry
poetry add helionInstalling helion
Before you install
Low install friction with a pure-Python wheel. Active maintenance with recent releases; the project shows active development as of 2026-08-14 with 922 repository stars.
License in practice
License treatment is unclear; the package carries a BSD-style license from Meta Platforms but SPDX classification is not provided. Review the license text before use in proprietary or commercial contexts.
Quickstart
import helion
import helion.language as hl
@helion.kernel()
def matmul(x, y):
m, k = x.size()
k, n = y.size()
out = torch.empty([m, n], dtype=x.dtype, device=x.device)
for tile_m, tile_n in hl.tile([m, n]):
acc = hl.zeros([tile_m, tile_n], dtype=torch.float32)
for tile_k in hl.tile(k):
acc = torch.addmm(acc, x[tile_m, tile_k], y[tile_k, tile_n])
out[tile_m, tile_n] = acc
return out
Requires Python >=3.10 and a CUDA-capable GPU; first kernel execution triggers autotuning which takes approximately 10 minutes.
Verify before relying
- Whether autotuning results are cached across runs and how to manage the cache.
- Supported operations and coverage limits beyond the documented examples.
- Performance overhead of the Helion compilation and autotuning pipeline.
- Compatibility with non-NVIDIA GPUs despite the Triton backend.
Package facts
| License | Copyright (c) Meta Platforms, Inc. and affiliates. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — filecheck, numpy, psutil, rich, scikit-learn, typing-extensions |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 204,427/month — #9,607 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: helion-1.4.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
triton-ascendTriton Ascend is a compiler framework that…
unclear · top 15,000 on PyPI
liger-kernelLiger Kernel provides optimized Triton kernels…
permissive · top 15,000 on PyPI
triton-windowsTriton-windows is a Windows port of the Triton…
permissive · top 15,000 on PyPI
torchPyTorch provides GPU-accelerated tensor…
permissive · top 1,000 on PyPI
tilelangTilelang is a domain-specific language for…
permissive · top 5,000 on PyPI
sglang-kernelsglang-kernel provides optimized CUDA compute…
permissive · top 15,000 on PyPI
sgl-kernelsgl-kernel provides optimized CUDA compute…
permissive · top 15,000 on PyPI
nvidia-cutlass-dsl-libs-baseProvides Python interfaces for writing…
unclear · top 5,000 on PyPI
nvidia-cutlass-dsl-libs-cu12Provides a Python DSL for writing…
unclear · top 5,000 on PyPI
tokenspeed-tritonTriton is a language and compiler for writing…
permissive · top 5,000 on PyPI