首个跨架构GPU代码翻译数据集与模型,支持CUDA与HIP、SASS与RDNA3互译。
CASS: Nvidia to AMD Transpilation with Data, Models, and Benchmark
- 构建60k条验证过的源码与汇编代码对,实现跨指令集和运行时的翻译。
- 翻译准确率达88.2%(CUDA→HIP)和69.1%(SASS→RDNA3),生成代码85%达原生性能。
- 适合研究者与开发者用于提升GPU代码可移植性,尤其关注异构计算与编译器优化。
跨架构GPU代码翻译对实现底层硬件可移植性至关重要,但目前尚无可扩展解决方案。我们提出CASS,首个面向源码与汇编级GPU翻译(CUDA<-->HIP,SASS<-->RDNA3)的数据集与模型套件。CASS包含60,000条经验证的主机-设备代码对,支持基于学习的跨指令集和运行时边界翻译。每条样本通过自动化流水线生成:抓取、翻译、编译并同步不同厂商栈的程序。基于CASS,我们训练了多个领域专用翻译模型,在CUDA→HIP任务上达到88.2%准确率,SASS→RDNA3任务上达69.1%,显著优于GPT-5.1、Claude-4.5及Hipify等商业基线。生成代码在85%情况下保持原生性能,运行时与内存行为一致。为支持严谨评估,我们引入CASS-Bench,涵盖18个GPU领域、带真实执行结果的基准测试。所有数据、模型与评估工具将开源,推动GPU编译器工具链、二进制兼容性与大模型辅助代码翻译的发展。
原文摘要 · Abstract (English)
Cross-architecture GPU code transpilation is essential for unlocking low-level hardware portability, yet no scalable solution exists. We introduce CASS, the first dataset and model suite for source- and assembly-level GPU translation (CUDA <--> HIP, SASS <--> RDNA3). CASS contains 60k verified host-device code pairs, enabling learning-based translation across both ISA and runtime boundaries. We generate each sample using our automated pipeline that scrapes, translates, compiles, and aligns GPU programs across vendor stacks. Leveraging CASS, we train a suite of domain-specific translation models that achieve 88.2% accuracy on CUDA -> HIP and 69.1% on SASS -> RDNA3, outperforming commercial baselines including GPT-5.1, Claude-4.5, and Hipify by wide margins. Generated code matches native performance in 85% of cases, preserving both runtime and memory behavior. To support rigorous evaluation, we introduce CASS-Bench, a curated benchmark spanning 18 GPU domains with ground-truth execution. All data, models, and evaluation tools will be released as open source to support progress in GPU compiler tooling, binary compatibility, and LLM-guided code translation.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。