The Continuous Tensor Abstraction: Where Indices are Real

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Won, Jaeyeon, Ahrens, Willow, Collin, Teodoro Fields, Emer, Joel S., Amarasinghe, Saman
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866915568199663616
author Won, Jaeyeon
Ahrens, Willow
Collin, Teodoro Fields
Emer, Joel S.
Amarasinghe, Saman
author_facet Won, Jaeyeon
Ahrens, Willow
Collin, Teodoro Fields
Emer, Joel S.
Amarasinghe, Saman
contents This paper introduces the continuous tensor abstraction, allowing indices to take real-number values (for example, A[3.14]). It also presents continuous tensor algebra expressions, such as C(x,y) = A(x,y) * B(x,y), where indices are defined over a continuous domain. This work expands the traditional tensor model to include continuous tensors. Our implementation supports piecewise-constant tensors, enabling infinite domains to be processed in finite time. We also introduce a new tensor format for efficient storage and a code generation technique for automatic kernel generation. For the first time, our abstraction expresses domains like computational geometry and computer graphics in the language of tensor programming. Our approach demonstrates competitive or better performance than hand-optimized kernels in leading libraries across diverse applications. Compared to hand-implemented libraries on a CPU, our compiler-based implementation achieves an average speedup of 9.20x on 2D radius search with approximately 60x fewer lines of code (LoC), 1.22x on genomic interval overlapping queries (with approximately 18x LoC saving), and 1.69x on trilinear interpolation in Neural Radiance Field (with approximately 6x LoC saving).
format Preprint
id arxiv_https___arxiv_org_abs_2407_01742
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle The Continuous Tensor Abstraction: Where Indices are Real
Won, Jaeyeon
Ahrens, Willow
Collin, Teodoro Fields
Emer, Joel S.
Amarasinghe, Saman
Programming Languages
This paper introduces the continuous tensor abstraction, allowing indices to take real-number values (for example, A[3.14]). It also presents continuous tensor algebra expressions, such as C(x,y) = A(x,y) * B(x,y), where indices are defined over a continuous domain. This work expands the traditional tensor model to include continuous tensors. Our implementation supports piecewise-constant tensors, enabling infinite domains to be processed in finite time. We also introduce a new tensor format for efficient storage and a code generation technique for automatic kernel generation. For the first time, our abstraction expresses domains like computational geometry and computer graphics in the language of tensor programming. Our approach demonstrates competitive or better performance than hand-optimized kernels in leading libraries across diverse applications. Compared to hand-implemented libraries on a CPU, our compiler-based implementation achieves an average speedup of 9.20x on 2D radius search with approximately 60x fewer lines of code (LoC), 1.22x on genomic interval overlapping queries (with approximately 18x LoC saving), and 1.69x on trilinear interpolation in Neural Radiance Field (with approximately 6x LoC saving).
title The Continuous Tensor Abstraction: Where Indices are Real
topic Programming Languages
url https://arxiv.org/abs/2407.01742