ScanWeaver: Compiler-Driven Parallelization of Affine Recurrences via Associative Scan Lowering Qiying Wu Independent Researcher [email protected]
Pavel Zolnikov Independent Researcher [email protected]
arXiv:2606.00601v1 [cs.PL] 30 May 2026
June 2, 2026 recurrence structures often force execution into sequential update chains that underutilize modern hardware.
Abstract Selective state-space models such as Mamba highlight the practical importance of input-dependent scan recurrences, which preserve linear-time sequence modeling while improving language modeling capabilities. However, these recurrences introduce stricter sequential dependencies than classical structured SSMs, limiting parallel execution on modern accelerators.
Existing approaches address this limitation through specialized kernel engineering, including hand-optimized CUDA implementations that fuse recurrence updates with carefully tuned memory access patterns. While effective for particular operators, these implementations are typically tightly coupled to specific recurrence forms and do not generalize naturally across workloads or compiler frameworks.
We present ScanWeaver, a compiler framework that transforms recurrence-based computations into associative scan representations and lowers them end-to-end to executable GPU programs. We use Mamba-style selective scan as a motivating example of a broader class of affine recurrences that arise in modern ML workloads. Rather than targeting a single model family, ScanWeaver elevates this recurrence structure to a first-class compiler abstraction, enabling systematic MLIRbased lowering to compiler-generated Blelloch scan execution on GPUs.
In this work, we take a compiler-centric perspective: recurrence is a compilation problem. Rather than treating each recurrence as a special-case kernel, we seek a systematic transformation that exposes its latent parallel structure. Our key observation is that a broad class of recurrence relations can be reformulated as compositions of affine state transitions, enabling representation as associative scan computations. A motivating example is the selective scan recurrence used in state-space models such as Mamba: ℎ𝑡 = 𝑎 𝑡 ℎ𝑡 −1 + 𝑏 𝑡 𝑥 𝑡 ,
Across forward selective-scan workloads with matched local recurrence semantics, we validate affine recurrence decomposition, Blelloch lowering, MLIR GPU lowering, executable artifact generation, and actual GPU execution from generated MLIR. We benchmark the resulting ScanWeaver GPU execution against PyTorch and CUDA sequential baselines, and include the Mamba kernel as a fused production baseline for systems context.
1
which introduces strict sequential dependencies across sequence dimension 𝑡. While naively sequential, this recurrence admits an affine decomposition that enables parallel scan execution. We introduce ScanWeaver, a compiler framework that elevates affine scan into a first-class compiler abstraction. ScanWeaver rewrites recurrence-based computations into associative scan programs and lowers them through an end-to-end MLIR GPU pipeline that generates executable Blelloch scan artifacts with explicit GPU launch lowering and shared-memory staging.
Introduction
Sequential recurrence remains a fundamental bottleneck in modern machine learning and systems workloads. From state-space models to dynamic programming and recurrent neural networks, many computations are expressed as stepby-step state transitions with strict temporal dependencies. Although GPUs provide massive parallel throughput, these
(1)
1
Key insight. A broad class of recurrences, including inputdependent state updates, can be reformulated as compositions of affine state transitions. This reformulation exposes an associative structure over affine pairs, allowing the recur-
rence to be expressed as a prefix scan computation rather than a strictly sequential update chain. Once represented as an associative affine scan, the computation can be mapped onto parallel scan schedules such as Blelloch scan, reducing execution depth from linear recurrence traversal to logarithmic scan depth and enabling efficient GPU parallelization. Rather than treating this transformation as a specialized optimization for a single operator, ScanWeaver elevates affine scan into a compiler-level abstraction. This enables systematic decomposition, lowering, and schedule realization for recurrence-based computations within a unified MLIR-based framework. Contributions. • We introduce affine scan as a compiler abstraction for expressing and parallelizing recurrence-based computations through associative scan structure. • We present a compiler-driven recurrence transformation that rewrites sequential affine recurrences into explicit parallel scan programs. • We design and implement an end-to-end MLIR GPU lowering pipeline for affine recurrence parallelization, generating executable GPU Blelloch scan programs from high-level recurrence IR. • We realize compiler-generated parallel scan execution through explicit upsweep, downsweep, and affineprefix reconstruction over affine transition pairs on GPU. • We provide a numerical characterization that distinguishes implementation correctness from instability induced by exponential recurrence parameterizations.
2
Background
2.1
State-Space Models and Selective Scan
State-space models (SSMs) model sequence dynamics through recurrent hidden-state updates, providing an alternative to quadratic-cost attention mechanisms. Recent systems such as Mamba extend this formulation with inputdependent selective state transitions, yielding recurrences of the form:
preserve linear-time sequence traversal but introduce strict temporal dependencies that limit parallel execution on modern accelerators. 2.2
MLIR and Multi-Level Lowering
MLIR provides a compiler infrastructure for representing computation across multiple abstraction levels, ranging from high-level tensor operations to target-specific GPU execution. Transformations are expressed through staged lowering passes that progressively rewrite operations into lower-level representations. ScanWeaver builds on this model by introducing affine scan as an intermediate compiler abstraction for recurrence-based computation. This enables recurrence decomposition, scan lowering, and GPU execution mapping within a unified MLIR lowering pipeline.
3
From Recurrence to Parallel Scan
3.1
Selective Scan Formulation
We consider selective scan recurrences of the form: ℎ𝑡 = 𝑎 𝑡 ⊙ ℎ𝑡 −1 + 𝑏 𝑡 ⊙ 𝑥 𝑡
(3)
with output projection: 𝑦 𝑡 = 𝑐 𝑡 ⊙ ℎ𝑡 .
(4)
Naively, this computation introduces a strict sequential dependency chain across sequence dimension 𝑡, since each hidden state depends on the previous state. 3.2
Affine Scan Reformulation
The key observation in ScanWeaver is that the recurrence admits an affine-state formulation. Expanding the recurrence yields:
ℎ𝑡 =
Ö𝑡 𝑖=1
∑︁𝑡 𝑎 𝑖 ℎ0 +
𝑘=1
Ö𝑡
𝑎𝑖 𝑏 𝑘 𝑥 𝑘 .
(5)
𝑖=𝑘+1
We define affine transition pairs: ( 𝐴𝑡 , 𝑈𝑡 ) = (𝑎 𝑡 , 𝑏 𝑡 𝑥 𝑡 ),
(6)
together with associative composition: ℎ𝑡 = 𝑎 𝑡 ℎ𝑡 −1 + 𝑏 𝑡 𝑥 𝑡 .
(2) ( 𝐴2 , 𝑈2 ) ⊕ ( 𝐴1 , 𝑈1 ) = ( 𝐴2 𝐴1 , 𝐴2𝑈1 + 𝑈2 ).
Unlike fixed-transition SSMs, selective scan introduces input-dependent recurrence coefficients, increasing both expressiveness and execution complexity. These recurrences
(7)
Each prefix composition produces the affine transformation corresponding to a recurrence segment. Evaluating the
scan over prefixes therefore reconstructs the same hidden states that would be produced by sequential recurrence traversal, while exposing a parallel evaluation structure through associative composition. The recurrence can therefore be represented as a prefix scan over affine transition pairs. We refer to this representation as an affine-prefix scan formulation. Crucially, associativity enables parallel scan evaluation rather than strictly sequential recurrence traversal. The scan dimension corresponds to the sequence dimension 𝐿. 3.3
Parallel Execution via Blelloch Scan
Once represented as an associative affine scan, the computation can be lowered into standard parallel prefix algorithms such as Blelloch scan. In the resulting scan formulation, affine transition pairs are evaluated through parallel prefix composition rather than sequential recurrence traversal. ScanWeaver materializes this computation using a Blelloch scan schedule, where partial affine compositions are computed hierarchically across the sequence dimension. The resulting execution consists of:
4
Compiler-Driven Lowering
ScanWeaver implements an end-to-end lowering pipeline in MLIR that transforms high-level recurrence IR into executable GPU Blelloch scan programs. The lowering pipeline proceeds through affine normalization, associative scan decomposition, Blelloch schedule materialization, MLIR GPU lowering, and executable artifact generation. Representative IR evolution. The generated program is progressively lowered from recurrence IR into explicit GPU execution constructs: %0 = scanweaver.scan %x, %a, %b, %c ⇓ %1 = scanweaver.affine scan %x, %a, %b ⇓ %2 = scanweaver.assoc scan %1 ⇓ %3 = scanweaver.blelloch up %2 %4 = scanweaver.blelloch down %3 ⇓ gpu.launch blocks(%bx) threads(%tx) { %smem = gpu.alloc() : memref<1024xf32, workgroup> gpu.barrier gpu.return } gpu.module @scanweaver kernel { gpu.func @blelloch scan(...) }
• Upsweep (tree reduction) Affine scan IR. operation:
• Root initialization
We introduce a first-class recurrence IR
• Downsweep (prefix propagation) This reduces the dependency depth of recurrence evaluation from linear sequence traversal to logarithmic scan depth:
%y = scanweaver.scan(%x,%a,%b,%c)
(9)
(8)
which is normalized into an affine scan representation suitable for associative decomposition and scan lowering.
While Blelloch scan reduces dependency depth, it introduces additional synchronization and intermediate composition overhead relative to strictly sequential recurrence traversal.
Decomposition. The recurrence is rewritten into affine transition pairs and represented as an associative scan skeleton over affine compositions.
𝑂 (𝐿) → 𝑂 (log 𝐿).
The scan dimension corresponds to sequence dimension 𝐿, enabling efficient GPU parallelization across long sequence traversals. 3.4
Generalization Beyond Selective Scan
The same transformation applies whenever computation can be expressed as compositions of affine state transitions. Beyond Mamba-style selective scan, this includes broader classes of affine recurrences appearing in recurrent updates, state propagation, and dynamic-programming-style prefix computations. The compiler contribution of ScanWeaver is therefore not a specialized lowering for a single operator, but a systematic affine-scan abstraction for recurrence-based computation.
Scan lowering. The associative scan is lowered into explicit Blelloch scan stages, exposing synchronization structure and shared-memory scan dependencies to later GPU lowering passes. The generated GPU program performs explicit upsweep, downsweep, and affine-prefix reconstruction directly from compiler-lowered MLIR IR. • upsweep • root initialization • downsweep GPU mapping. The lowered scan program is mapped onto GPU execution through explicit gpu.launch operations,
Sequential recurrence
Affine decomposition
Parallel Blelloch scan
GPU execution mapping
ℎ𝑡 = 𝑎 𝑡 ℎ𝑡 −1 + 𝑏 𝑡 𝑥 𝑡
( 𝐴𝑡 , 𝑈𝑡 ) = (𝑎 𝑡 , 𝑏 𝑡 𝑥 𝑡 )
root
MLIR gpu.launch CUDA execution
𝑝2 ⊕ 𝑝1 𝑝4 ⊕ 𝑝3 𝑡=1
𝑡=2
𝑡=3
( 𝐴1 , 𝑈1 )
( 𝐴2 , 𝑈2 )
GPU block shared-memory view shared-memory affine pairs
𝑝1 𝑝2 𝑝3 𝑝4
( 𝐴3 , 𝑈3 )
𝑡0
𝑡1
𝑡2
𝑡3
layout: (𝐵, 𝐷, 𝐿) scan over 𝐿
Figure 1: Overview of the ScanWeaver transformation. Sequential recurrences are rewritten into affine transition pairs, lowered into a Blelloch scan, and mapped onto GPU execution over sequence dimension 𝐿. Sequential recurrence
ℎ1
ℎ2
ℎ3
scanweaver.scan high-level recurrence
Parallel affine scan root ℎ4
dependency depth = 𝑂 (𝐿)
𝑝2 ⊕ 𝑝1
𝑝4 ⊕ 𝑝3
𝑝1
𝑝3
𝑝2
scanweaver.affine scan affine transition pairs
𝑝4
scanweaver.associative scan prefix composition
dependency depth = 𝑂 (log 𝐿)
blelloch upsweep/downsweep scan schedule
Figure 2: Affine scan reformulation converts sequential recurrence traversal into a logarithmic-depth parallel prefix schedule over sequence dimension 𝐿.
gpu.launch shared-memory execution gpu.module outlined GPU kernel
shared-memory staging of affine transition pairs, and perthread scan traversal over sequence dimension 𝐿.
NVVM / PTX executable artifact
The current implementation parallelizes the sequence dimension 𝐿 through affine-prefix scan decomposition, while batch and hidden dimensions are mapped across GPU lanes and thread blocks.
CUDA execution generated Blelloch scan
Figure 3: Concrete ScanWeaver lowering path from recurrence IR to lowered GPU scan execution. Schedule space. The affine-scan abstraction separates recurrence representation from concrete scan realization. ScanWeaver currently instantiates a Blelloch tree schedule, while exposing a compiler structure that could support additional scan schedules in future work. Artifact generation. ScanWeaver lowers affine recurrence programs through an end-to-end MLIR GPU pipeline, generating executable GPU artifacts implementing Blelloch scan execution over affine transition pairs. The generated artifacts are launched and validated on GPU through the LLVM/MLIR toolchain. The implementation uses explicit GPU launch semantics and shared-memory staging consistent with the affine scan schedule.
5
Implementation
We implement ScanWeaver using MLIR, CUDA, and PyTorch reference baselines. The implementation includes compiler-side lowering passes, generated GPU artifact execution, and runtime baselines for validating affine scan execution. The implementation includes: • PyTorch sequential reference execution • Naive CUDA recurrence traversal • Compiler-generated MLIR GPU Blelloch scan execution
• Parallel CUDA Blelloch scan backend for baseline comparison • Native out-of-tree MLIR lowering passes • MLIR-side GPU execution wrappers for generated artifact validation The CUDA implementation uses shared-memory staging of affine transition pairs, hierarchical Blelloch scan execution, and coalesced traversal over sequence dimension 𝐿. GPU execution is expressed through explicit gpu.launch operations and lowered through the LLVM/MLIR GPU toolchain.
6
Evaluation
6.1
Setup
The current evaluation separates correctness validation from paper-facing timing. The bounded backend sweep compares the local PyTorch recurrence, sequential CUDA recurrence traversal, ScanWeaver Blelloch execution, generated MLIR GPU artifacts, and Python prototype lowering paths. This sweep validates semantics across implementation paths while keeping Python prototype runtime out of paper-facing performance claims. Paper-facing runtime measurements come from selectivescan implementations with comparable recurrence semantics. We time the Mamba fused kernel as a production baseline and the ScanWeaver Blelloch path as the compiler-generated affine-scan backend; correctness-reference paths are not timed for paper figures. For latency measurements, we exclude one-time compilation, process startup, artifact loading, and CUDA initialization overheads. Each backend is initialized once, warmed up, and then timed over repeated steady-state launches; we report mean latency and standard deviation across timed iterations. 6.2
Correctness
On the bounded CUDA correctness sweep, the generated MLIR GPU Blelloch path, Python prototype lowering entrypoints, and CUDA reference backends match the local affine recurrence. This establishes that affine decomposition, Blelloch lowering, and generated GPU execution preserve recurrence semantics. The native C++ MLIR artifact checker validates generated GPU paths independently, separating compiler artifact failures from recurrence-semantics failures. 6.3
Performance
Table 1 summarizes the execution structure of the evaluated backends.
Figure 4: Latency scaling across sequence lengths for sequential recurrence traversal and compiler-lowered affine-scan execution. The ScanWeaver Blelloch backend maintains substantially flatter scaling than sequential traversal by lowering affine recurrences into a logarithmic-depth parallel prefix schedule. Backend
Parallel Depth GPU Mapping Shared Mem. Generalized Compiler Gen.
PyTorch Ref. 𝑂 (𝐿) Naive CUDA 𝑂 (𝐿) Mamba Kernel 𝑂 (𝐿) ScanWeaver Blelloch 𝑂 (log 𝐿)
No Lane parallel Fused kernel Prefix scan
No Minimal Yes Yes
Yes No No Yes
No No No Yes
Table 1: Systems-level comparison of selective-scan execution backends. ScanWeaver targets generalized affine-scan lowering rather than operator-specific fused kernel specialization. Figure 4 shows selective-scan latency across sequence lengths for the PyTorch sequential reference, the naive CUDA recurrence backend, and the ScanWeaver Blelloch backend under bounded recurrence parameters. The sequential PyTorch reference scales linearly with sequence length and becomes increasingly expensive for long scans. The naive CUDA backend improves execution through GPU parallelism across lanes, but still performs sequential recurrence traversal within each lane. In contrast, the ScanWeaver Blelloch backend lowers the affine recurrence into a generated parallel prefix scan structure, reducing recurrence dependency depth and substantially improving long-sequence execution throughput. The ScanWeaver Blelloch backend remains substantially flatter than sequential traversal, with modest growth at large sequence lengths arising from GPU synchronization and launch overheads. The measured latency is dominated primarily by GPU synchronization, shared-memory staging, and launch overheads rather than arithmetic throughput over the tested sequence range.
The Mamba kernel remains highly optimized through fused operator-specific execution, while ScanWeaver focuses on compiler-driven affine-scan lowering and generalized recurrence parallelization rather than operator-specific kernel specialization. At sequence length 𝐿 = 1024, the ScanWeaver Blelloch backend achieves approximately 0.032 ms latency compared to 0.469 ms for the naive CUDA recurrence backend and 51.7 ms for the PyTorch sequential reference. 6.4
MLIR Affine Recurrence Validation
We validate the native LLVM/MLIR affine-recurrence path by lowering ScanWeaver IR through MLIR GPU dialects to executable artifacts and launching the generated programs on GPU. The generated Blelloch path executes the affine transition-pair scan directly, including upsweep, downsweep, and affine-prefix reconstruction. 6.5
Numerical Stability
We distinguish implementation correctness from instability induced by exponential recurrence parameterization. Under bounded recurrence parameters, all evaluated backends remain numerically stable and agree closely with the sequential reference. Under exponential parameterization, hidden-state magnitudes can grow rapidly with sequence length, amplifying small floating-point differences into large absolute deviations. We therefore interpret stress-mode runs as numericalcharacterization experiments rather than strict correctness failures of the affine-scan parallelization itself. 6.6
Generalization Beyond Selective Scan
To demonstrate that ScanWeaver is not specific to Mambastyle selective scan, we evaluate a second affine recurrence corresponding to a weighted prefix computation: ℎ𝑡 = 𝛼𝑡 ℎ𝑡 −1 + 𝛽𝑡
(10)
This recurrence does not depend on input 𝑥 𝑡 , but it admits the same affine scan formulation. In the implementation, we reuse the same lowering pipeline by mapping 𝛼 ↦→ 𝑎, 𝛽 ↦→ 𝑏, and setting 𝑥 = 1 and 𝑐 = 1. The weighted-prefix path is used as correctness evidence for the abstraction, not as a paper-facing performance benchmark. Its role is to demonstrate that the same affine-scan lowering structure applies beyond the Mamba selective-scan instance. This demonstrates that the lowering is driven by affinetransition structure rather than selective-scan-specific se-
mantics, supporting the broader view of ScanWeaver as a compiler abstraction for recurrence-based computation. 6.7
Comparison with Production Kernels
We use the Mamba CUDA kernel as a structural production baseline for selective scan.
Implementation differences. The Mamba kernel is implemented as a fused CUDA kernel that integrates recurrence, projection, and gating into a single execution unit. It relies on hand-optimized memory access patterns, warp-level primitives, and shared-memory staging. In contrast, ScanWeaver adopts a compiler-driven approach. The computation is first expressed in a high-level IR and then lowered through a sequence of transformations into a generated GPU scan program, including affine decomposition, explicit Blelloch schedule materialization, shared-memory staging, and GPU launch mapping. Streaming and other schedule families remain part of the intended design space rather than the current implementation.
Performance tradeoff. While the Mamba kernel achieves strong performance through fusion and specialization, ScanWeaver is aimed at validating a general compiler transformation and GPU lowering strategy rather than replacing a production-tuned runtime. The comparison is therefore split into an exact compatible subset for correctness and a structural comparison for broader systems context.
Interpretation. Our goal is not to outperform production kernels directly, but to demonstrate that compiler-driven transformations can systematically recover efficient parallel execution for affine recurrence structures. We focus on structural comparison rather than strict kernel-level equivalence, since the Mamba kernel includes additional fused operations beyond the affine recurrence evaluated here. The structural comparison is not a claim of exact kernel equivalence. It is used to place the affine-scan lowering work next to a production selective-scan implementation while keeping the semantic distinction explicit. 6.8
Discussion of Findings
The main systems result is that recurrence structure can be represented as affine scan, lowered through the native C++ MLIR pipeline, and executed as a lowered GPU Blelloch scan program. This elevates ScanWeaver from a CUDA realization of a scan idea to an end-to-end compiler pipeline for affine recurrence parallelization.
7
Discussion Selective scan is not inherently sequential—it is sequential only in its naive formulation.
ScanWeaver demonstrates that parallelization requires both structural transformation and numerical awareness. The compiler plays a central role in exposing parallel structure while maintaining semantic correctness. More broadly, affine scan provides a unifying abstraction for recurrence parallelization, suggesting a path toward more systematic compiler-generated parallel recurrence execution on modern accelerators.
8
Related Work
State-space models and selective scan. Structured statespace models (SSMs) such as S4 [1] and Mamba [2] replace quadratic attention with recurrent state updates while preserving long-context modeling capability. Mamba further introduces input-dependent selective state transitions together with a specialized selective-scan kernel for efficient execution. Parallel scan algorithms. Parallel prefix computation has long been a foundational primitive in parallel systems. Hillis–Steele scan [3] and Blelloch scan [4] established work-efficient parallel scan formulations that remain widely used on GPUs today. Our work builds on this lineage by reformulating affine recurrences as associative scan programs. Efficient GPU realizations of parallel scan have since become foundational GPU primitives, including implementations in CUDA libraries and GPU programming frameworks. Our work differs in focusing specifically on affine recurrence decomposition and compiler-lowered GPU scan execution for recurrence-based machine learning workloads.
further explore compiler-driven lowering and schedule generation for heterogeneous accelerators. Our contribution. In contrast to prior systems that either specialize a single recurrence kernel or optimize fixed tensor operators, ScanWeaver elevates affine scan to a compiler primitive, enabling systematic transformation from sequential recurrence into compiler-lowered parallel scan execution through MLIR GPU lowering flows.
9
Limitations • Numerical instability under exponential parameterization remains an open issue. • The current generated GPU path instantiates a Blelloch schedule; additional schedules such as streaming or hybrid scans remain future work. • The Python prototype lowering path is correctnessvalidated, but paper-facing performance focuses on generated GPU execution and CUDA baselines. • The current implementation focuses on affine recurrences without explicit modeling of reset or gating mechanisms found in full selective state-space models. • The current implementation focuses on single-node GPU execution and does not yet address distributed or multi-GPU scan execution.
Artifact Availability The ScanWeaver implementation, benchmarks, and experiment scripts are available at: https://github.com/qiyingwu/scanweaver
References GPU kernel optimization and tensor compilers. Modern GPU systems increasingly rely on schedule-aware optimization frameworks such as Triton [5], CUTLASS [6], and FlashAttention [7]. Unlike systems that primarily optimize fixed tensor kernels, ScanWeaver focuses on exposing recurrence structure itself as a compiler-managed scan abstraction. Compiler infrastructures and IR systems. Compiler frameworks such as Halide [8], TVM [9], Tensor Comprehensions [10], and MLIR [11] demonstrate the effectiveness of structured IR-based lowering for heterogeneous hardware targets. ScanWeaver builds on this compiler-oriented perspective by introducing affine scan as a first-class lowering abstraction for recurrence-based computation. More recent systems such as IREE [12] and TensorIR [13]
[1] Albert Gu, Karan Goel, and Christopher Ré. Efficiently modeling long sequences with structured state spaces. International Conference on Learning Representations, 2021. [2] Albert Gu and Tri Dao. Mamba: Linear-time sequence modeling with selective state spaces. arXiv preprint arXiv:2312.00752, 2023. [3] W. Daniel Hillis and Guy L. Steele Jr. Data parallel algorithms. Communications of the ACM, 29(12): 1170–1183, 1986. [4] Guy E. Blelloch. Prefix sums and their applications. In Synthesis of Parallel Algorithms. Morgan Kaufmann, 1990.
[5] Philippe Tillet et al. Triton: An intermediate language and compiler for tiled neural network computations. Proceedings of Machine Learning and Systems, 2021. [6] NVIDIA. Cutlass: Fast linear algebra in cuda c++. https://github.com/NVIDIA/ cutlass, 2024. [7] Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memoryefficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 2022. [8] Jonathan Ragan-Kelley et al. Halide: A language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. ACM SIGPLAN Notices, 48(6):519–530, 2013. [9] Tianqi Chen et al. Tvm: An automated end-to-end optimizing compiler for deep learning. In 13th USENIX Symposium on Operating Systems Design and Implementation, pages 578–594, 2018. [10] Nicolas Vasilache et al. Tensor comprehensions: Framework-agnostic high-performance machine learning abstractions. In arXiv preprint arXiv:1802.04730, 2018. [11] Chris Lattner et al. Mlir: A compiler infrastructure for the end of moore’s law. In LLVM Developers’ Meeting, 2020. [12] IREE Authors. IREE: Intermediate representation execution environment. https://github.com/ iree-org/iree, 2024. [13] Siyuan Feng, Bohan Hou, Hongyi Jin, Wuwei Lin, Junru Shao, Ruihang Lai, Zihao Ye, Lianmin Zheng, Cody Hao Yu, Yong Yu, and Tianqi Chen. TensorIR: An abstraction for automatic tensorized program optimization. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, 2023.