Pure Tensor Program Rewriting via Access Patterns (Representation Pearl)
Not on the map. Why?
Abstract (arXiv)
Tensor kernels in machine learning (ML) often correspond to pure mathematical expressions, making term rewriting an attractive strategy for optimization and mapping to specialized hardware accelerators. However, existing ML intermediate representations (IRs) tend to either be textitpure but high-level, making low-level rewrites to hardware targets inexpressible, or textitlow-level but impure, hampering the use of term rewriting altogether. This paper introduces Glenside, a pure IR whose core abstraction -- the textitaccess pattern -- enables low-level, layout-aware, hardware-centric program rewrites. We demonstrate how term rewriting in Glenside can be used to map program fragments to hardware accelerator invocations and automatically discover classic data layout transformations like textttim2col. Glenside establishes a new foundation for exploring further term rewriting techniques in optimizing low-level tensor programs.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). First posted on arXiv 19 May 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 2; 2024: 1; 2025: 3; 2026: 1.
7 papers.
- 2024SmartMem: Layout Transformation Elimination and Adaptation for Efficient DNN Execution on Mobilecited by 12
- 2023DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimizationcited by 9
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilerscited by 6
- 2025e-boost: Boosted E-Graph Extraction with Adaptive Heuristics and Exact Solvingcited by 2
- 2023SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIRcited by 1
- 2025nncase: An End-to-End Compiler for Efficient LLM Deployment on Heterogeneous Storage Architecturescited by 0
- 2026Meganeura: Portable GPU Training and Inference through Vulkan and Metalcited by 0
- 2026Meganeura: Portable GPU Training and Inference through Vulkan and Metal3 Aug 2026
- 2025nncase: An End-to-End Compiler for Efficient LLM Deployment on Heterogeneous Storage Architectures25 Dec 2025
- 2025Your Compiler is Backdooring Your Model: Understanding and Exploiting Compilation Inconsistency Vulnerabilities in Deep Learning Compilers14 Sep 2025
- 2025e-boost: Boosted E-Graph Extraction with Adaptive Heuristics and Exact Solving18 Aug 2025
- 2024SmartMem: Layout Transformation Elimination and Adaptation for Efficient DNN Execution on Mobile21 Apr 2024
- 2023SEER: Super-Optimization Explorer for HLS using E-graph Rewriting with MLIR15 Aug 2023
- 2023DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph Optimization11 Jul 2023