ChatPaper.aiChatPaper

CASS:从Nvidia到AMD的跨平台转换——数据、模型与基准测试

CASS: Nvidia to AMD Transpilation with Data, Models, and Benchmark

May 22, 2025
作者: Ahmed Heakl, Sarim Hashmi, Gustavo Bertolo Stahl, Seung Hun Eddie Han, Salman Khan, Abdulrahman Mahmoud
cs.AI

摘要

我们推出了CASS,这是首个面向跨架构GPU代码转译的大规模数据集与模型套件,涵盖源级(CUDA ↔ HIP)和汇编级(Nvidia SASS ↔ AMD RDNA3)的翻译任务。该数据集包含7万对经过验证的主机与设备代码对,填补了低层级GPU代码可移植性研究的关键空白。依托这一资源,我们训练了CASS系列领域专用语言模型,实现了95%的源代码翻译准确率和37.5%的汇编代码翻译准确率,显著超越了GPT-4o、Claude和Hipify等商业基线模型。在超过85%的测试案例中,我们生成的代码与原生代码性能相当,保持了运行时和内存行为的一致性。为了支持严谨的评估,我们引入了CASS-Bench,这是一个精心策划的基准测试集,覆盖16个GPU应用领域,并提供了真实执行结果。所有数据、模型及评估工具均已开源,旨在推动GPU编译器工具、二进制兼容性以及基于大语言模型的硬件翻译研究进展。数据集与基准测试集可在https://huggingface.co/datasets/MBZUAI/cass{blue{HuggingFace}}获取,代码则发布于https://github.com/GustavoStahl/CASS{blue{GitHub}}。
English
We introduce CASS, the first large-scale dataset and model suite for cross-architecture GPU code transpilation, targeting both source-level (CUDA leftrightarrow HIP) and assembly-level (Nvidia SASS leftrightarrow AMD RDNA3) translation. The dataset comprises 70k verified code pairs across host and device, addressing a critical gap in low-level GPU code portability. Leveraging this resource, we train the CASS family of domain-specific language models, achieving 95% source translation accuracy and 37.5% assembly translation accuracy, substantially outperforming commercial baselines such as GPT-4o, Claude, and Hipify. Our generated code matches native performance in over 85% of test cases, preserving runtime and memory behavior. To support rigorous evaluation, we introduce CASS-Bench, a curated benchmark spanning 16 GPU domains with ground-truth execution. All data, models, and evaluation tools are released as open source to foster progress in GPU compiler tooling, binary compatibility, and LLM-guided hardware translation. Dataset and benchmark are on https://huggingface.co/datasets/MBZUAI/cass{blue{HuggingFace}}, with code at https://github.com/GustavoStahl/CASS{blue{GitHub}}.

Summary

AI-Generated Summary

PDF12May 28, 2025