【Hackathon 10th Spring No.51】support gcc15#79199
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
There was a problem hiding this comment.
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 useuint*_ttypes. - 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.
risemeup1111
left a comment
There was a problem hiding this comment.
已完成初步审查,未发现需要阻塞合入的问题。一个非阻塞的引用释放问题已留在行内评论;另外 CI 仍有部分构建测试在运行,建议等结果完成后再合入。
| frame_proxy->locals = f_locals; | ||
| #endif | ||
| PyObject *arg = frame_proxy; | ||
| PyObject *arg = (PyObject *)frame_proxy; |
There was a problem hiding this comment.
这里把 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) {
...
}
CI报告基于以下代码生成(30分钟更新一次): 1 Required任务 : 36/39 通过
2 失败详情🔴 Check approval — 需要 Approval(置信度: 高)该 Job 需要人工 Approval,完成审批后 CI 才会继续执行。 修复建议:请通过人工审批。 |
# Conflicts: # paddle/common/enforce.h
PaddlePaddle-bot
left a comment
There was a problem hiding this comment.
🤖 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 | gcc152 中 libstdc++.so.6.* 通配符复制 |
|
| F2 | gcc152 中 libstdc++.so.6.* 可能复制多个版本文件 |
|
| F3 | Dockerfile.ubuntu24 中 python3.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 中。
|
@ShigureNyako 来review 一下 |
ShigureNyako
left a comment
There was a problem hiding this comment.
我 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。
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-Wno-template-body编译参数。因为 gcc 15 默认会开启模版诊断,而CUTLASS有个 bug 在 v3.6.0 才修复相关链接:
gloosubmodule to PFCCLab paddle branch #79230是否引起精度变化
否