不修改权重,通过数学重写让卷积模型适配GPU硬件对齐要求。
Hardware-Aware Reformulation of Convolutions for Efficient Execution on Specialized AI Hardware: A Case Study on NVIDIA Tensor Cores
- 用重写规则重构卷积计算,无需零填充即可满足硬件对齐
- 在NVIDIA Tensor Cores上实现高效执行,无需训练时调整
- 为模型部署提供可扩展的硬件感知优化路径,适合芯片级部署者
卷积神经网络(CNN)是现代AI的核心,但其性能常受硬件限制。例如,NVIDIA Tensor Cores要求输入通道数为8的倍数,有时还需512的倍数才能高效运行;CPU上的oneDNN框架在块格式下也存在类似约束。传统方法通过零填充解决对齐问题,但效率较低。本文提出一种首次硬件感知的卷积重写方法,通过数学重构,在不修改网络权重的前提下,完全在推理阶段满足硬件对齐要求。当前实现聚焦于Tensor Cores的单一变换,但该方法具有通用性,为探索适用于CPU和加速器的其他变换奠定基础。本研究是迈向‘语义调优’——一种系统性、硬件感知的CNN模型部署优化策略的重要一步。
原文摘要 · Abstract (English)
Convolutional Neural Networks (CNNs) are central to modern AI, but their performance is often limited by hardware constraints. NVIDIA Tensor Cores, for instance, require input channels to be multiples of 8 and sometimes 512 for efficient execution. {\em oneDNN} framework for CPU imposes such a requirement for the blocked format. Traditional approaches address such alignment issue using zero-padding, which can be inefficient. In this work, we present a first-step, hardware-aware reformulation of CNN computations using rewrite rules, restructuring the underlying math to satisfy hardware alignment entirely {\bf post-training} without modifying network weights. While our current implementation focuses on a single transformation for Tensor Cores, this approach is generalizable, laying the foundation to explore additional transformations for CPU and accelerators. This study represents an initial step toward {\em semantic tuning}, a systematic, hardware-aware optimization strategy for efficient deployment of CNN models on specialized AI hardware.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。