AI Chat Paper
Note: Please note that the following content is generated by AMiner AI. SciOpen does not take any responsibility related to this content.
{{lang === 'zh_CN' ? '文章概述' : 'Summary'}}
{{lang === 'en_US' ? '中' : 'Eng'}}
Chat more with AI
Article Link
Collect
Submit Manuscript
Show Outline
Outline
Show full outline
Hide outline
Outline
Show full outline
Hide outline
Regular Paper

VTensor: Using Virtual Tensors to Build a Layout-Oblivious AI Programming Framework

Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China
School of Computer Science and Technology, University of Chinese Academy of Sciences, Beijing 100080, China
School of Computer Science and Engineering, University of New South Wales, Sydney 1466, Australia
Show Author Information

Abstract

Tensors are a popular programming interface for developing artificial intelligence (AI) algorithms. Layout refers to the order of placing tensor data in the memory and will affect performance by affecting data locality; therefore the deep neural network library has a convention on the layout. Since AI applications can use arbitrary layouts, and existing AI systems do not provide programming abstractions to shield the layout conventions of libraries, operator developers need to write a lot of layout-related code, which reduces the efficiency of integrating new libraries or developing new operators. Furthermore, the developer assigns the layout conversion operation to the internal operator to deal with the uncertainty of the input layout, thus losing the opportunity for layout optimization. Based on the idea of polymorphism, we propose a layout-agnostic virtual tensor programming interface, namely the VTensor framework, which enables developers to write new operators without caring about the underlying physical layout of tensors. In addition, the VTensor framework performs global layout inference at runtime to transparently resolve the required layout of virtual tensors, and runtime layout-oriented optimizations to globally minimize the number of layout transformation operations. Experimental results demonstrate that with VTensor, developers can avoid writing layout-dependent code. Compared with TensorFlow, for the 16 operations used in 12 popular networks, VTensor can reduce the lines of code (LOC) of writing a new operation by 47.82% on average, and improve the overall performance by 18.65% on average.

Electronic Supplementary Material

Download File(s)
JCST-2103-11457-Highlights.pdf (1.3 MB)

References

【1】
【1】
 
 
Journal of Computer Science and Technology
Pages 1074-1097

{{item.num}}

Comments on this article

Go to comment

< Back to all reports

Review Status: {{reviewData.commendedNum}} Commended , {{reviewData.revisionRequiredNum}} Revision Required , {{reviewData.notCommendedNum}} Not Commended Under Peer Review

Review Comment

Close
Close
Cite this article:
Yu F, Zhao J-C, Cui H-M, et al. VTensor: Using Virtual Tensors to Build a Layout-Oblivious AI Programming Framework. Journal of Computer Science and Technology, 2023, 38(5): 1074-1097. https://doi.org/10.1007/s11390-022-1457-6

911

Views

1

Crossref

0

Web of Science

1

Scopus

0

CSCD

Received: 19 March 2021
Accepted: 12 April 2022
Published: 30 September 2023
© Institute of Computing Technology, Chinese Academy of Sciences 2023