• library_booksThe Tensor Algebra Compiler  Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe
    Tensor algebra is a powerful tool with applications in machine learning, data analytics, engineering and the physical sciences. Tensors are often sparse and compound operations must frequently be computed in a single kernel for performance and to save memory. Programmers are left to write kernels for every operation of interest, with different mixes of dense and sparse tensors in different formats. The combinations are infinite, which makes it impossible to manually implement and optimize them all. This paper introduces the first compiler technique to automatically generate kernels for any compound tensor algebra operation on dense and sparse tensors. The technique is implemented in a C++ library called taco. Its performance is competitive with best-in-class hand-optimized kernels in popular libraries, while supporting far more tensor operations.
     author = {Kjolstad, Fredrik and Kamil, Shoaib and Chou, Stephen and Lugato, David and Amarasinghe, Saman},
     title = {The Tensor Algebra Compiler},
     journal = {Proc. ACM Program. Lang.},
     issue_date = {October 2017},
     volume = {1},
     number = {OOPSLA},
     month = oct,
     year = {2017},
     issn = {2475-1421},
     pages = {77:1--77:29},
     articleno = {77},
     numpages = {29},
     url = {},
     doi = {10.1145/3133901},
     acmid = {3133901},
     publisher = {ACM},
     address = {New York, NY, USA},
     keywords = {code generation, iteration graphs, linear algebra, merge lattices, parallelism, performance, sparse data structures, tensor algebra, tensors},