Registry / ai-ml / helion

helion

JSON →
library1.1.0pypypiunverified

A Python-embedded DSL for writing high-performance ML kernels that compile to efficient GPU code. Version 1.1.0, actively developed under PyTorch. Monthly releases.

pip install helion
INSTALL
IMPORT
SIG · HELION
H
helion
ai-mlpythonv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

helion
import helion
import helion

Basic kernel definition using helion's DSL, launched with CUDA grid syntax.

import helion import torch @helion.kernel def add_kernel(a: helion.Tensor[float, 1], b: helion.Tensor[float, 1], c: helion.Tensor[float, 1]): i = helion.thread_id() c[i] = a[i] + b[i] x = torch.randn(1024, device='cuda') y = torch.randn(1024, device='cuda') z = torch.zeros(1024, device='cuda') add_kernel[(1024,)](x, y, z) print(z.sum())
Debug
Known issues
breakinghelion.kernel decorator requires the function to be a standalone function, not a method or lambda.
fix
Define kernels as top-level functions only.
affects: >=1.0.0
deprecatedUsing helion.Tensor without specifying dimensions (e.g., helion.Tensor[float]) is deprecated; always specify exact shape or broadcast.
fix
Use helion.Tensor[float, 1] for 1D, etc.
affects: >=1.1.0
gotchaGarbage collection of GPU tensors inside kernel loops can cause silent memory leaks; always manage tensor scopes explicitly.
fix
Avoid creating temporary helion.Tensor inside kernel loops; preallocate and reuse.
affects: >=1.0.0
gotchaKernel launch grid dimensions must be a tuple of ints or a single int; using list or other iterable raises a TypeError.
fix
Pass grid as (N,) or (N, M) tuple; not [N].
affects: >=1.0.0
breakingIn version 1.0.0, the 'hello' module was renamed to 'helion'; old imports break.
fix
Update 'import hello' to 'import helion'.
affects: <1.0.0
Upgrade
Version history
1.1.0latest on PyPI · released May 20, 2026
Audit
Dependencies
torchrequiredRequired for kernel compilation and integration with PyTorch.
numpyrequiredUsed for array operations inside kernel code.
Agent activity
30 hits · last 30 days
node
28
Amazon
1
Resources
helion — pip install helion · libregistry