Rate this Page
★ ★ ★ ★ ★

Choosing a Backend#

Helion compiles the same Python tile language through several code generation backends. Choose a backend for your hardware before autotuning; Helion tunes configurations within that backend, and does not search across backends.

On NVIDIA B200 or B300, we recommend HELION_BACKEND=cute for better performance. Install the CuTe dependencies and use PyTorch built with CUDA 13 or later. Triton remains the default on all hardware; Helion emits a once-per-process recommendation when another backend is used on these GPUs, without changing your selection.

The recommendation uses Python’s UserWarning, like the experimental-backend warning. If you turn warnings into errors (-W error or pytest’s filterwarnings = ["error"]), the first matching compilation raises an exception. Python’s warning filters can ignore this recommendation by message; Helion’s ignore_warnings setting applies to helion.exc.BaseWarning instead.

Supported Backends and Status#

Backend (HELION_BACKEND)

Status

Hardware and when to choose it

Triton (triton, default)

Stable

General-purpose GPU backend for NVIDIA and AMD; other targets require a compatible Triton distribution.

CuTe DSL (cute)

Beta

NVIDIA GPUs, with Blackwell-focused optimizations. Recommended for B200/B300 performance; requires CUDA 13+ PyTorch and the pinned CuTe dependencies.

TileIR (tileir)

Stable

NVIDIA Blackwell (compute capability 10.x or 12.x), through Triton-to-tile-IR. Requires its Triton distribution and ENABLE_TILE=1.

Pallas (pallas)

Beta

Google TPUs through JAX/Pallas. CPU interpret mode is available for development.

Gluon (gluon)

Experimental

NVIDIA Blackwell (compute capability 10.x), using Triton’s Gluon compiler. Requires Triton 3.8+.

Metal (metal)

Experimental

Apple GPUs through Metal Shading Language, using PyTorch MPS tensors on macOS.

FlyDSL (flydsl)

Experimental

AMD GPUs through FlyDSL and ROCm; requires the separate flydsl package.

These labels describe Helion’s integration, not the maturity of the underlying compiler. They match the backend states in this Helion version:

  • Stable: the established compatibility path. Hardware, operation and dependency restrictions still apply.

  • Beta: usable for evaluation and workloads covered by the backend, but backend-specific options do not have a backwards-compatibility guarantee.

  • Experimental: under development, with incomplete coverage and evolving behavior. Helion warns once when an experimental backend is used.

Selecting a Backend#

Set the environment variable before importing modules that define kernels:

HELION_BACKEND=cute python my_kernel.py

Or choose per kernel:

import helion
import torch

@helion.kernel(backend="cute")
def my_kernel(x: torch.Tensor) -> torch.Tensor:
    ...

An explicit backend= argument takes precedence over HELION_BACKEND. Without either, Helion uses triton. Environment defaults are read when a kernel is defined, usually at import time. Selecting a backend does not install its dependencies, move input tensors to a different device, or automatically fall back to another backend when an operation is unsupported. See Settings for the full settings reference.

Backend Details#

Triton#

Triton is the default and a good starting point for NVIDIA and AMD GPUs. Follow Installation for the PyTorch and Triton requirements. Its search space includes tile sizes, warps, pipeline stages and indexing strategies, subject to the installed compiler and hardware. Triton remains useful when you need its operation coverage or existing Triton-specific configurations.

CuTe DSL#

CuTe DSL exposes NVIDIA-specific layouts, memory transfers and matrix instructions. Helion’s beta backend uses them for Blackwell optimizations, including TMA transfers, tensor-core matrix multiplication and warp-specialized schedules. On B200/B300, start with HELION_BACKEND=cute for better performance, then measure your workload.

Use the pinned helion[cute] dependencies for the Helion version you install; for a source checkout, use pip install -e '.[cute]' or ./scripts/install_cute.sh. See the CuTe installation instructions. The backend requires a CUDA 13+ build of PyTorch, even if a newer system CUDA toolkit is already installed. The B200/B300 recommendation does not imply that every Blackwell GPU has the same instructions or performance profile.

TileIR#

TileIR feeds Triton code through NVIDIA’s CUDA Tile IR toolchain. Use it to evaluate that compiler on supported Blackwell hardware. Install Triton-to-tile-IR, then set both ENABLE_TILE=1 and HELION_BACKEND=tileir. Prefer a separate environment when comparing it with upstream Triton, since they provide different Triton distributions. The CUDA Tile IR Backend guide explains its num_ctas and occupancy knobs and unsupported operations. For B200/B300 performance, our starting recommendation is CuTe.

Pallas#

Pallas targets Google TPUs. Install helion[pallas-tpu] for JAX’s TPU dependencies. Running with PyTorch TPU tensors also requires a compatible torch_tpu installation; the extra does not install that bridge. TPU setup depends on your PyTorch and TPU runtime.

For development without a TPU, install helion[pallas-cpu] and set HELION_BACKEND=pallas HELION_PALLAS_INTERPRET=1. Interpret mode executes on CPU for correctness and lowering checks; its timings do not predict TPU performance. pallas-interpret is a test-runner alias, not a HELION_BACKEND value. Pallas has its own dtype, operation and layout restrictions.

Gluon#

Gluon is an experimental alternative that compiles Helion’s Triton lowering through Gluon, with explicit layout and Blackwell scheduling support. It currently requires NVIDIA compute capability 10.x and Triton 3.8 or later. Use HELION_BACKEND=gluon to evaluate it; do not assume that Triton configs or features, such as block-pointer indexing, are supported unchanged.

Metal#

Metal generates Metal Shading Language for Apple GPUs. Use HELION_BACKEND=metal with an MPS-capable PyTorch installation on macOS and inputs on device="mps". This experimental path has different dtype and operation coverage from the Linux GPU backends; the CUDA examples need their input-device selection adapted.

FlyDSL#

FlyDSL generates kernels for AMD GPUs. Install a compatible ROCm build of PyTorch and the flydsl package, then set HELION_BACKEND=flydsl. ROCm PyTorch uses device="cuda" for GPU tensors. This experimental backend has a smaller configuration surface and incomplete operation coverage; Triton is the stable starting point on AMD.

Switching, Tuning and Deployment#

Keep the algorithm in portable helion.language and PyTorch operations when you intend to compare backends. Inline compiler code, assembly, supported dtypes and some operations are backend-specific.

Retune for each backend and target device. A helion.Config saved for one backend is not a portable performance preset: another backend may reject its keys or interpret shared knobs differently. Remove incompatible explicit config=/configs= values before tuning the new backend. Compare correctness and performance on the same hardware and representative inputs, with autotuning enabled; autotune_effort="none" is for iteration, not performance comparisons.

Deploy the selected backend with its runtime dependencies and configurations tuned for it. See Deployment and Autotuning and Config. To implement an external backend, see the experimental Backend API (experimental).