Skip to content

【Hackathon 10th Spring No.51】[ThirdParty] Bump yaml-cpp version to 0.9.0 - part 4#79229

Closed
gouzil wants to merge 2 commits into
PaddlePaddle:developfrom
gouzil:update-yaml-cpp-0.9.0
Closed

【Hackathon 10th Spring No.51】[ThirdParty] Bump yaml-cpp version to 0.9.0 - part 4#79229
gouzil wants to merge 2 commits into
PaddlePaddle:developfrom
gouzil:update-yaml-cpp-0.9.0

Conversation

@gouzil

@gouzil gouzil commented Jun 2, 2026

Copy link
Copy Markdown
Member

PR Category

Environment Adaptation

PR Types

Devs

Description

  • third_party/yaml-cpp 子模块更新到 yaml-cpp-0.9.0
  • 解决 gcc 15 编译问题

相关链接:

是否引起精度变化

Copilot AI review requested due to automatic review settings June 2, 2026 15:24
@gouzil gouzil changed the title 【Hackathon 10th Spring No.51】[ThirdParty] Bump yaml-cpp version to 0.9.0 - part 3 【Hackathon 10th Spring No.51】[ThirdParty] Bump yaml-cpp version to 0.9.0 - part 4 Jun 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR appears to update Paddle’s third_party/yaml-cpp submodule to yaml-cpp-0.9.0 to address GCC 15 build compatibility (Environment Adaptation / Devs).

Changes:

  • Bump third_party/yaml-cpp to yaml-cpp-0.9.0.
  • Adjust build integration as needed to resolve GCC 15 compilation issues (details not visible from the provided input).

Limitation: the actual diff hunks / changed-file list were not included in the prompt, and the checkout’s third_party/yaml-cpp/ directory is empty in this environment (likely due to submodules not being populated here). Without the diff hunks (or at least the list of changed files + changed line ranges), I can’t place line-accurate PR review comments or verify what GCC15-specific changes were made.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

PaddlePaddle-bot

This comment was marked as outdated.

@PaddlePaddle-bot PaddlePaddle-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Paddle-CI-Agent | pr_review | 2026-06-03 14:16:36

📋 Review 摘要

PR 概述:将 third_party/yaml-cpp submodule 指针更新至 yaml-cpp-0.9.0(commit 1ecfeb8c),解决 gcc 15 编译兼容性问题。
变更范围third_party/yaml-cpp
影响面 Tag[Build] [ThirdParty]

问题

未发现阻塞性问题。PR 规范问题在下面章节报,不要在这里重复。

历史 Findings 修复情况

Finding 问题 状态
PR 规范 标题含非标准前缀 【Hackathon 10th Spring No.51】,Tag [ThirdParty] 不在官方枚举列表 ⚠️ 仍存在

📝 PR 规范检查

PR 描述结构合规,四个必填 section 均已填写。标题存在两处不规范:①含非标准前缀 【Hackathon 10th Spring No.51】;② Tag [ThirdParty] 不在 checklist §D1/§D2 枚举列表中(官方 Tag 来自 PR Category 或 PR Types),按 diff 影响面正确 Tag 应为 [Environment Adaptation]

标题建议(可直接复制):

  • [Environment Adaptation] Bump yaml-cpp version to 0.9.0 (part 4)
PR 描述建议(点击展开,可直接复制)
### PR Category
<!-- One of [ User Experience | Execute Infrastructure | Operator Mechanism | CINN | Custom Device | Performance Optimization | Distributed Strategy | Parameter Server | Communication Library | Auto Parallel | Inference | Environment Adaptation ] -->
Environment Adaptation

### PR Types
<!-- One of [ New features | Bug fixes | Improvements | Performance | BC Breaking | Deprecations | Docs | Devs | Not User Facing | Security | Others ] -->
Devs

### Description
<!-- Describe what you've done -->
*`third_party/yaml-cpp` 子模块更新到 `yaml-cpp-0.9.0`(commit `1ecfeb8c4cee7b0ae765579385064521871aa925`* 解决 gcc 15 编译兼容性问题

相关链接:
* https://github.com/jbeder/yaml-cpp/issues/1307
* https://gcc.gnu.org/cgit/gcc/commit/?id=3a817a4a5a6d94da9127af3be9f84a74e3076ee2

### 是否引起精度变化
<!-- one of the following [ 是 | 否 ]-->

总体评价

纯 submodule 指针更新,变更内容简洁清晰,目标版本 yaml-cpp-0.9.0 已修复 gcc 15 兼容性问题。建议修正标题 Tag 后合入。

@gouzil

gouzil commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

@ShigureNyako

Copy link
Copy Markdown
Contributor

@gouzil 已排查当前 head db7263fdd5acfed23fc7ab5e6bbd61fae62aaefe:PR diff 只有 third_party/yaml-cpp gitlink 从 1d8ca1f35eb3a9c9142462b28282a848e5d29a91 更新到 1ecfeb8c4cee7b0ae765579385064521871aa925

Windows-GPU 指定 job 结论:和 yaml-cpp 更新直接相关,不是 flaky/infra

证据:指定 job 79232728418 在 Build paddle 阶段编译 paddle/fluid/inference/tensorrt/pir/generic_plugin.cu.obj 失败,nvcc 命令包含 -Ithird_party\install\yaml-cpp\include,随后报:

third_party/install/yaml-cpp/include\yaml-cpp/node/impl.h(180): error: unknown attribute "no_sanitize_address"
1 error detected in the compilation of "../paddle/fluid/inference/tensorrt/pir/generic_plugin.cu".
ninja: build stopped: subcommand failed.

对应 yaml-cpp commit 1ecfeb8c4cee7b0ae765579385064521871aa925 中,include/yaml-cpp/exceptions.h_MSC_VER 下把 YAML_ATTRIBUTE_NO_SANITIZE_ADDRESS 展开为 __declspec(no_sanitize_address),并在 include/yaml-cpp/node/impl.h:180 使用;Windows CUDA/nvcc 编译路径不接受该 attribute。

其它失败分类:

  • Windows-Inference / Build and test:同根代码问题,同样在 generic_plugin.cu.objyaml-cpp/node/impl.h(180): error: unknown attribute "no_sanitize_address"
  • Windows-OPENBLAS / Build and test:同属 yaml-cpp Windows 兼容问题;直接编译 yaml-cpp 时 MSVC2017 报 impl.h(180): error C2485: 'no_sanitize_address': unrecognized extended attribute,同时 src/contrib/dragonbox.h(3243) 触发 fatal error C1001
  • 两个 Coverage build:infra/网络下载问题,不是 yaml-cpp 编译错误;构建到接近 100% 后反复下载 https://paddle-ci.gz.bcebos.com/new_exec/lm_main_program 超时,第 20 次后 Giving up
  • Linux-CPU / Build and test:infra/网络下载问题;失败命令是下载 https://paddle-ci.gz.bcebos.com/dy2st/multi_program_load_with_property.tar.gztest/cpp/jit/CMakeFiles/jit_download_program
  • Linux-DCU / Build:infra/runner 问题;job annotation 为 self-hosted runner lost communication,日志不可取。

修复方向:先修 yaml-cpp 这个 submodule commit 的 Windows 兼容性,例如让 YAML_ATTRIBUTE_NO_SANITIZE_ADDRESS__CUDACC__/旧 MSVC 下为空,或把 submodule 指到包含等价修复的 yaml-cpp commit,再重跑 Windows jobs。

目前我没有 rerun:Windows 失败是确定代码问题,rerun 会复现;Coverage/Linux-CPU/DCU 是无关 infra,但 PR 仍被 Windows 代码问题阻塞,先不刷 CI。

@gouzil

gouzil commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

@ShigureNyako 你看看 yaml-cpp 是不是已经不支持 MSVC2017 了

@ShigureNyako

Copy link
Copy Markdown
Contributor

@gouzil 我看了下,更准确的结论是:不能把当前选的 yaml-cpp commit 当作支持 MSVC2017 使用;但这不完全等同于 yaml-cpp-0.9.0 tag 本身官方明确宣布 drop MSVC2017。

几点证据:

  1. 这个 PR 当前 submodule 指到 1ecfeb8c4cee7b0ae765579385064521871aa925,它是 yaml-cpp-0.9.0 tag 56e3bb550c91fd7005566f19c079cb7a503223cf 之后的 commit。yaml-cpp-0.9.0 tag 里还没有 YAML_ATTRIBUTE_NO_SANITIZE_ADDRESS / impl.h:180 这段代码;当前 commit 有。

  2. 当前 commit 里 include/yaml-cpp/exceptions.h_MSC_VER 下直接定义:

    #define YAML_ATTRIBUTE_NO_SANITIZE_ADDRESS __declspec(no_sanitize_address)

    然后 include/yaml-cpp/node/impl.h:180 使用它。Windows-OPENBLAS 的 MSVC2017 日志已经直接证明不兼容:error C2485: 'no_sanitize_address': unrecognized extended attribute

  3. Windows-GPU / Windows-Inference 不是 MSVC2017 直编路径,而是 VS2019 + nvcc;但同样会在 generic_plugin.cu.obj 编译时报 unknown attribute "no_sanitize_address"。所以即使不考虑 MSVC2017,也要处理 CUDA/nvcc 这条路径。

  4. yaml-cpp upstream CI 现在只跑 windows-latest,没有覆盖 VS2017;post-0.9.0 的历史里还有 fix: accepted by vs16.11 这种 VS2019 口径的修复,说明至少不能认为 VS2017 有保障。

所以我建议不要直接用当前 1ecfeb8

  • 如果只想升到 0.9.0,优先试 yaml-cpp-0.9.0 tag 56e3bb550c91fd7005566f19c079cb7a503223cf,再看是否还满足 gcc15 需求和 Windows CI。
  • 如果必须用当前 post-0.9.0 commit,则需要在 yaml-cpp submodule 里补兼容修复:对 YAML_ATTRIBUTE_NO_SANITIZE_ADDRESS 增加 compiler/version/nvcc guard(不支持的 MSVC、__CUDACC__ 路径下展开为空),同时还要关注 Windows-OPENBLAS 里 dragonbox.h 的 MSVC2017 ICE。

@gouzil

gouzil commented Jun 3, 2026

Copy link
Copy Markdown
Member Author

see: #79233

@gouzil gouzil closed this Jun 3, 2026
@SigureMo SigureMo deleted the update-yaml-cpp-0.9.0 branch June 3, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants