Proceedings of the 5th ACM SIGPLAN International Symposium on Machine Programming 2021
DOI: 10.1145/3460945.3464953
|View full text |Cite
|
Sign up to set email alerts
|

Pure tensor program rewriting via access patterns (representation pearl)

Abstract: 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 pure but high-level, making low-level rewrites to hardware targets inexpressible, or low-level but impure, hampering the use of term rewriting altogether.This paper introduces Glenside, a pure IR whose core abstraction-the access pattern-… Show more

Help me understand this report
View preprint versions

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

0
10
0

Year Published

2022
2022
2023
2023

Publication Types

Select...
4
1
1

Relationship

1
5

Authors

Journals

citations
Cited by 14 publications
(10 citation statements)
references
References 39 publications
0
10
0
Order By: Relevance
“…It is specifically derived from recent work on a functional tensor language for automatic differentiation [Bernstein et al 2020], which we have extended with features like reshape operators to express a richer space of implementation details relevant to performance optimization. Concurrent work on Glenside [Smith et al 2021] attempts to capture some similar implementation details by augmenting a functional tensor language with an algebra of łaccess patterns. ž…”
Section: Related Workmentioning
confidence: 99%
See 1 more Smart Citation
“…It is specifically derived from recent work on a functional tensor language for automatic differentiation [Bernstein et al 2020], which we have extended with features like reshape operators to express a richer space of implementation details relevant to performance optimization. Concurrent work on Glenside [Smith et al 2021] attempts to capture some similar implementation details by augmenting a functional tensor language with an algebra of łaccess patterns. ž…”
Section: Related Workmentioning
confidence: 99%
“…One popular approach is phrasing optimizations as transformations within a single source or intermediate language; the most common kind of transformation is a rewrite rule, a quantified term equality. There have been several success stories, including in Elevate [Fu et al 2021], Glenside [Smith et al 2021], and others [Kommrusch et al 2021;Steuwer et al 2015]. A typical such project presents rewrite rules as axioms and then studies engines to apply them effectively.…”
Section: Introductionmentioning
confidence: 99%
“…Compiler IR pattern Compiler IR pattern front-end and the code-generation capability provided by the TVM framework [14]. For instruction selection, it leverages the rewrite rules and the equality saturation engine provided by Glenside and egg [68,83]. The ILA-models of accelerators, the validation of IR-accelerator mappings, and compilation-results validation at the application level are powered by ILA-based methods in ILAng [35].…”
Section: Rewrite Rulesmentioning
confidence: 99%
“…We leverage the egg library for equality saturation in our prototype [83]. First, the input program is translated from Relay to Glenside, a pure (side effectfree) tensor program representation that supports specifying rewrite rules for tensor programs [68]. Next, with both the compiler IR rewrites and IR-accelerator rewrites provided in Glenside, the equality saturation engine explores the space of possible rewrites as discussed in § 2.2.…”
Section: Prototype Implementationmentioning
confidence: 99%
See 1 more Smart Citation