TrainBridge:由GPU编译证据引导的智能体NPU训练优化
TrainBridge: Agentic NPU Training Optimization Guided by GPU Compilation Evidence
AI总结:
针对NPU训练中编译优化应用不全导致的低效问题,提出TrainBridge智能体方法,通过迁移GPU优化指导并结合迭代分析,在4类工作负载和27条Modded-NanoGPT记录上分别实现平均1.7倍、近2.0倍加速。
摘要:
我们研究如何提高昇腾NPU的训练效率。在研究的NPU训练程序中,算子融合等框架级编译优化仅部分应用,导致计算碎片化和可避免的执行开销。基于分析的调优可解决这些低效问题,但通常需要高昂的试错成本。为使NPU训练更高效,我们提出TrainBridge,一种将GPU优化指导迁移至NPU训练的智能体方法。TrainBridge利用成熟GPU编译栈产生的高度优化执行作为NPU调优的特定任务参考,从GPU训练执行中提取优化意图以指导NPU程序重写,并通过迭代分析进一步优化重写后的程序。我们的GPU到NPU迁移实验显示,TrainBridge在涵盖LLM预训练、图像分类和视觉语言训练的4种工作负载上实现平均1.7倍加速,在具有高度优化GPU实现的27条Modded-NanoGPT速通记录上实现平均近2.0倍加速。
英文摘要:
We study how to improve training efficiency on Ascend NPUs. In the NPU training programs we study, framework-level compilation optimizations such as operator fusion are only partially applied, leaving fragmented computation and avoidable execution overheads. Profiling-guided tuning can address these inefficiencies, but it often requires costly trial and error. To make training on NPUs more efficient, we propose TrainBridge, an agentic approach for transferring GPU optimization guidance to NPU training. TrainBridge uses the highly optimized execution produced by mature GPU compilation stacks as a task-specific reference for NPU tuning. It extracts optimization intents from the GPU training execution to guide NPU program rewrites and further refines the rewritten program through iterative profiling. Our GPU-to-NPU migration experiments show that TrainBridge achieves an average 1.7x speedup across four workloads covering LLM pretraining, image classification, and vision-language training, and an average speedup of nearly 2.0x across 27 Modded-NanoGPT speedrun records with highly optimized GPU implementations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。