Abstract
Most implementations of machine learning algorithms are based on special-purpose frameworks such as TensorFlow or PyTorch. While these frameworks are convenient to use, they introduce multi-million lines of code dependency that one has to trust, understand and potentially modify. As an alternative, this paper investigates a direct implementation of a state of the art Convolutional Neural Network (CNN) in an array language. While our implementation requires 150 lines of code to define the special-purpose operators needed for CNNs, which are readily provided through frameworks such as TensorFlow and PyTorch, our implementation outperforms these frameworks by factors 2 and 3 on a fixed set of hardware - a 64-core GPU-accelerated machine; for a simple example network. The resulting specification is written in a rank-polymorphic data-parallel style, and it can be immediately leveraged by optimising compilers. Indeed, array languages make neural networks fast.
Author supplied keywords
Cite
CITATION STYLE
Šinkarovs, A., Vießmann, H. N., & Scholz, S. B. (2021). Array languages make neural networks fast. In ARRAY 2021 - Proceedings of the 7th ACM SIGPLAN International Workshop on Libraries, Languages and Compilers for Array Programming, co-located with PLDI 2021 (pp. 39–50). Association for Computing Machinery, Inc. https://doi.org/10.1145/3460944.3464312
Register to see more suggestions
Mendeley helps you to discover research relevant for your work.