Skip to content

【Hackathon 10th Spring No.51】support gcc15#79199

Merged
swgu98 merged 13 commits into
PaddlePaddle:developfrom
gouzil:feat/support_gcc15
Jun 23, 2026
Merged

【Hackathon 10th Spring No.51】support gcc15#79199
swgu98 merged 13 commits into
PaddlePaddle:developfrom
gouzil:feat/support_gcc15

Conversation

@gouzil

@gouzil gouzil commented May 31, 2026

Copy link
Copy Markdown
Member

PR Category

Environment Adaptation

PR Types

Devs

Description

  • 显示包含 <stdint.h><cstdint> 头文件来支持 uint8_t/uint16_t/uint32_t/uint64_t 这些数据类型
  • cuda 13 开始才支持 gcc 15,所以把 Coverage 的 cuda 也进行了升级 本次先不升级 ci
  • flashattn 增加 -Wno-template-body 编译参数。因为 gcc 15 默认会开启模版诊断,而 CUTLASS 有个 bug 在 v3.6.0 才修复
7c2561f477113d2948deea4b324fb6c1

相关链接:

是否引起精度变化

Copilot AI review requested due to automatic review settings May 31, 2026 06:29
@paddle-bot

paddle-bot Bot commented May 31, 2026

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@paddle-bot paddle-bot Bot added the contributor External developers label May 31, 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 supports GCC 15 compatibility by making fixed-width integer dependencies explicit and addressing a stricter C pointer conversion in SOT eval-frame code.

Changes:

  • Adds explicit <cstdint> includes to C++ headers that use uint*_t types.
  • Adds an explicit PyObject * cast for a Python frame proxy callback argument.
  • Keeps the scope limited to header/declaration compatibility changes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
paddle/phi/kernels/strings/unicode.h Adds <cstdint> for UTF helper integer types.
paddle/common/enforce.h Adds <cstdint> for SFINAE helper integer aliases.
paddle/fluid/inference/api/paddle_api.h Adds <cstdint> for uint64_t API usage.
paddle/fluid/inference/api/paddle_inference_api.h Adds <cstdint> for uint64_t API usage.
paddle/fluid/inference/api/paddle_analysis_config.h Adds <cstdint> for GPU memory-pool size fields/parameters.
paddle/fluid/pybind/sot/eval_frame.c Makes the CPython object pointer conversion explicit.

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

PaddlePaddle-bot

This comment was marked as outdated.

@risemeup1111 risemeup1111 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.

已完成初步审查,未发现需要阻塞合入的问题。一个非阻塞的引用释放问题已留在行内评论;另外 CI 仍有部分构建测试在运行,建议等结果完成后再合入。

Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

frame_proxy->locals = f_locals;
#endif
PyObject *arg = frame_proxy;
PyObject *arg = (PyObject *)frame_proxy;

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.

P2 优先级:P2

这里把 PyInterpreterFrameProxy_New(frame) 返回的新引用显式作为 PyObject* 传给 callback,但 PyObject_CallOneArg 不会接管参数引用,后续成功和异常路径也没有释放 frame_proxy。SOT 打开后每个被拦截的 frame 都会走这里,长时间运行会持续泄漏 proxy 对象。请在 callback 返回后统一释放 Py3.11+ 分支创建的参数引用,再进入 result == NULL 的错误处理,例如:

PyObject *result = PyObject_CallOneArg(callback, arg);
#if PY_3_11_PLUS
Py_DECREF(arg);
#endif
if (result == NULL) {
  ...
}

@PaddlePaddle-bot

PaddlePaddle-bot commented Jun 1, 2026

Copy link
Copy Markdown

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-06-22 17:14:17 UTC+08:00

CI报告基于以下代码生成(30分钟更新一次):
PR commit: 8c4fac7 | Merge base: 886db26 (branch: develop)


1 Required任务 : 36/39 通过

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
114(41) 73 59 1 2 0 11
任务 错误类型 置信度 日志
Check approval 需要 Approval Job

2 失败详情

🔴 Check approval — 需要 Approval(置信度: 高)

该 Job 需要人工 Approval,完成审批后 CI 才会继续执行。

修复建议:请通过人工审批。

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

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-22 00:14:26

📋 Review 摘要

PR 概述:为 GCC 15 兼容补充自包含头文件、SOT eval_frame 显式 PyObject* 转换、FlashAttention GCC 15 编译参数,并新增 gcc152 安装分支。
变更范围:Inference 公开头文件、SOT pybind、Phi strings header、FlashAttention CMake、Docker gcc 安装脚本
影响面 Tag[Environment Adaptation] [Inference] [Execute Infrastructure]

问题

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

历史 Findings 修复情况

Finding 问题 状态
F1 gcc152libstdc++.so.6.* 通配符复制 ⚠️ 仍存在
F2 gcc152libstdc++.so.6.* 可能复制多个版本文件 ⚠️ 仍存在
F3 Dockerfile.ubuntu24python3.10 ipykernel==4.6.0 重复安装 ✅ 已修复
F4 Coverage CUDA_ARCH_NAME: Auto 会导致缺少 sm70 构建产物 ✅ 已修复

📝 PR 规范检查

标题包含 【WIP】 标记,说明 PR 尚在进行中,规范检查待正式提交时再做最终判定。当前描述结构完整,各必填 section 均已填写。

总体评价

本轮按当前 origin/develop...HEAD 累计 diff 审查了 7 个变更文件;新增 include 和 PyObject* cast 是自包含/类型兼容修复,FlashAttention flag 限制在外部子工程 CUDA flags。需要作者继续处理历史已报的 gcc152 libstdc++ 通配符复制问题,其余历史 coverage/dockerfile 变更已不在当前 PR diff 中。

@gouzil gouzil changed the title 【WIP】【Hackathon 10th Spring No.51】support gcc15 - part 3 【Hackathon 10th Spring No.51】support gcc15 Jun 22, 2026
@gouzil gouzil requested review from SigureMo and swgu98 June 22, 2026 17:04
@gouzil

gouzil commented Jun 22, 2026

Copy link
Copy Markdown
Member Author

@ShigureNyako 来review 一下

@SigureMo SigureMo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTMeow 🐾

@SigureMo SigureMo requested a review from zrr1999 June 22, 2026 17:07

@ShigureNyako ShigureNyako 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.

LGTMeow 🐾

我 review 了当前 head 8c4fac7 的 7 个文件变更:

  • <cstdint> 补充集中在公开 inference header 和 paddle/phi/kernels/strings/unicode.h,用于让 uint*_t 依赖自包含,符合 GCC 15 下的头文件要求。
  • eval_frame.c 本轮只是把 PyInterpreterFrameProxy* 明确转为 PyObject*,未改变 callback 调用语义;已有引用释放讨论不作为本轮 GCC 15 适配的阻塞点。
  • FlashAttention 的 -Wno-template-body 仅在 GNU >= 15 且外部项目 flags 内生效,作用域可控。
  • install_gcc.sh 新增 gcc152 路径并修正 gcc121 临时目录清理,未发现会阻塞合入的问题。

CI 方面除 Check approval 外均通过;该项是 paddle/phi/ 目录 RD approval gate,不是代码/测试失败。代码侧我这边 approve。

@swgu98 swgu98 merged commit 199073c into PaddlePaddle:develop Jun 23, 2026
192 of 199 checks passed
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.

9 participants