Compiling Tensor Expressions into Einsum

Published: 01 Jan 2023, Last Modified: 13 May 2025ICCS (2) 2023EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Tensors are a widely used representations of multidimensional data in scientific and engineering applications. However, efficiently evaluating tensor expressions is still a challenging problem, as it requires a deep understanding of the underlying mathematical operations. While many linear algebra libraries provide an Einsum function for tensor computations, it is rarely used, because Einsum is not yet common knowledge. Furthermore, tensor expressions in textbooks and scientific articles are often given in a form that can be implemented directly by using nested for-loops. As a result, many tensor expressions are evaluated using inefficient implementations. For making the direct evaluation of tensor expressions multiple orders of magnitude faster, we present a tool that automatically maps tensor expressions to highly tuned linear algebra libraries by leveraging the power of Einsum. Our tool is designed to simplify the process of implementing efficient tensor expressions, and thus making it easier to work with complex multidimensional data.
Loading