arrow
Return

UniTe: A Universal Tensor Abstraction for Capturing Spatial Relationships

delete2026-03-01
delete0
PRE
AI
R
Ray, Jessica *
T
Teodoro Collin
V
Vivienne Sze
R
Reuther, Albert
A
Amarasinghe, Saman
DOI:10.1145/3787218delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Tensors are an integral part of numerous domains, and while significant effort has been put into the design of tensor data structures in isolation, little attention has been paid to the relationships that exist across tensors and how this affects their representation and use. In this article, we focus on spatial relationships across tensors in a program, where such tensors are defined relative to a common reference coordinate system. These relationships are complicated by the fact that the tensors may differ in their representations, such as having variations in their axes, spacings, origins, and overall shape. Due to the lack of existing abstractions and language support for these types of tensor semantics, users are currently forced to manually perform the bookkeeping necessary to account for these varying relationships and representations. Unfortunately, we cannot rely on a simple library to capture these relationships, as computations on these types of tensors often happen at the innermost levels of programs; we find that the overheads associated with an unoptimized implementation quickly accumulate, leading to performance up to nearly 65x slower than a reference C implementation on a series of image and video compression benchmarks. In this article, we introduce the novel UniTe abstraction, which captures spatial relationships across all such tensors in a program. We also introduce two domain-specific languages and optimizing compilers, CoLa for Python and SHiM for C/C++, built off of UniTe. Both CoLa and SHiM provide users with an intuitive set of tensor primitives based on spatial relationships, hiding the complexity that goes into maintaining the tensors and computing accesses across them. In addition, we discuss the optimizations necessary to remove the associated abstraction overhead and describe their implementations. On the benchmarks, we show that both CoLa and SHiM successfully remove the overheads, achieving performance parity with existing C implementations.
Keywords:
Tensors
spatial operations
hierarchical relationships

Journal

A
ACM Transactions on Architecture and Code Optimization
IF:
1.8
Papers:
96
Citations:
1.1K

Organization

M
massachusetts institute of technology (mit)
Scholars:
1.4K
Papers: 622
Citations: 0
L
lincoln laboratory
Scholars:
962
Papers: 505
Citations: 0