Skip to content

[CI] Update build image to CUDA 12.8 and GCC 11#79340

Open
gouzil wants to merge 16 commits into
PaddlePaddle:developfrom
gouzil:codex/update-ci-build-gcc11
Open

[CI] Update build image to CUDA 12.8 and GCC 11#79340
gouzil wants to merge 16 commits into
PaddlePaddle:developfrom
gouzil:codex/update-ci-build-gcc11

Conversation

@gouzil

@gouzil gouzil commented Jun 19, 2026

Copy link
Copy Markdown
Member

PR Category

Environment Adaptation

PR Types

Bug fixes

Description

关联链接:PaddlePaddle/Paddle#79260

#79260 将 C++20 baseline 推到 GCC 11 后,CI build 镜像需要同步升级。当前分支已合入 develop,其中 PaddlePaddle/Paddle#79444 已将 TensorRT 从默认 CI 中退场,因此 build image 不再需要为了 V100 / P4 的 TensorRT 兼容性停在较低 CUDA 组合。

本 PR 的最终调整

  • 合入最新 upstream/develop
  • docker_build_file 更新为 Dockerfile.cuda12.8_cudnn9_gcc11,避免复用旧镜像缓存。
  • make_ce_framework_dockerfile 使用 nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04
  • CUDA library path 更新为 /usr/local/cuda-12.8/targets/x86_64-linux/lib
  • CUDA Python wheel 依赖同步到仓库 setup.py 已维护的 CUDA 12.8 版本组。
  • 删除该 build image 生成文件里的默认 install_trt.sh 调用,生成镜像不再安装 TensorRT。
  • cuDNN 依赖使用 CUDA 12.8 base image 与 CUDA 12.8 wheel 组,CUDNN_VERSION=9.7.1
  • GCC 仍通过 install_gcc.sh gcc11 源码构建 GCC 11.5.0,不依赖 ubuntu-toolchain-r/test PPA。

影响范围

本 PR 修改 .github/workflows/docker.ymltask: build 镜像输入,因此直接影响 docker_build_image 的所有下游消费者,包括:

  • CI-Build.ymlPR-CI-InferenceLinux-buildStatic-CheckCE-FrameworkCE-CINN-FrameworkApi-BenchmarkModel-BenchmarkSliceDeepMD-Kit-Test
  • Api-Benchmark-baseline.yml:schedule 场景的 Api benchmark build 以及手动/定时触发的 baseline 任务。
  • Slice-baseline.yml:手动触发的 Slice buildSlice test
  • Slice-torch.yml:手动/定时触发的 torch slice baseline 测试。

CI-Build.yml 中的 Auto-Parallel 目前仍是注释状态,不计入当前直接消费面。

本地验证

  • bash -n tools/dockerfile/ci_dockerfile.sh
  • git diff --check -- .github/workflows/docker.yml tools/dockerfile/ci_dockerfile.sh
  • 使用 GNU sed 在临时目录生成并检查 Dockerfile.cuda12.8_cudnn9_gcc11,确认生成文件包含 CUDA 12.8、GCC 11,且不再包含 install_trtTensorRT_trt* 文件名。
  • prek run --files .github/workflows/docker.yml tools/dockerfile/ci_dockerfile.sh

是否引起精度变化

否。该 PR 只调整 CI build 镜像的 CUDA/cuDNN/GCC 环境,不改变模型计算逻辑或算子实现。

Copilot AI review requested due to automatic review settings June 19, 2026 16:21

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 updates the CI “build” Docker image configuration to ensure the build container uses GCC/G++ 11 (meeting the C++20 baseline toolchain requirement introduced in #79260) and avoids continuing to hit cached images built from the older GCC 8.2-based Dockerfile name.

Changes:

  • Switch the CE framework/build image Dockerfile name to Dockerfile.cuda11.8_cudnn8_gcc11_trt8 and base it on nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04.
  • Update make_ce_framework_dockerfile generation logic to install gcc-11 / g++-11 and relink gcc/g++/cc to the GCC 11 toolchain paths.
  • Update the reusable GitHub Actions workflow to build/pull/cache using the new docker_build_file name.

Reviewed changes

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

File Description
tools/dockerfile/ci_dockerfile.sh Generates the updated CE framework/build Dockerfile (CUDA 11.8 + GCC/G++ 11 toolchain relinking).
.github/workflows/docker.yml Points CI docker build job to the new build Dockerfile name so cache keys/images align with the updated toolchain.

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

PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

@paddle-bot paddle-bot Bot added the contributor External developers label Jun 19, 2026
@PaddlePaddle-bot

PaddlePaddle-bot commented Jun 19, 2026

Copy link
Copy Markdown

🤖 Paddle-CI-Agent | ci_status_monitor | 2026-07-17 10:30:39 UTC+08:00

CI报告基于以下代码生成(30分钟更新一次):
PR commit: 2d11a2f | Merge base: 870f01c (branch: develop)


1 Required任务 : 34/39 通过

总执行(rerun次数) 总任务 ✅ 通过 ❌ 失败 ⏳ 运行中 ⏸️ 等待中 跳过
79(9) 70 57 4 0 0 9
任务 错误类型 置信度 日志
PR-CI-SOT / Build and Test 环境问题:源码包下载失败 Job
Distribute-stable-build / Build 环境问题:源码包下载失败 Job
Linux-build / Build PR问题:CUDA/GCC 编译不兼容 Job
PR-CI-Inference / Build PR问题:CUDA/GCC 编译不兼容 Job

2 失败详情

🔴 PR-CI-SOT / Build and Test — 环境问题:源码包下载失败(置信度: 高)

失败用例:

用例 错误摘要
Download paddle.tar.gz and merge target branch 下载 Paddle.tar.gz 后步骤直接以 exit code 4 失败,未进入 SOT build/test

关键日志:

Downloading Paddle.tar.gz
##[error]Process completed with exit code 4.
docker exec -t paddle-CI-79340-sot-1782968757 /bin/bash -c 'rm -rf * .[^.]*'
  • 根因摘要: SOT 任务下载源码包阶段失败
    该 Job 失败发生在 Download paddle.tar.gz and merge target branch,尚未进入 SOT 编译或测试。当前 PR 修改的是 build 镜像生成逻辑,不直接影响 SOT 使用的 docker_sot_file;该失败更符合源码包下载或临时网络/BOS 访问异常。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 无直接关联;失败发生在进入 SOT build/test 之前

🔴 Distribute-stable-build / Build — 环境问题:源码包下载失败(置信度: 高)

失败用例:

用例 错误摘要
Download paddle.tar.gz and merge target branch 下载 Paddle.tar.gz 后步骤直接以 exit code 4 失败,后续 Build 被跳过

关键日志:

Downloading Paddle.tar.gz
##[error]Process completed with exit code 4.
docker exec -t paddle-CI-79340-distribute-build-20260702-130558 /bin/bash -c 'rm -rf * .[^.]*'
  • 根因摘要: 分布式构建未进入实际 Build
    该 Job 在源码包下载/合并目标分支阶段失败,Build、打包和上传步骤均被跳过。日志没有显示 PR 代码编译错误,且该路径未消费本 PR 修改的 docker_build_file,更符合临时下载环境问题。

修复建议:

  1. 环境问题,请 rerun。

关联变更: 无直接关联;失败发生在进入分布式 Build 之前

🔴 Linux-build / Build — PR问题:CUDA/GCC 编译不兼容(置信度: 高)

失败用例:

用例 错误摘要
paddle/phi/core/platform/profiler.cu nvcc 12.4.131 编译时进入 GCC 11.5 AMX 头文件,__builtin_ia32_ldtilecfg / __builtin_ia32_sttilecfg 未定义

关键日志:

-- The CXX compiler identification is GNU 11.5.0
-- The CUDA compiler identification is NVIDIA 12.4.131
/usr/local/gcc-11.5/.../amxtileintrin.h(42): error: identifier "__builtin_ia32_ldtilecfg" is undefined
/usr/local/gcc-11.5/.../amxtileintrin.h(49): error: identifier "__builtin_ia32_sttilecfg" is undefined
2 errors detected in the compilation of "/paddle/paddle/phi/core/platform/profiler.cu".
  • 根因摘要: CUDA12.4/GCC11.5 编译 profiler.cu 不兼容
    PR 将 docker_build_file 切到 Dockerfile.cuda12.4_cudnn9_gcc11_trt8,并在 tools/dockerfile/ci_dockerfile.sh 中把 build 镜像编译器路径切到 /usr/local/gcc-11.5Linux-build 使用该镜像后,nvcc 12.4.131 编译 profiler.cu 时无法识别 GCC 11.5 AMX intrinsic builtin,导致 phi_core 编译失败。

修复建议:

  1. 调整 tools/dockerfile/ci_dockerfile.sh / install_gcc.sh 中的 CUDA/GCC 组合,或在构建参数中屏蔽触发 AMX intrinsic 的路径,并重新验证 Linux-build
  2. 若必须保留 CUDA 12.4 + GCC 11.5,先用最小 nvcc 复现确认 amxtileintrin.h 兼容性,再放大到 CI build 镜像。

关联变更: .github/workflows/docker.yml:78, tools/dockerfile/ci_dockerfile.sh:61,75-78, tools/dockerfile/build_scripts/install_gcc.sh:78-94

🔴 PR-CI-Inference / Build — PR问题:CUDA/GCC 编译不兼容(置信度: 高)

失败用例:

用例 错误摘要
paddle/phi/core/platform/profiler.cu Linux-build 同源,CUDA 12.4.131 + GCC 11.5.0 编译 profiler.cu 时 AMX builtin 未定义

关键日志:

-- The CXX compiler identification is GNU 11.5.0
-- The CUDA compiler identification is NVIDIA 12.4.131
/usr/local/gcc-11.5/.../amxtileintrin.h(42): error: identifier "__builtin_ia32_ldtilecfg" is undefined
/usr/local/gcc-11.5/.../amxtileintrin.h(49): error: identifier "__builtin_ia32_sttilecfg" is undefined
2 errors detected in the compilation of "/paddle/paddle/phi/core/platform/profiler.cu".
  • 根因摘要: PR-CI-Inference 复现同一镜像编译错误
    PR-CI-Inference / Build 同样消费本 PR 更新的 build 镜像,日志中的编译器组合、失败源文件和 AMX builtin 报错与 Linux-build 一致。因此这是同一 PR 镜像改动造成的构建兼容性问题,而不是 inference 测试逻辑失败。

修复建议:

  1. 先修复 build 镜像中的 CUDA 12.4 + GCC 11.5 兼容问题,再 rerun PR-CI-Inference / Build
  2. 修复后同时检查 Linux-buildPR-CI-Inference,避免同一镜像下游继续失败。

关联变更: .github/workflows/docker.yml:78, tools/dockerfile/ci_dockerfile.sh:61,75-78, tools/dockerfile/build_scripts/install_gcc.sh:78-94

@gouzil gouzil changed the title [CI] Update build image GCC to 11 [CI] Update build image to CUDA 12.8 and GCC 11 Jun 25, 2026
PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

@gouzil gouzil changed the title [CI] Update build image to CUDA 12.8 and GCC 11 [CI] Update build image to CUDA 12.6 and GCC 11 Jun 29, 2026
PaddlePaddle-bot

This comment was marked as outdated.

PaddlePaddle-bot

This comment was marked as outdated.

@gouzil gouzil changed the title [CI] Update build image to CUDA 12.6 and GCC 11 [CI] Update build image to CUDA 12.3 and GCC 11 Jul 1, 2026
PaddlePaddle-bot

This comment was marked as outdated.

@gouzil gouzil changed the title [CI] Update build image to CUDA 12.3 and GCC 11 [CI] Update build image to CUDA 12.4 and GCC 11 Jul 2, 2026

@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-07-02 13:07:34

📋 Review 摘要

PR 概述:将 task: build 的 CI Docker build image 从 CUDA 12.3 升级到 CUDA 12.4,并同步 CUDA Python wheel 依赖。
变更范围.github/workflows/docker.ymltools/dockerfile/ci_dockerfile.sh
影响面 Tag[Environment Adaptation] [Execute Infrastructure]

问题

级别 文件 概述
- - 未发现阻塞性问题。PR 规范问题在下面章节报,不在这里重复。

📝 PR 规范检查

标题 Tag [CI] 不在 Paddle PR 模板枚举中;描述结构包含必填的 PR CategoryPR TypesDescription是否引起精度变化,且精度变化填写为 ,描述部分符合规范。

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

  • [Environment Adaptation] Update CI build image GCC to 11

总体评价

按 checklist A10 检查了 build workflow、Dockerfile 生成脚本、TensorRT/cuDNN/GCC 相关替换,以及 CUDA 12.4 wheel 版本与仓库 setup.py 维护组的一致性;未发现需要阻塞合入的代码问题。当前仍有历史标题 Tag 规范项未处理。

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

已复查最新提交。当前 CUDA 12.4/GCC 11.5 组合仍会导致必需 build 任务在 profiler.cu 编译阶段失败,具体证据和建议已放在 inline review comment 里;这个问题需要修复后再合入。

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

Comment thread tools/dockerfile/ci_dockerfile.sh Outdated
dockerfile_name="Dockerfile.cuda11.2_cudnn8_gcc82_trt8"
sed "s#<baseimg>#nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name}
dockerfile_name="Dockerfile.cuda12.4_cudnn9_gcc11_trt8"
sed "s#<baseimg>#nvidia/cuda:12.4.1-cudnn-devel-ubuntu20.04#g" ./Dockerfile.ubuntu20 >${dockerfile_name}

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.

P0 优先级:P0

当前这组 CUDA 12.4 + GCC 11.5 镜像仍然会让必需的 build 任务失败,不能按描述中的“CUDA 12.4 避开 AMX 头文件问题”合入。当前 head 的 build docker images / Build docker 已用这个 Dockerfile 生成并推送了 b0993ba370677b1e3ded9b71ad018828;后续 Linux-build / BuildPR-CI-Inference / Build 都使用同一个镜像,并在 -- The CUDA compiler identification is NVIDIA 12.4.131-- The CXX compiler identification is GNU 11.5.0 后编译 paddle/phi/core/platform/profiler.cu 失败:/usr/local/gcc-11.5/.../amxtileintrin.h(42): error: identifier "__builtin_ia32_ldtilecfg" is undefined

请把这行及后续 CUDA wheel/cuDNN/TRT 路径一起调整到一个已通过必需 build 任务验证的组合,或者在镜像里加入能实际消除 nvcc/GCC 11.5 AMX intrinsic 错误的补丁/编译规避;修复后需要重新跑过 Linux-build / BuildPR-CI-Inference / Build。改动应保持这些值一致,例如:

# 需要同步更新并用 CI 验证通过
base image CUDA version
LD_LIBRARY_PATH cuda-X.Y
nvidia-*-cu12 wheel versions
install_cudnn/install_trt 版本

@gouzil gouzil changed the title [CI] Update build image to CUDA 12.4 and GCC 11 [CI] Update build image to CUDA 12.8 and GCC 11 Jul 21, 2026

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

已复查最新提交。当前 diff 已把 build 镜像切到 CUDA 12.8 并移除 TensorRT 安装,旧的 CUDA 12.4/GCC 11.5 编译失败点在代码层面已被新方案替代;本轮必需 build CI 仍在运行中,需等 CI 结果确认。我没有新增行级代码评论。

  • P3 优先级:P3 非行级:PR 标题和描述不在 diff 中。当前代码已改为 Dockerfile.cuda12.8_cudnn9_gcc11nvidia/cuda:12.8.1-cudnn-devel-ubuntu20.04,并移除了 TensorRT 安装,但标题和描述仍写 CUDA 12.4、TensorRT 8.6.1.6、cuDNN 9.1.1,容易误导后续审查和 CI 追踪。建议标题改为:[Environment Adaptation] Update build image to CUDA 12.8 and GCC 11 without TensorRT;描述中的“最终调整”“约束和 CI 证据”“本地验证”也请同步为 CUDA 12.8、cuDNN 9.7.1、12.8 wheel 版本和移除 TensorRT 的原因。处理要求:请更新后回复 Done;如果不同意,请说明保留旧描述的理由。
Powered by Nyanpasu with gpt-5.5 xhigh, please check the suggestions carefully.

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

已复查本次标题和描述更新。PR 标题、最终调整和本地验证内容已同步到 CUDA 12.8/no TensorRT 方案,上一条 P3 的内容层面看已处理;请作者在上一条 review 下回复 Done,我再按流程视为该项关闭。

当前没有新增行级代码问题;必需 CI 仍在运行中,继续等 CI 结果确认。

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

@SigureMo

Copy link
Copy Markdown
Member

@ShigureNyako 喵子来帮分析下,怎么改个 gcc 怎么还导致 core dump 了,应该只需要关注 CE-Framework,其他的应该 rerun 就差不多了

@ShigureNyako

Copy link
Copy Markdown
Contributor

复核当前 head f5ea56c 后,结论如下:

  • CE-Framework 是稳定复现,不像 runner 瞬态。 CUDA 12.8/GCC 11 的 TRT/no-TRT 镜像变体在不同 runner 上都出现同一结果:saveload/test_model1.pytest_model10.py 共 10 个用例全部 Aborted (core dumped)(SIGABRT):旧镜像 attempt 2 / paddle-gpu-05旧镜像 attempt 3 / paddle-gpu-12-1当前 no-TRT 镜像 / paddle-gpu-04。对照近期仍使用 CUDA 11.8/GCC 8.2 镜像 的 CE 任务,saveload 为 0 个失败且整项通过:baseline job
  • 高置信度边界在源码构建的 GCC 11.5 / 全局 C++ runtime 切换,而不是某个已知 native frame。 当前镜像切到 GCC 11.5(镜像生成配置),安装脚本源码编译 GCC 11.5,并把系统 /usr/lib/x86_64-linux-gnu/libstdc++.so.6 全局重链到该工具链(install_gcc.sh#L78-L94)。这足以影响 Python 加载的原生扩展;但现有日志只有 Aborted (core dumped),没有保留 core、native backtrace,开启 faulthandler 后也没有产出可定位的栈,因此目前不能断言具体崩溃帧。
  • 建议下一轮先取证而不是裸 rerun: ulimit -c unlimited 并在删容器前保存 core,用 gdb -batch -ex 'thread apply all bt full' <python> <core>;做“单用例串行 / 当前 10 路并发 / 10 路并发但 OMP_NUM_THREADS=1 MKL_NUM_THREADS=1 OPENBLAS_NUM_THREADS=1”矩阵;同时记录 lddreadelf -dLD_DEBUG=libs 对 Python 与 Paddle native .so 的实际 libstdc++.so.6 解析,并与 GCC 8.2 baseline 对比。
  • PR-CI-Inference 是另一件事: 该 job 的功能测试已通过,最终因 libpaddle_inference.so 从 195M 增至 203M、推算 release 增长约 32M 而进入 RD approval gate;没有指定 RD approval 时,单纯 rerun 不能消除此失败。

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

已复查新提交。标题和描述内容仍与 CUDA 12.8/no TensorRT 方案一致;此前 P3 的内容层面已处理,但还缺作者在 review 下回复 Done,流程上仍待确认。

本轮新增一条非阻塞的行级建议,细节见 inline comment。当前新提交的 CI 仍在运行中,建议等新镜像相关任务完成后再最终判断。

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

Comment on lines +111 to +115
if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]}; then
md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'`
else
md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'`
fi

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
处理要求:请针对该评论进行回复(同意并已修改请回复 Done,不同意请说明理由)。

这里新增的 find tools/dockerfile/build_scripts ... 会让 is_merge == "true" 的路径在拉取缓存前失败:该分支只下载 ci_dockerfile.shDockerfile.ubuntu20,不会带出 tools/dockerfile/build_scripts 目录;在 Actions 的 bash -e -o pipefail 语义下,缺目录会直接中断,连已有缓存镜像也无法使用。请在目录存在时再把 build_scripts 纳入 hash,或者在 is_merge 分支同步下载该目录。一个本地化修复如下:

Suggested change
if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]}; then
md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'`
else
md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'`
fi
if grep -q "tools/dockerfile/build_scripts" tools/dockerfile/${docker_files[$name]} && [ -d tools/dockerfile/build_scripts ]; then
md5_value=`(md5sum tools/dockerfile/${docker_files[$name]}; find tools/dockerfile/build_scripts -type f -print | sort | xargs md5sum) | md5sum | awk '{print $1}'`
else
md5_value=`md5sum tools/dockerfile/${docker_files[$name]} | awk '{print $1}'`
fi

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.

7 participants