[Environment Adaptation] Add sm_120 to Blackwell CUDA arch selection#79331
[Environment Adaptation] Add sm_120 to Blackwell CUDA arch selection#79331BostonSupremeMantou wants to merge 4 commits into
Conversation
|
|
a06d4c3 to
ceb2c94
Compare
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-06-18 11:16:46
📋 Review 摘要
PR 概述:为 Blackwell CUDA 架构选择补充 sm_120,并对 CUDA 12.8 以下工具链增加门禁。
变更范围:cmake/cuda.cmake、python/paddle/utils/cpp_extension/extension_utils.py、test/compat/test_cpp_extension_api.py
影响面 Tag:Build Python API Tests
问题
未发现阻塞性问题。
历史 Findings 修复情况
| Finding | 问题 | 状态 |
|---|---|---|
| F1 | PADDLE_CUDA_ARCH_LIST 显式写数值 Blackwell 架构时会绕过 CUDA 12.8 检查 |
✅ 已修复 |
📝 PR 规范检查
符合规范。
总体评价
当前 diff 在命名架构展开后统一检查 Blackwell 数值架构,覆盖了 10.0、10.1、12.0+PTX 以及自动探测到的 12.0 路径,历史绕过问题已修复。未发现新的阻塞性问题;本地尝试运行 python -m unittest discover -s test/compat -p test_cpp_extension_api.py -k blackwell 时因当前环境缺少 paddle.base 未能执行测试断言。
PR Category
Environment Adaptation
PR Types
Improvements
Description
This PR updates CUDA architecture selection for Blackwell GPUs by adding sm_120 alongside sm_100 when the CUDA compiler supports native Blackwell code generation.
It also guards CUDA_ARCH_NAME=Blackwell behind CUDA 12.8+, because older CUDA toolchains such as CUDA 12.4 do not recognize compute_120. For CUDA 12.x releases before 12.8, CUDA_ARCH_NAME=All continues to exclude sm_100/sm_120 to avoid generating unsupported NVCC flags.
This is a build configuration readiness change, not a full claim of RTX 50-series runtime support.
Related context: #79314 handles CUDA 13 sm_121 for GB10 / DGX Spark. This PR is intentionally focused on sm_120 and the CUDA 12.8+ guard.
Tests run:
是否引起精度变化
否