Pure Tensor Program Rewriting via Access Patterns (Representation Pearl)

05/19/2021
by   Gus Henry Smith, et al.
0

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 – 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 . Glenside establishes a new foundation for exploring further term rewriting techniques in optimizing low-level tensor programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/27/2021

HIR: An MLIR-based Intermediate Representation for Hardware Accelerator Description

The emergence of machine learning, image and audio processing on edge de...
research
04/10/2021

Joint Program and Layout Transformations to enable Convolutional Operators on Specialized Hardware based on Constraint Programming

The success of Deep Artificial Neural Networks (DNNs) in many domains cr...
research
02/16/2023

Updates on the Low-Level Abstraction of Memory Access

Choosing the best memory layout for each hardware architecture is increa...
research
03/14/2019

Stripe: Tensor Compilation via the Nested Polyhedral Model

Hardware architectures and machine learning (ML) libraries evolve rapidl...
research
06/08/2021

LLAMA: The Low-Level Abstraction For Memory Access

The performance gap between CPU and memory widens continuously. Choosing...
research
04/04/2020

The Collection Virtual Machine: An Abstraction for Multi-Frontend Multi-Backend Data Analysis

Getting the best performance from the ever-increasing number of hardware...
research
01/30/2023

Operator Fusion in XLA: Analysis and Evaluation

Machine learning (ML) compilers are an active area of research because t...

Please sign up or login with your details

Forgot password? Click here to reset