张量操作语言的建模
Modeling of languages for tensor manipulation
摘要:
数值应用以及最近的机器学习应用依赖于通常被组织成多维张量的高维数据。许多现有的框架、库和领域特定语言都支持开发用于操作张量和张量表达式的高效代码。然而,实际使用的这种框架和语言往往缺乏正式的规范。本报告正式定义了一种用于表达张量运算的模型语言。模型语言很简单,但足够通用,因此它捕获了大多数现有语言和框架常见的基本张量操作。它表明,给定的形式语义是明智的,在这个意义上,良好类型的程序在模型语言正确执行,没有错误。此外,模型语言的替代实现形式化定义。替代实现将填充引入到张量的存储中,这可能有利于现代硬件平台上的性能。基于它们的形式定义,模型语言的原始实现和填充实现被证明是等价的。最后,一些可能的扩展所提出的模型语言的张量操作进行了讨论。
英文摘要:
Numerical applications and, more recently, machine learning applications rely on high-dimensional data that is typically organized into multi-dimensional tensors. Many existing frameworks, libraries, and domain-specific languages support the development of efficient code for manipulating tensors and tensor expressions. However, such frameworks and languages that are used in practice often lack formal specifications. The present report formally defines a model language for expressing tensor operations. The model language is simple and yet general enough so that it captures the fundamental tensor operations common to most existing languages and frameworks. It is shown that the given formal semantics are sensible, in the sense that well-typed programs in the model language execute correctly, without error. Moreover, an alternative implementation of the model language is formally defined. The alternative implementation introduces padding into the storage of tensors, which may benefit performance on modern hardware platforms. Based on their formal definitions, the original implementation of the model language and the implementation with padding are proven equivalent. Finally, some possible extensions of the presented model language for tensor manipulation are discussed.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。