Hier finden Sie wissenschaftliche Publikationen aus den Fraunhofer-Instituten.

Fast higher-order functions for tensor calculus with tensors and subtensors

: Bassoy, Cem; Schatz, Volker


Shi, Y.:
Computational science - ICCS 2018. 18th International Conference. Pt.1 : Wuxi, China, June 11-13, 2018; Proceedings
Cham: Springer International Publishing, 2018 (Lecture Notes in Computer Science 10860)
ISBN: 978-3-319-93697-0 (Print)
ISBN: 978-3-319-93698-7 (Online)
Annual International Conference on Computational Science (ICCS) <18, 2018, Wuxi>
Fraunhofer IOSB ()

Tensors analysis has become a popular tool for solving problems in computational neuroscience, pattern recognition and signal processing. Similar to the two-dimensional case, algorithms for multidimensional data consist of basic operations accessing only a subset of tensor data. With multiple offsets and step sizes, basic operations for subtensors require sophisticated implementations even for entrywise operations.
In this work, we discuss the design and implementation of optimized higher-order functions that operate entrywise on tensors and subtensors with any non-hierarchical storage format and arbitrary number of dimensions. We propose recursive multi-index algorithms with reduced index computations and additional optimization techniques such as function inlining with partial template specialization. We show that single-index implementations of higher-order functions with subtensors introduce a runtime penalty of an order of magnitude than the recursive and iterative multi-index versions. Including data- and thread-level parallelization, our optimized implementations reach 68% of the maximum throughput of an Intel Core i9-7900X. In comparison with other libraries, the average speedup of our optimized implementations is up to 5x for map-like and more than 9x for reduce-like operations. For symmetric tensors we measured an average speedup of up to 4x.