[WIP] [CI] test Windows inference with CUDA 13.3#79381
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows inference GitHub Actions workflow to run on a different self-hosted runner group intended for VS2022 validation, and adjusts the Visual Studio toolchain initialization to use VS2022 Community’s vcvars64.bat instead of VS2019.
Changes:
- Switch
runs-on.groupfromwin-infertowin-infer-testfor the Windows inference job. - Update
vcvars64_dirto point to VS2022 Community’svcvars64.batto avoid using the VS2019 toolchain after runner migration.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
risemeup1111
left a comment
There was a problem hiding this comment.
代码改动本身未发现需要阻塞合入的问题。当前 Windows-Inference / Build and test 仍在运行,建议等该 job 在新的 win-infer-test runner 上完成后再合入。
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 15/29 通过
2 失败详情🔴 Check approval — 需要 Approval(置信度: 高)该 Job 需要人工 Approval,完成审批后 CI 才会继续执行。 修复建议:请通过人工审批。 |
21005eb to
72bc2f3
Compare
risemeup1111
left a comment
There was a problem hiding this comment.
已复查新的 VS2022 Windows CI 配置。当前有需要先修复的阻塞问题:Windows-GPU 和 Windows-OPENBLAS 已经因为新增的 VS2022 vcvars64.bat 固定路径在 runner 上不存在而失败,具体证据和建议见行内评论。
此前我只建议等待 Windows-Inference job 完成;这次新增的失败覆盖了更广的 Windows job,需要先让相关 runner 路径/镜像与 workflow 配置一致后再继续验证。
| PRECISION_TEST: "OFF" | ||
| PYTHON_ROOT: C:\Python310 | ||
| vcvars64_dir: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat' | ||
| vcvars64_dir: 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat' |
There was a problem hiding this comment.
优先级:P1
这里切到 VS2022 Community 固定路径后,当前 win-gpu runner 上该文件不存在,已经导致 Windows-GPU / Build and test 在 Build paddle 阶段失败:日志打印 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat 后立即出现 The system cannot find the path specified.,随后 CMake 报 No CMAKE_CXX_COMPILER could be found(https://github.com/PaddlePaddle/Paddle/actions/runs/28277012818/job/83785864387)。请先把 win-gpu runner 镜像更新到包含该路径的 VS2022,或改成该 runner 实际存在的 VS2022 vcvars64.bat 路径;否则该必跑 Windows job 无法进入编译。
修复形态例如:
vcvars64_dir: '<win-gpu runner 上实际存在的 VS2022 vcvars64.bat 绝对路径>'| WITH_TESTING: "ON" | ||
| PRECISION_TEST: "OFF" | ||
| PYTHON_ROOT: C:\Python310 | ||
| vcvars64_dir: 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat' |
There was a problem hiding this comment.
优先级:P1
新增的 VS2022 Community 路径在当前 win-openblas runner 上也不存在,已经导致 Windows-OPENBLAS / Build and test 在 Build paddle 阶段失败:日志打印 C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat 后出现 The system cannot find the path specified.,随后 CMake 报 No CMAKE_CXX_COMPILER could be found(https://github.com/PaddlePaddle/Paddle/actions/runs/28277012818/job/83785863898)。请先更新 win-openblas runner 镜像,或把这里配置为该 runner 实际存在的 VS2022 vcvars64.bat 路径;否则该 Windows OPENBLAS job 会稳定失败。
修复形态例如:
vcvars64_dir: '<win-openblas runner 上实际存在的 VS2022 vcvars64.bat 绝对路径>'72bc2f3 to
8ea483e
Compare
8ea483e to
35c24e2
Compare
35c24e2 to
49c5fbe
Compare
49c5fbe to
e4f76f8
Compare
e4f76f8 to
023bf0b
Compare
| template <typename T> | ||
| struct is_other_float | ||
| : std::integral_constant<bool, | ||
| std::is_floating_point<T>::value && | ||
| phi::dtype::is_floating_point<T>::value && | ||
| !is_float_or_double<T>::value> {}; |
| std::vector<std::string> dso_names = split(dso_name, ";"); | ||
| auto search_extra_paths = extra_paths; | ||
| #if defined(_WIN32) && defined(PADDLE_WITH_CUDA) | ||
| search_extra_paths.emplace_back(cuda_lib_x64_path); | ||
| #endif |
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 Paddle-CI-Agent | pr_review |
2026-07-01 09:25:02
📋 Review 摘要
PR 概述:调整 Windows-Inference CI 到 win-infer-test/VS2022/CUDA 13.3,并补充 Windows 下 CUDA dynload、PIR schema、profiler/framework 导出和 dtype trait 兼容修正。
变更范围:Windows CI/build/CMake、Phi dynload/type traits/isfinite、PIR 序列化、Profiler/Operator 导出、相关 C++ 测试。
影响面 Tag:[Environment Adaptation] [Execute Infrastructure] [Operator Mechanism] [Inference]
问题
未发现新的阻塞性问题。PR 规范问题在下面章节报,不在这里重复。
历史 Findings 修复情况
| Finding | 问题 | 状态 |
|---|---|---|
| F1 | dynamic_loader.cc 的 bin/x64 追加后仍可能覆盖已有 bin 回退加载结果 |
📝 PR 规范检查
标题仍使用 [WIP] [CI],Tag 不在 checklist §D2 枚举中;PR 描述结构已补齐。
标题建议(可直接复制):
[Environment Adaptation] test Windows inference with VS2022 runner
总体评价
本轮按风险优先覆盖了 14 个变更文件中的 Windows CI/CMake、CUDA 动态加载、PIR schema、dtype trait/isfinite、profiler 和 operator 注册表导出路径。除历史 F1 仍未修复外,未发现新的阻塞性代码问题。
PR Category
Environment Adaptation
PR Types
Improvements
Description
本 PR 调整 Windows-Inference CI,用于在
win-infer-testrunner 上验证 VS2022 + CUDA 13.3 的 Windows inference 构建与测试。主要改动:
win-infer切换为win-infer-test。vcvars64.bat。CUDA_TOOLKIT_ROOT_DIR从 CUDA 11.7 切换到 CUDA 13.3 默认安装路径。bin\x64加入 PATH,并让 dynload 额外搜索该目录,用于加载cublas64_13.dll等运行时 DLL。WITH_TENSORRT,避免当前win-infer-testrunner 缺失 TensorRT 安装目录导致 CMake 阶段失败。extern_warprnnt作为独立 CMake 外部工程时显式继承顶层CUDA_TOOLKIT_ROOT_DIR,避免 legacyFindCUDA在 runner 环境中回落到 CUDA 11.7。phi::dtype::is_floating_point,并让float16_test/bfloat16_test以及 CPUisfinite路径使用 Paddle 自己的 dtype trait。VS2022 / MSVC STL 的std::is_floating_point_v只按标准内建浮点类型计算,用户对std::is_floating_point<phi::dtype::float16>的特化不会影响变量模板路径,因此在 C++20 + MSVC 19.44 下会得到 false;这里避免继续依赖标准库 type traits 的用户特化。参考链接:
std::is_floating_point_v实现只匹配float/double/long double: https://github.com/microsoft/STL/blob/vs-2022-17.14/stl/inc/xtr1common#L198-L201std::is_floating_point/std::is_floating_point_v已带_NO_SPECIALIZATIONS_OF_TYPE_TRAITS: https://github.com/microsoft/STL/blob/c430582bc1147f4c01973f6a051415110c4eb286/stl/inc/xtr1common#L204-L208[namespace.std]/[meta.rqmts]依据: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/n5014.pdfWindows-GPU、Windows-OPENBLAS、
cmake/flags.cmake保持不变。是否引起精度变化
否