WG211/M20Scholz

From WG 2.11
Jump to: navigation, search

Tensor Comprehensions in SaC

Array comprehensions in principle are well established within the programming language community. When it comes to catering not only for arrays of fixed dimensionalities but for shape-invariant specifications as well, things become more challenging. The generality of such shape-invariant array expressions often requires complex and thus potentially error-prone boundary specifications of index ranges as well as non-trivial shape specifications.

In this talk, we propose a new form of array comprehensions named "Tensor Comprehensions" which allows such bounds and shapes to be partially or fully compiler inferred. In contrast to earlier work, this work builds on sophisticated partial evaluation technology to ensure a higher degree of shape and boundary inference than before.

The resulting notation combines the basic principle of array-comprehensions with syntactical shortcuts very close to those found in the so-called Tensor Notations used in Physics and Mathematics. As a result, complex operators with rich semantics can be defined more concisely than before.