图超优化的迁移效果如何?将张量图超优化器适配到基于Triton的NPU
How well does graph superoptimization transfer? Adapting tensor-graph superoptimizer to a Triton-based NPU
AI总结:
该研究将面向CUDA的Mirage适配到基于Triton的NPU,发现图级超优化可迁移且在部分工作负载上性能提升最高达87.0%,但受张量形状等影响存在退化,需加入目标特定机制。
摘要:
对于自动优化系统而言,在日益多样化的AI加速器上实现性能可移植性仍是一项挑战。我们通过将Mirage从面向CUDA的设计适配到基于Triton编译栈的华为昇腾910B3,研究图级超优化在不同架构间的迁移效果。我们在与Transformer相关的工作负载上评估该适配后的系统,包括矩阵乘法、Softmax、RMSNorm+MatMul、门控MLP、FNN及注意力机制。结果表明,图级优化可成功迁移,在融合工作负载上较现有参考实现最高提升87.0%;但性能高度依赖张量形状与工作负载结构,其他配置会出现显著性能退化。我们发现目标特定的张量划分、执行资源建模、后端 lower 与融合,以及搜索和验证成本是关键限制因素。研究表明,可移植的图表示与编程模型并不意味着可移植的优化空间,这促使在原本可复用的编译器基础设施中加入模块化的目标特定机制。
英文摘要:
For automatic optimization systems, performance portability across increasingly diverse AI accelerators remains a challenge. We investigate how well graph-level superoptimization transfers across architectures by adapting Mirage from its CUDA-oriented design to the Huawei Ascend 910B3 through a Triton-based compilation stack. We evaluate the adapted system on transformer-relevant workloads, including matrix multiplication, softmax, RMSNorm+MatMul, gated MLP, FNN, and attention. The results show that graph-level optimization can successfully transfer and outperform available reference implementations by up to 87.0% on fused workloads. However, performance is highly dependent on tensor shape and workload structure, with substantial regressions for other configurations. We identify target-specific tensor partitioning, execution-resource modeling, backend lowering and fusion, and search and verification costs as key limitations. Our findings demonstrate that a portable graph representation and programming model do not imply a portable optimization space, motivating modular target-specific mechanisms within otherwise reusable compiler infrastructure.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。