<p>With the growing importance of convolution in deep learning, the development of efficient convolution algorithms has become an urgent requirement. DCU(Deep Computing Unit), as an emerging GPU-like accelerator, has a relatively underdeveloped deep learning ecosystem. Therefore, this study focuses on developing efficient convolution operators for DCU. Using DCU hardware, diverse memory access patterns are created and fine thread rearrangements are performed at the warp and thread levels to optimize memory access patterns, improve computational efficiency, and improve data layout. Based on redesigned memory access patterns, the more efficient Implicit GEMM and Winograd <InlineEquation ID="IEq1"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42514_2024_205_Article_IEq1.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="39" /> </InlineMediaObject> <EquationSource Format="TEX">\(3\times 3\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>3</mn> <mo>×</mo> <mn>3</mn> </mrow> </math></EquationSource> </InlineEquation> convolution algorithms are successfully implemented on the DCU. In addition, load partitioning is also improved through multiple techniques. Finally, a heuristic strategy selection module is developed that can determine the optimal computation method based on the scale of convolution. A series of tests are conducted on DCU, and it is compared with MIOpen. The results demonstrate that the optimized algorithm can achieve a maximum improvement of <InlineEquation ID="IEq2"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42514_2024_205_Article_IEq2.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="46" /> </InlineMediaObject> <EquationSource Format="TEX">\(2.32 \times\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>2.32</mn> <mo>×</mo> </mrow> </math></EquationSource> </InlineEquation>, and the average speedup ratio is <InlineEquation ID="IEq3"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42514_2024_205_Article_IEq3.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="46" /> </InlineMediaObject> <EquationSource Format="TEX">\(1.29\times\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>1.29</mn> <mo>×</mo> </mrow> </math></EquationSource> </InlineEquation>, which fully demonstrates the efficiency of our method in implementing the <InlineEquation ID="IEq4"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="42514_2024_205_Article_IEq4.gif" Format="GIF" Height="14" Rendition="HTML" Resolution="72" Type="Linedraw" Width="39" /> </InlineMediaObject> <EquationSource Format="TEX">\(3 \times 3\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mn>3</mn> <mo>×</mo> <mn>3</mn> </mrow> </math></EquationSource> </InlineEquation> convolution algorithm on DCU.</p>

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

Optimizing 2D convolution for DCUs

  • Wenlong Fan,
  • Haobo Hua,
  • Jiandong Shang,
  • Zhuxin Wen,
  • Hengliang Guo,
  • Litao Zhang

摘要

With the growing importance of convolution in deep learning, the development of efficient convolution algorithms has become an urgent requirement. DCU(Deep Computing Unit), as an emerging GPU-like accelerator, has a relatively underdeveloped deep learning ecosystem. Therefore, this study focuses on developing efficient convolution operators for DCU. Using DCU hardware, diverse memory access patterns are created and fine thread rearrangements are performed at the warp and thread levels to optimize memory access patterns, improve computational efficiency, and improve data layout. Based on redesigned memory access patterns, the more efficient Implicit GEMM and Winograd \(3\times 3\) 3 × 3 convolution algorithms are successfully implemented on the DCU. In addition, load partitioning is also improved through multiple techniques. Finally, a heuristic strategy selection module is developed that can determine the optimal computation method based on the scale of convolution. A series of tests are conducted on DCU, and it is compared with MIOpen. The results demonstrate that the optimized algorithm can achieve a maximum improvement of \(2.32 \times\) 2.32 × , and the average speedup ratio is \(1.29\times\) 1.29 × , which fully demonstrates the efficiency of our method in implementing the \(3 \times 3\) 3 × 3 convolution algorithm on DCU.