skillfed

helion

A Python-embedded DSL that makes it easy to write ML kernels

helion v1.4.0 204.4K downloads/30d#9,607 on PyPI922
License unclear 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) Active released

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 helion

uv

uv add helion

poetry

poetry add helion

Installing 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

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

GPU kernel DSLmachine learning kernel compilerTriton abstraction layerautotuned GPU kernelskernel generationtensor operation optimizationGPU kernel autotuning
gpu-kernelsautotuningpytorch-integration

More Artificial Intelligence packages

Further reading