Современные информационные технологии и IT-образование (Dec 2022)

Implementation of (λ, µ)-Convolution Product by Means of Tensordot Operation from Libraries for Tensor Algebra

  • Evgeniy I. Goncharov

DOI
https://doi.org/10.25559/SITITO.18.202204.781-789
Journal volume & issue
Vol. 18, no. 4
pp. 781 – 789

Abstract

Read online

Multidimensional matrix algebra is a successful data model for problems from a variety of subject areas. Many authors have described hardware and software complexes that implement the algebra of multidimensional matrices in its entirety or parallel algorithms of (λ, µ)-convolution product to solve a specific problem. Their implementation requires considerable labor, and the use of knowledge and installation of certain frameworks and compilers. Nevertheless, in the process of research, it is often useful to “test” the assumption on special cases, which may quickly give a counterexample. The article is devoted to the creation of such a tool for applied research. Python-programs are easy to write, thanks to the syntax, and have an extensive selection of various libraries. Among them, a special place is occupied by libraries for fast calculations: NumPy, CuPy, PyTorch, TensorFlow. They can provide sufficient computing speed on both CPU and GPU, and have significant functionality for working with multidimensional objects, although they do not implement a (λ, µ)-convolution product. The article shows that the operation (0, µ)-convolution product from the algebra of multidimensional matrices exactly coincides with the tensordot(A, B, µ) operation from python-libraries for tensor algebra. The article contains the results of an experiment comparing the calculation speed of this operation in different libraries. The author introduces a parallel algorithm for multiplying multidimensional matrices, reducing the (λ, µ)-convolution product to a sequence of (0, µ)-convolution products that can be performed in parallel. This actually reduces a complex task to a parallel call of the tensordot function. The article contains a detailed description of the program implementing the algorithm and the results of its testing in different runtime environments.

Keywords