This repository was archived by the owner on Nov 30, 2026. It is now read-only.
Repository navigation
v0.3.0
This release introduces compiler optimizations that improve safe kernel performance, async launch performance improvements, persistent kernel tuning, and zero-copy interop with externally owned device memory. The front-end compiler now proves a broader class of symbolic facts about loads and stores during JIT compilation. Checks which the compiler cannot discharge outright are progressively hoisted out of control flow constructs (e.g. hot loops) and, when possible, out of the kernel entirely, re-materializing as single host-side comparisons at launch. This frees kernel code from bounds checks and bounds-related register pressure.
Highlights
- Bounds-check placement: Every partition access walks one proof ladder (axis provenance, static folding, declared preconditions, host-side launch checks) and only then pays an in-kernel assert, hoisted to the outermost provable loop preheader. Kernels indexed by loop iterands, mapped schedule components, or tile-block ids typically compile with zero in-kernel checks and no annotations, and
deny_in_kernel_checks = trueturns any residual in-kernel check into a compile error.PartitionMut::storejoins the checked-by-default surface (store_uncheckedis the explicit escape) at identical register counts. The placement optimizer is differentially validated: Every kernel in the test corpus runs both with optimized placement and with all checks forced to their access sites, and the optimized build must never accept an execution the reference build rejects. The new book chapter, Bounds-Check Placement, documents the placement rules and the verification workflow. - Partial partition mapping: A partitioned output normally maps every block to a tile program;
partition_prefixallows a partial, still-disjoint mapping — the leading blocks along each axis get tile programs, the rest are left untouched. Mapping beyond the partition remains a launch error, andpartitionstill requires the mapping to be total. - Zero-copy interop:
Tensor::from_foreignborrows device memory owned by an external framework (cudarc, torch, VMM ranges), holding the owner alive by refcount and verifying the addressable extent at construction;Tensor::borrow_raw_parts,Device::borrow_with_owner, andStream::borrow_with_ownercover bare handles. - Autotuner core: declared configuration spaces, pluggable searchers, resumable grid search, and provenance-checked tuning records.
cutile::benchfor device-event kernel benchmarking, an opt-in persistent on-disk cubin cache, a process-global single-flight kernel cache with a.compile()warmup API, and async launch latency at parity with sync.
Performance results
- Fully checked kernels match their zero-check unsafe twins: Paired A/B runs on B200 (Qwen3-32B, 16K and 32K prefill) agree within 0.5% in both directions with byte-identical output, and on RTX 5090 the fully checked flash-attention prefill kernel runs within 2.5% of its checks-disabled floor. Checked and unchecked stores compile to identical register counts.
- Async launch latency is at parity with sync.
Changed
with_boundsandDim::neware deprecated: bounds inference and declared preconditions prove everything they proved, with the checks placed at launch instead of in the kernel. Migration notes are on the deprecations.- Tile IR bytecode version selection reads the CUDA toolkit when discoverable and otherwise probes
tileiraswith a representative module (an entry with aforregion and view chain), so an accepted version is one real kernels compile at. - The
persistent_gemmexample is rewritten in the zero-annotation form and compiles underdeny_in_kernel_checks = true.
Fixed
- An entry declared as bare
#[cutile::entry], without an argument list, was silently treated as a plain function; both attribute forms are now recognized. - Interval range facts no longer survive arithmetic that can wrap
i32; a wrapped intermediate could previously discharge a check the machine value violated. - Bounds analysis guards division and remainder against zero divisors, saturates interval arithmetic, and uses overlap analysis for
eq/ne. - Device-op
Sendbounds, CUDA driver flag types, and aarch64 flake support. - Security bumps for crossbeam-epoch (RUSTSEC-2026-0204) and anyhow (RUSTSEC-2026-0190).