The convolution is a crucial and computationally intensive operation in machine learning models. Under limited resource and energy budget constraints, vector accelerators are gaining popularity due to their high performance and low power consumption. However, three challenges are of concern to efficiently implement the convolution on vector accelerators. (1) A lot of extra memory may be generated during the data conversion process of traditional matrix multiplication-based convolution algorithms. (2) It has been laborious and error-prone to employ manual vectorization methods. (3) Some existing deep learning compilers (e.g., TVM) have limited adaptability in handling convolutions of different sizes. Therefore, the VConv is proposed in this study. This is an automatic tiled convolution algorithm based on the MLIR code-generation toolchain that can be integrated into machine-learning compilers. It consists of three key components. (1) The data format conversion method, which can avoid the extra memory and data conversion overhead. (2) The automatic tiling algorithm, which can reduce data transfer and improve resource utilization efficiency. (3) The algorithm that automatically generates vectorized kernel code. Experimental results show that the VConv can achieve a computational efficiency of up to 80% on convolutions of different sizes. Besides, the VConv achieves 5 \(\times \) to 15 \(\times \) in computational efficiency and 2 \(\times \) to 3 \(\times \) in energy efficiency in performing convolutions of the AlexNet, the GoogleNet, the VGG16, the YOLOv5s, and the ResNet50 compared to the state-of-the-art methods. Simultaneously, the VConv method has good adaptability and high efficiency, making it more valuable in practical applications.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

VConv: Autotiling Convolution Algorithm Based on MLIR for Multi-core Vector accelerators

  • Xiaorong Chen,
  • Cheng Li,
  • Zhong Liu

摘要

The convolution is a crucial and computationally intensive operation in machine learning models. Under limited resource and energy budget constraints, vector accelerators are gaining popularity due to their high performance and low power consumption. However, three challenges are of concern to efficiently implement the convolution on vector accelerators. (1) A lot of extra memory may be generated during the data conversion process of traditional matrix multiplication-based convolution algorithms. (2) It has been laborious and error-prone to employ manual vectorization methods. (3) Some existing deep learning compilers (e.g., TVM) have limited adaptability in handling convolutions of different sizes. Therefore, the VConv is proposed in this study. This is an automatic tiled convolution algorithm based on the MLIR code-generation toolchain that can be integrated into machine-learning compilers. It consists of three key components. (1) The data format conversion method, which can avoid the extra memory and data conversion overhead. (2) The automatic tiling algorithm, which can reduce data transfer and improve resource utilization efficiency. (3) The algorithm that automatically generates vectorized kernel code. Experimental results show that the VConv can achieve a computational efficiency of up to 80% on convolutions of different sizes. Besides, the VConv achieves 5 \(\times \) to 15 \(\times \) in computational efficiency and 2 \(\times \) to 3 \(\times \) in energy efficiency in performing convolutions of the AlexNet, the GoogleNet, the VGG16, the YOLOv5s, and the ResNet50 compared to the state-of-the-art methods. Simultaneously, the VConv method has good adaptability and high efficiency, making it more valuable in practical applications.