Skip to content

IntentDSL

Write an operator algorithm once. Compile it for different execution models.

IntentDSL is a Python kernel language (import intentdsl as I) and MLIR compiler built on CompilerInfra for GPUs, CPUs, and domain-specific accelerators. Authors describe tensor computations, logical domains, reductions, state, and multi-kernel @I.program workflows once; compiler passes form verified physical programs across KIR, Block, CPU, and DSA, emitting native code through five exits: Triton, cuTile, Mojo, Weft, and BANG C.

IntentDSL paper overview: algorithm reuse and compiler workflow

Original paper overview (PDF). Target labels reflect the paper prototype; current V2 native exits are Triton, cuTile, Mojo, Weft, and BANG C.

Start Here

  • First Route: Clone the three repositories side by side, run setup/doctor, execute your first GPU kernel, and verify complete calls with Intent-Bench.
  • Handbook (Manual): Backend setup, author language & numerical contracts, I.jit / @I.program runtime integration, component inspection, and the nine reference formulas (identical to the offline intentdsl manual --lang en CLI).
  • Product Architecture: Compilation tree (KIR → Block / CPU / DSA), verified IR boundaries, exit contracts, and runtime lifecycle (with KIR Numerical Contracts and CPU Attention).
  • Same-Semantics Scoreboard: Strongest same-device baseline rules, explicit dual-tier semantic comparisons, MLU370 unpaired audit, and raw CSV archives.
  • Paper Evaluation & V1 Archive: Historical paper evaluation plots and the preserved /v1/ handbook.

Compilation Tree Across Execution Models

IntentDSL V2 compilation tree

Compilation tree (PDF): KIR captures target-independent semantics before lowering to Block (Triton, cuTile, and DSA → BANG C) and CPU tasks (Mojo and Weft).

Current Five-Exit Same-Semantics Scoreboard

Across RTX 5090 D, Xeon 8470Q, and MLU370, the same-semantics scoreboard (per-row CSV) evaluates 367 complete calls, of which 348 have a same-device reference under matching numerical semantics: 200 faster, 126 tied, and 22 slower (classified from the interquartile spread across three interleaved rounds; the remaining 19 rows on MLU370 have no same-semantics device reference because CNNL/torch_mlu lacks BF16, FP8, INT32-output, or device linear-algebra primitives). Each row's primary baseline is the fastest mature implementation available on the same device—including Inductor (torch.compile), library kernels, and eager execution—with every candidate required to pass the numerical criteria; see the scoreboard details.

Exit Device Faster Tied Slower Unpaired
Triton RTX 5090 D 26 39 7 0
cuTile RTX 5090 D 29 37 6 0
BANG C MLU370 39 15 6 19
Mojo Xeon 8470Q 55 16 1 0
Weft Xeon 8470Q 51 19 2 0

Showcase Examples

Run complete end-to-end scripts directly from the Intent repository: