用现成 LLM 估算 GPU Roofline 算术强度:Compiler Artifacts 让准确率从 8-14% 提到 26-32%
Estimating GPU Roofline Arithmetic Intensity with Off-the-Shelf LLMs and Compiler Artifacts
没机器也能估 GPU 内核是算力瓶颈还是带宽瓶颈,编译器产物喂给 LLM 后分类正确率能到 78-92%。做 CUDA/HIP 性能优化的开发者可以先拿 LLM 筛出值得跑 profile 的内核,省下排队等卡的时间;但显存流量估算还不准,别直接当最终结论用。
一篇 arXiv 论文测试了 deepseek-v4-flash、gemini-3.7-flash 和 gpt-5.6-sol 三款现成 LLM,能否在不实际执行 GPU 工作负载的情况下估算 Roofline 算术强度(FLOPs 与显存字节数之比)。实验覆盖 179 种组合:5 个内核家族、4 块 NVIDIA 与 AMD GPU、CUDA/HIP/OpenMP/OpenCL 四种并行运行时,并比较了纯源码查询、加入编译器产物查询、沙箱化 agentic 分析三种方式。
结果显示,加入编译器产物后,算术强度估算落在实测值 1.20 倍容差内的比例从 8-14% 提升到 26-32%,带宽瓶颈与计算瓶颈的分类正确率达 78-92%;FLOP 估算有 59-88% 的运行满足 1.20 倍容差,而显存流量只有 36-40%。agentic 分析让 gpt-5.6-sol 的容差内比例再升 6.5 个百分点,但代价是成本为编译器辅助查询的 3.6 倍、延迟 2.5 倍,另外两个模型成本更高且提升不显著。
论文指出,在缺乏目标 GPU 时,LLM 估算可用于排序优化优先级;缓存依赖的显存流量是精确预测算术强度的最大障碍。
Estimating GPU Roofline Arithmetic Intensity with Off-the-Shelf LLMs and Compiler Artifacts
GPU developers use profiling to understand computation and data movement, but access to target hardware can delay optimization. We investigate whether off-the-shelf large language models (LLMs) can estimate Roofline arithmetic intensity (the ratio of floating-point operations (FLOPs) to device-memory bytes) without executing the target GPU workload. We evaluate three models (deepseek-v4-flash, gemini-3.7-flash, and gpt-5.6-sol) across 179 combinations of five kernel families, four NVIDIA and AMD GPUs, four parallel runtimes (CUDA, HIP, OpenMP, and OpenCL), and modified code variants, comparing source-only queries, queries with compiler artifacts, and sandboxed agentic analysis. Compiler artifacts raise the share of arithmetic-intensity estimates within a factor of 1.20 of profiled values from 8-14% to 26-32%, while the resulting bandwidth-bound or compute-bound classifications are correct in 78-92% of runs. With compiler artifacts, FLOP estimates meet the 1.20x tolerance in 59-88% of runs, compared with 36-40% for device-memory traffic. Agentic analysis increases the share of arithmetic-intensity estimates within the 1.20x tolerance by 6.5 percentage points for gpt-5.6-sol, at 3.6x the median cost and 2.5x the median latency of compiler-assisted queries; the other models incur higher costs without a statistically clear improvement. These findings suggest LLM estimates could help prioritize optimization when GPU access is constrained, while identifying cache-dependent device-memory traffic as the main obstacle to precise arithmetic-intensity prediction.
本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:GPU、Roofline、DeepSeek、GPT,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。
信源核验说明:本文原始信息发布自一手权威信源「arXiv: DeepSeek」(Tier-1 一手发布),具备高确定性参考价值。