arXiv:2511.18222cs.CVcs.LG2025-11

用MLIR设计可适配多架构的卷积优化算法,提升性能至峰值的67%。

Using MLIR Transform to Design Sliced Convolution Algorithm

  • 基于静态形状分析生成分块与数据布局策略,自动优化2D卷积。
  • 在ARM SME上达60%峰值性能,在Intel AVX512上达67%。
  • 模块化设计便于未来扩展,适合编译器开发者和加速器优化者。

本文提出SConvTransform,一种MLIR Transform方言扩展,用于优化MLIR中的2D卷积。其核心操作SConvOp通过完全声明式变换流程,将Linalg卷积降为分块并打包的通用操作。该过程由卷积切片分析指导,根据输入/滤波器形状及目标架构参数确定分块大小与数据布局策略。SConvOp通过拆分不规则区域并调整仿射映射处理边界情况。所有打包与分块操作均源自一组参数化仿射方程,实现可复用且可分析的变换。尽管本工作以功能正确性为主要目标,实验表明SConvTransform在不同目标架构上表现良好:应用于标准卷积配置时,生成代码在ARM SME上最高达到峰值性能的60%,在Intel AVX512上达67%。结果验证了在MLIR Transform方言中结合静态形状分析与结构化分块打包策略的有效性。此外,SConvTransform的模块化设计便于与未来扩展集成,支持通过MLIR可扩展编译基础设施持续优化卷积工作负载。

原文摘要 · Abstract (English)

This paper proposes SConvTransform, a Transform dialect extension that provides operations for optimizing 2D convolutions in MLIR. Its main operation, SConvOp, lowers Linalg convolutions into tiled and packed generic operations through a fully declarative transformation pipeline. The process is guided by a Convolution Slicing Analysis that determines tile sizes and data layout strategies based on input and filter shapes, as well as target architecture parameters. SConvOp handles edge cases by splitting irregular regions and adjusting affine maps where needed. All packing and tiling operations are derived from a parametric set of affine equations, enabling reusable and analyzable transformations. Although functional correctness was the primary goal of this work, the experimental evaluation demonstrates the effectiveness of SConvTransform, achieving good enough performance across different target architectures. Future work will focus on optimizing performance and porting to other target devices. When applied to standard convolution configurations, the generated code achieves up to 60% of peak performance on ARM SME and 67% on Intel AVX512. These results validate the benefit of combining static shape analysis with structured tiling and packing strategies within the MLIR Transform dialect. Furthermore, the modular design of SConvTransform facilitates integration with future extensions, enabling continued optimization of convolution workloads through MLIR's extensible compilation infrastructure.

卷积优化MLIR编译器

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。