From 5d9e1628f3ba74de1016b4d7f11f8dfd66b7fcb1 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sun, 31 May 2026 13:59:20 +0800 Subject: [PATCH 01/10] support gcc15 --- paddle/common/enforce.h | 1 + paddle/fluid/inference/api/paddle_analysis_config.h | 1 + paddle/fluid/inference/api/paddle_api.h | 1 + paddle/fluid/inference/api/paddle_inference_api.h | 1 + paddle/fluid/pybind/sot/eval_frame.c | 2 +- paddle/phi/kernels/strings/unicode.h | 1 + 6 files changed, 6 insertions(+), 1 deletion(-) diff --git a/paddle/common/enforce.h b/paddle/common/enforce.h index 430f9ab575df08..9c4b9f8fd41d7b 100644 --- a/paddle/common/enforce.h +++ b/paddle/common/enforce.h @@ -17,6 +17,7 @@ #ifdef __GNUC__ #include // for __cxa_demangle #endif // __GNUC__ +#include #include #include #if !defined(_WIN32) diff --git a/paddle/fluid/inference/api/paddle_analysis_config.h b/paddle/fluid/inference/api/paddle_analysis_config.h index 093e0896709f79..7c62fca39f69cd 100644 --- a/paddle/fluid/inference/api/paddle_analysis_config.h +++ b/paddle/fluid/inference/api/paddle_analysis_config.h @@ -25,6 +25,7 @@ #pragma once #include +#include #include #include #include diff --git a/paddle/fluid/inference/api/paddle_api.h b/paddle/fluid/inference/api/paddle_api.h index 62efc8934a50ba..123276a203d18b 100644 --- a/paddle/fluid/inference/api/paddle_api.h +++ b/paddle/fluid/inference/api/paddle_api.h @@ -23,6 +23,7 @@ */ #include +#include #include #include #include diff --git a/paddle/fluid/inference/api/paddle_inference_api.h b/paddle/fluid/inference/api/paddle_inference_api.h index a23de7cf5518b9..f6c11f53168d5e 100644 --- a/paddle/fluid/inference/api/paddle_inference_api.h +++ b/paddle/fluid/inference/api/paddle_inference_api.h @@ -22,6 +22,7 @@ limitations under the License. */ #pragma once #include +#include #include #include #include diff --git a/paddle/fluid/pybind/sot/eval_frame.c b/paddle/fluid/pybind/sot/eval_frame.c index b8d2f60bc90451..fe192eb1e0d60e 100644 --- a/paddle/fluid/pybind/sot/eval_frame.c +++ b/paddle/fluid/pybind/sot/eval_frame.c @@ -319,7 +319,7 @@ static PyObject *_custom_eval_frame(PyThreadState *tstate, #if PY_3_13_PLUS frame_proxy->locals = f_locals; #endif - PyObject *arg = frame_proxy; + PyObject *arg = (PyObject *)frame_proxy; #else PyObject *arg = frame; #endif diff --git a/paddle/phi/kernels/strings/unicode.h b/paddle/phi/kernels/strings/unicode.h index 48c07dbf8dd4fe..9ab97887295d14 100644 --- a/paddle/phi/kernels/strings/unicode.h +++ b/paddle/phi/kernels/strings/unicode.h @@ -14,6 +14,7 @@ limitations under the License. */ #pragma once +#include #include #include From b9c350a7e679a3e49e8ddb33180be033fcc66aa4 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Thu, 4 Jun 2026 21:55:49 +0800 Subject: [PATCH 02/10] feat update coverage ci and add install gcc15 --- tools/dockerfile/build_scripts/install_gcc.sh | 20 ++++++++++++++++++- tools/dockerfile/ci_dockerfile.sh | 10 ++++------ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/tools/dockerfile/build_scripts/install_gcc.sh b/tools/dockerfile/build_scripts/install_gcc.sh index 5adbdd0faa2ac4..8461a7bd913828 100644 --- a/tools/dockerfile/build_scripts/install_gcc.sh +++ b/tools/dockerfile/build_scripts/install_gcc.sh @@ -71,8 +71,26 @@ elif [ "$1" == "gcc121" ]; then cd .. && mkdir temp_gcc121 && cd temp_gcc121 && \ ../gcc-12.1.0/configure --prefix=/usr/local/gcc-12.1 --enable-checking=release --enable-languages=c,c++ --disable-multilib && \ make -j8 && make install - cd .. && rm -rf temp_gcc122 gcc-12.1.0 gcc-12.1.0.tar.gz + cd .. && rm -rf temp_gcc121 gcc-12.1.0 gcc-12.1.0.tar.gz cp ${lib_so_6} ${lib_so_6}.bak && rm -f ${lib_so_6} && ln -s /usr/local/gcc-12.1/lib64/libstdc++.so.6 ${lib_so_6} && \ cp /usr/local/gcc-12.1/lib64/libstdc++.so.6.0.30 ${lib_path} +elif [ "$1" == "gcc152" ]; then + GCC_VERSION=${GCC_VERSION:-15.2.0} + GCC_MAJOR_MINOR=$(echo ${GCC_VERSION} | cut -d. -f1,2) + GCC_PREFIX=/usr/local/gcc-${GCC_MAJOR_MINOR} + GCC_ARCHIVE=gcc-${GCC_VERSION}.tar.xz + wget -q https://ftp.gnu.org/gnu/gcc/gcc-${GCC_VERSION}/${GCC_ARCHIVE} + tar -xf ${GCC_ARCHIVE} && \ + cd gcc-${GCC_VERSION} && \ + unset LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE && \ + ./contrib/download_prerequisites && \ + cd .. && mkdir temp_gcc152 && cd temp_gcc152 && \ + ../gcc-${GCC_VERSION}/configure --prefix=${GCC_PREFIX} --enable-checking=release --enable-languages=c,c++ --disable-multilib && \ + make -j$(nproc) && make install + cd .. && rm -rf temp_gcc152 gcc-${GCC_VERSION} ${GCC_ARCHIVE} + cp ${lib_so_6} ${lib_so_6}.bak && rm -f ${lib_so_6} && + ln -s ${GCC_PREFIX}/lib64/libstdc++.so.6 ${lib_so_6} && \ + cp ${GCC_PREFIX}/lib64/libstdc++.so.6.* ${lib_path} + fi diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index eb8a2753a0d1d1..05d4cd65e3b1d0 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -94,12 +94,10 @@ function make_ubuntu20_cu12_dockerfile(){ sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh#RUN bash /build_scripts/install_trt.sh trt8616#g' ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_cudnn.sh cudnn841#RUN bash /build_scripts/install_cudnn.sh cudnn896 #g' ${dockerfile_name} - sed -i 's#gcc82#gcc121#g' ${dockerfile_name} - sed -i 's#/usr/local/gcc-8.2/bin/gcc#/usr/local/gcc-12.1/bin/gcc#g' ${dockerfile_name} - sed -i 's#/usr/local/gcc-8.2/bin/gcc#/usr/local/gcc-12.1/bin/gcc#g' ${dockerfile_name} - sed -i 's#/usr/local/gcc-8.2/bin/g++#/usr/local/gcc-12.1/bin/g++#g' ${dockerfile_name} - sed -i 's#/usr/local/gcc-8.2/bin/g++#/usr/local/gcc-12.1/bin/g++#g' ${dockerfile_name} - sed -i 's#PATH=/usr/local/gcc-8.2/bin:$PATH#PATH=/usr/local/gcc-12.1/bin:$PATH#g' ${dockerfile_name} + sed -i 's#RUN bash /build_scripts/install_gcc.sh gcc82#RUN add-apt-repository ppa:ubuntu-toolchain-r/test \&\& apt-get update \&\& apt-get install -y gcc-15 g++-15#g' ${dockerfile_name} + sed -i 's#/usr/local/gcc-8.2/bin/gcc#/usr/bin/gcc-15#g' ${dockerfile_name} + sed -i 's#/usr/local/gcc-8.2/bin/g++#/usr/bin/g++-15#g' ${dockerfile_name} + sed -i 's#ENV PATH=/usr/local/gcc-8.2/bin:$PATH##g' ${dockerfile_name} sed -i "${dockerfile_line}i WORKDIR /home \n \ RUN git clone --depth=1 https://github.com/PaddlePaddle/PaddleNLP.git -b stable/paddle-ci \&\& cd PaddleNLP \&\& \ pip3.10 install -r requirements.txt \&\& \ From 59e400149592ba5c2e7d898165a4b61008f38993 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Fri, 5 Jun 2026 00:07:22 +0800 Subject: [PATCH 03/10] ci rm git build --- tools/dockerfile/ci_dockerfile.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index dad33b073340e9..5828850374f9c2 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -84,11 +84,7 @@ function make_ubuntu20_cu12_dockerfile(){ dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') sed -i "${dockerfile_line}i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz \&\& \ tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${dockerfile_name} - sed -i "${dockerfile_line}i RUN apt remove git -y \&\& apt update \&\& apt install -y libcurl4-openssl-dev gettext pigz zstd ninja-build \&\& wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz \&\& \ - tar -xvf git-2.17.1.tar.gz \&\& \ - cd git-2.17.1 \&\& \ - ./configure --with-openssl --with-curl --prefix=/usr/local \&\& \ - make -j8 \&\& make install " ${dockerfile_name} + sed -i "${dockerfile_line}i RUN apt update \&\& apt install -y git libcurl4-openssl-dev gettext pigz zstd ninja-build" ${dockerfile_name} sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3.12 install PyGithub wheel distro jinja2" ${dockerfile_name} sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name} From eb40c6dc65c78e86a1ada0bf019a46e3623b5732 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Fri, 5 Jun 2026 08:35:53 +0800 Subject: [PATCH 04/10] fix Coverage git --- .github/workflows/Coverage.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index 687e1d39be5421..7f934c5e5c2823 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -181,6 +181,8 @@ jobs: echo "Extracting Paddle.tar.gz" tar -xf Paddle.tar.gz --strip-components=1 rm Paddle.tar.gz + git config --global --add safe.directory ${work_dir} + git submodule foreach "git config --global --add safe.directory \$toplevel/\$sm_path" git remote -v set +e git remote add upstream https://github.com/PaddlePaddle/Paddle.git From 00bcc740b8551585c108ef1900f62c1e79c3f828 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sat, 6 Jun 2026 01:26:46 +0800 Subject: [PATCH 05/10] update docker file --- .github/workflows/Coverage.yml | 2 +- tools/dockerfile/ci_dockerfile.sh | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index 7f934c5e5c2823..d6db645cbae2d1 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -98,7 +98,7 @@ jobs: FLAGS_fraction_of_gpu_memory_to_use: 0.15 CTEST_PARALLEL_LEVEL: 2 WITH_GPU: "ON" - CUDA_ARCH_NAME: Volta + CUDA_ARCH_NAME: Auto WITH_AVX: "ON" WITH_COVERAGE: "ON" COVERALLS_UPLOAD: "ON" diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index 5828850374f9c2..f435e6d62d73f1 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -75,24 +75,24 @@ function make_ce_framework_dockerfile(){ function make_ubuntu20_cu12_dockerfile(){ dockerfile_name="Dockerfile.cuda117_cudnn8_gcc82_ubuntu18_coverage" - sed "s##nvidia/cuda:12.0.1-cudnn8-devel-ubuntu22.04#g" ./Dockerfile.ubuntu22 >${dockerfile_name} - sed -i "s##ENV LD_LIBRARY_PATH=/usr/local/cuda-12.0/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH #g" ${dockerfile_name} + sed "s##nvidia/cuda:13.0.0-cudnn-devel-ubuntu24.04#g" ./Dockerfile.ubuntu24 >${dockerfile_name} + sed -i "s###g" ${dockerfile_name} sed -i 's###g' ${dockerfile_name} sed -i "7i ENV TZ=Asia/Beijing" ${dockerfile_name} - sed -i "8i RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone" ${dockerfile_name} + sed -i "8i RUN ln -snf /usr/share/zoneinfo/\$TZ /etc/localtime && echo \$TZ > /etc/timezone" ${dockerfile_name} sed -i "27i RUN apt-get update && apt-get install -y liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev libsndfile1" ${dockerfile_name} dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') sed -i "${dockerfile_line}i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz \&\& \ tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${dockerfile_name} sed -i "${dockerfile_line}i RUN apt update \&\& apt install -y git libcurl4-openssl-dev gettext pigz zstd ninja-build" ${dockerfile_name} sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3.12 install PyGithub wheel distro jinja2" ${dockerfile_name} - sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name} - sed -i 's##RUN bash /build_scripts/install_cudnn.sh cudnn896 #g' ${dockerfile_name} - sed -i 's#RUN apt-get install -y gcc-12 g++-12#RUN add-apt-repository ppa:ubuntu-toolchain-r/test \&\& apt-get update \&\& apt-get install -y gcc-15 g++-15#g' ${dockerfile_name} - sed -i 's#/usr/bin/gcc-12#/usr/bin/gcc-15#g' ${dockerfile_name} - sed -i 's#/usr/bin/g++-12#/usr/bin/g++-15#g' ${dockerfile_name} - sed -i 's#ENV PATH=/usr/local/gcc-12/bin:$PATH##g' ${dockerfile_name} + sed -i "${dockerfile_line}i RUN add-apt-repository ppa:ubuntu-toolchain-r/test \&\& apt-get update \&\& \ + apt-get install -y gcc-15 g++-15 \&\& \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 150 \&\& \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 150 \&\& \ + update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-15 150 \&\& \ + update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-15 150" ${dockerfile_name} } From 5e4d1582971664f763b22cc1a2cff549029e57df Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sat, 6 Jun 2026 10:57:24 +0800 Subject: [PATCH 06/10] clean docker py3.9 --- tools/dockerfile/Dockerfile.ubuntu24 | 33 ++++++++++------------------ 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/tools/dockerfile/Dockerfile.ubuntu24 b/tools/dockerfile/Dockerfile.ubuntu24 index 33709e4c5f86a6..50585d36c04c4c 100644 --- a/tools/dockerfile/Dockerfile.ubuntu24 +++ b/tools/dockerfile/Dockerfile.ubuntu24 @@ -51,22 +51,20 @@ RUN apt-get remove --purge cmake && apt-get install -y cmake=3.28.3-1build7 RUN apt-get install -y ccache RUN apt-get update && \ - apt-get install -y python3.9 python3.9-dev python3.9-distutils \ - python3.10 python3.10-dev python3.10-distutils \ + apt-get install -y python3.10 python3.10-dev python3.10-distutils \ python3.11 python3.11-dev python3.11-distutils \ python3.12 python3.12-dev \ python3.13 python3.13-dev python3.13-nogil \ python3.14 python3.14-dev python3.14-nogil && \ apt-get install python-is-python3 -RUN rm /usr/bin/python && ln -s /usr/bin/python3.9 /usr/bin/python && \ - rm /usr/bin/python3 && ln -s /usr/bin/python3.9 /usr/bin/python3 +RUN rm /usr/bin/python && ln -s /usr/bin/python3.10 /usr/bin/python && \ + rm /usr/bin/python3 && ln -s /usr/bin/python3.10 /usr/bin/python3 WORKDIR /home RUN wget -q https://bootstrap.pypa.io/get-pip.py RUN sed -i 's#"install", "--upgrade", "--force-reinstall"#"install", "--upgrade", "--force-reinstall", "--break-system-packages"#' get-pip.py -RUN python3.9 get-pip.py && \ - python3.10 get-pip.py && \ +RUN python3.10 get-pip.py && \ python3.11 get-pip.py && \ python3.12 get-pip.py @@ -80,8 +78,7 @@ RUN python3.14t get-pip.py && \ RUN python -m pip config set global.break-system-packages true -RUN python3.9 -m pip install setuptools==50.3.2 && \ - python3.10 -m pip install setuptools==68.2.0 && \ +RUN python3.10 -m pip install setuptools==68.2.0 && \ python3.11 -m pip install setuptools==68.2.0 && \ python3.12 -m pip install --break-system-packages setuptools==68.2.0 && \ python3.13 -m pip install setuptools==69.5.0 && \ @@ -111,12 +108,11 @@ RUN git config --global credential.helper store RUN localedef -i en_US -f UTF-8 en_US.UTF-8 #For pre-commit -RUN rm -f /usr/local/bin/pip && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip && \ - rm -f /usr/local/bin/pip3 && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip3 +RUN rm -f /usr/local/bin/pip && ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip && \ + rm -f /usr/local/bin/pip3 && ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip3 -RUN python3.9 -m pip --no-cache-dir install ipython==5.3.0 && \ - python3.9 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ - python3.10 -m pip --no-cache-dir install ipython==5.3.0 && \ +RUN python3.10 -m pip --no-cache-dir install ipython==5.3.0 && \ + python3.10 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ python3.10 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ python3.11 -m pip --no-cache-dir install ipython==5.3.0 && \ python3.11 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ @@ -130,8 +126,7 @@ RUN python3.9 -m pip --no-cache-dir install ipython==5.3.0 && \ python3.14t -m pip --no-cache-dir install ipython==5.3.0 ipykernel==4.6.0 wheel # For PaddleTest CE -RUN python3.9 -m pip --no-cache-dir install pytest && \ - python3.10 -m pip --no-cache-dir install pytest && \ +RUN python3.10 -m pip --no-cache-dir install pytest && \ python3.11 -m pip --no-cache-dir install pytest && \ python3.12 -m pip --no-cache-dir install --break-system-packages pytest && \ python3.13 -m pip --no-cache-dir install pytest && \ @@ -139,9 +134,7 @@ RUN python3.9 -m pip --no-cache-dir install pytest && \ python3.14 -m pip --no-cache-dir install pytest && \ python3.14t -m pip --no-cache-dir install pytest -RUN python3.9 -m pip --no-cache-dir install pre-commit==2.17.0 && \ - python3.10 -m pip --no-cache-dir install pre-commit==2.17.0 && \ - python3.9 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ +RUN python3.10 -m pip --no-cache-dir install pre-commit==2.17.0 && \ python3.10 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ python3.11 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ python3.12 -m pip --no-cache-dir install --break-system-packages cpplint==1.6.0 clang-format==13.0.0 && \ @@ -153,9 +146,7 @@ RUN python3.9 -m pip --no-cache-dir install pre-commit==2.17.0 && \ COPY ./python/requirements.txt /root/ COPY ./python/unittest_py/requirements.txt /home/ -RUN python3.9 -m pip --no-cache-dir install -r /root/requirements.txt && \ - python3.9 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ - python3.10 -m pip --no-cache-dir install -r /root/requirements.txt && \ +RUN python3.10 -m pip --no-cache-dir install -r /root/requirements.txt && \ python3.10 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ python3.11 -m pip --no-cache-dir install -r /root/requirements.txt && \ python3.11 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ From 9c80e540375d1b14ea43385b3e48dee410d3572f Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sat, 6 Jun 2026 13:17:52 +0800 Subject: [PATCH 07/10] Fix coverage Docker GCC 15 PPA setup --- tools/dockerfile/ci_dockerfile.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index f435e6d62d73f1..f50749fcd3cc05 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -78,6 +78,7 @@ function make_ubuntu20_cu12_dockerfile(){ sed "s##nvidia/cuda:13.0.0-cudnn-devel-ubuntu24.04#g" ./Dockerfile.ubuntu24 >${dockerfile_name} sed -i "s###g" ${dockerfile_name} sed -i 's###g' ${dockerfile_name} + sed -i 's#add-apt-repository ppa:deadsnakes/ppa \&\&#add-apt-repository ppa:deadsnakes/ppa \&\& add-apt-repository ppa:ubuntu-toolchain-r/test \&\&#g' ${dockerfile_name} sed -i "7i ENV TZ=Asia/Beijing" ${dockerfile_name} sed -i "8i RUN ln -snf /usr/share/zoneinfo/\$TZ /etc/localtime && echo \$TZ > /etc/timezone" ${dockerfile_name} sed -i "27i RUN apt-get update && apt-get install -y liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev libsndfile1" ${dockerfile_name} @@ -87,7 +88,7 @@ function make_ubuntu20_cu12_dockerfile(){ sed -i "${dockerfile_line}i RUN apt update \&\& apt install -y git libcurl4-openssl-dev gettext pigz zstd ninja-build" ${dockerfile_name} sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3.12 install PyGithub wheel distro jinja2" ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name} - sed -i "${dockerfile_line}i RUN add-apt-repository ppa:ubuntu-toolchain-r/test \&\& apt-get update \&\& \ + sed -i "${dockerfile_line}i RUN apt-get update \&\& \ apt-get install -y gcc-15 g++-15 \&\& \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 150 \&\& \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 150 \&\& \ From a5acea8cfb39340ca9e2857beef3d31b8062dee9 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sun, 7 Jun 2026 11:43:40 +0800 Subject: [PATCH 08/10] fix fa gcc 15 build error --- cmake/external/flashattn.cmake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cmake/external/flashattn.cmake b/cmake/external/flashattn.cmake index 8600c927c3f5b3..6aec251be0215b 100644 --- a/cmake/external/flashattn.cmake +++ b/cmake/external/flashattn.cmake @@ -147,6 +147,19 @@ else() endif() set(FLASHATTN_CMAKE_CUDA_FLAGS "-Xfatbin -compress-all") + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION + VERSION_GREATER_EQUAL 15.0) + # GCC 15 diagnoses template-body lookup failures in the vendored CUTLASS + # v2.9.0 matrix.h before the affected helpers are instantiated. Keep this + # warning local to FlashAttention until CUTLASS is upgraded or patched. + if(CMAKE_CUDA_COMPILER_ID STREQUAL "NVIDIA") + set(FLASHATTN_CMAKE_CUDA_FLAGS + "${FLASHATTN_CMAKE_CUDA_FLAGS} -Xcompiler=-Wno-template-body") + else() + set(FLASHATTN_CMAKE_CUDA_FLAGS + "${FLASHATTN_CMAKE_CUDA_FLAGS} -Wno-template-body") + endif() + endif() set(FA_NVCC_ARCH_BIN "") foreach(arch ${NVCC_ARCH_BIN}) string(STRIP ${arch} arch) From e68f108a6d107d0ab083704c80f69b8643f0aea2 Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sun, 14 Jun 2026 22:02:44 +0800 Subject: [PATCH 09/10] clean include --- paddle/common/enforce.h | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/common/enforce.h b/paddle/common/enforce.h index 159ec6c31b2bfe..fa23e810733413 100644 --- a/paddle/common/enforce.h +++ b/paddle/common/enforce.h @@ -18,7 +18,6 @@ #include // for __cxa_demangle #endif // __GNUC__ #include -#include #include #include #if !defined(_WIN32) From 8c4fac781040b134770372bcf4ff5e5fc528fe1b Mon Sep 17 00:00:00 2001 From: gouzi <530971494@qq.com> Date: Sun, 21 Jun 2026 23:30:16 +0800 Subject: [PATCH 10/10] Revert coverage CI dockerfile changes --- .github/workflows/Coverage.yml | 4 +--- tools/dockerfile/Dockerfile.ubuntu24 | 33 ++++++++++++++++++---------- tools/dockerfile/ci_dockerfile.sh | 21 +++++++++--------- 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index d6db645cbae2d1..687e1d39be5421 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -98,7 +98,7 @@ jobs: FLAGS_fraction_of_gpu_memory_to_use: 0.15 CTEST_PARALLEL_LEVEL: 2 WITH_GPU: "ON" - CUDA_ARCH_NAME: Auto + CUDA_ARCH_NAME: Volta WITH_AVX: "ON" WITH_COVERAGE: "ON" COVERALLS_UPLOAD: "ON" @@ -181,8 +181,6 @@ jobs: echo "Extracting Paddle.tar.gz" tar -xf Paddle.tar.gz --strip-components=1 rm Paddle.tar.gz - git config --global --add safe.directory ${work_dir} - git submodule foreach "git config --global --add safe.directory \$toplevel/\$sm_path" git remote -v set +e git remote add upstream https://github.com/PaddlePaddle/Paddle.git diff --git a/tools/dockerfile/Dockerfile.ubuntu24 b/tools/dockerfile/Dockerfile.ubuntu24 index 50585d36c04c4c..33709e4c5f86a6 100644 --- a/tools/dockerfile/Dockerfile.ubuntu24 +++ b/tools/dockerfile/Dockerfile.ubuntu24 @@ -51,20 +51,22 @@ RUN apt-get remove --purge cmake && apt-get install -y cmake=3.28.3-1build7 RUN apt-get install -y ccache RUN apt-get update && \ - apt-get install -y python3.10 python3.10-dev python3.10-distutils \ + apt-get install -y python3.9 python3.9-dev python3.9-distutils \ + python3.10 python3.10-dev python3.10-distutils \ python3.11 python3.11-dev python3.11-distutils \ python3.12 python3.12-dev \ python3.13 python3.13-dev python3.13-nogil \ python3.14 python3.14-dev python3.14-nogil && \ apt-get install python-is-python3 -RUN rm /usr/bin/python && ln -s /usr/bin/python3.10 /usr/bin/python && \ - rm /usr/bin/python3 && ln -s /usr/bin/python3.10 /usr/bin/python3 +RUN rm /usr/bin/python && ln -s /usr/bin/python3.9 /usr/bin/python && \ + rm /usr/bin/python3 && ln -s /usr/bin/python3.9 /usr/bin/python3 WORKDIR /home RUN wget -q https://bootstrap.pypa.io/get-pip.py RUN sed -i 's#"install", "--upgrade", "--force-reinstall"#"install", "--upgrade", "--force-reinstall", "--break-system-packages"#' get-pip.py -RUN python3.10 get-pip.py && \ +RUN python3.9 get-pip.py && \ + python3.10 get-pip.py && \ python3.11 get-pip.py && \ python3.12 get-pip.py @@ -78,7 +80,8 @@ RUN python3.14t get-pip.py && \ RUN python -m pip config set global.break-system-packages true -RUN python3.10 -m pip install setuptools==68.2.0 && \ +RUN python3.9 -m pip install setuptools==50.3.2 && \ + python3.10 -m pip install setuptools==68.2.0 && \ python3.11 -m pip install setuptools==68.2.0 && \ python3.12 -m pip install --break-system-packages setuptools==68.2.0 && \ python3.13 -m pip install setuptools==69.5.0 && \ @@ -108,11 +111,12 @@ RUN git config --global credential.helper store RUN localedef -i en_US -f UTF-8 en_US.UTF-8 #For pre-commit -RUN rm -f /usr/local/bin/pip && ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip && \ - rm -f /usr/local/bin/pip3 && ln -s /usr/local/bin/pip3.10 /usr/local/bin/pip3 +RUN rm -f /usr/local/bin/pip && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip && \ + rm -f /usr/local/bin/pip3 && ln -s /usr/local/bin/pip3.9 /usr/local/bin/pip3 -RUN python3.10 -m pip --no-cache-dir install ipython==5.3.0 && \ - python3.10 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ +RUN python3.9 -m pip --no-cache-dir install ipython==5.3.0 && \ + python3.9 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ + python3.10 -m pip --no-cache-dir install ipython==5.3.0 && \ python3.10 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ python3.11 -m pip --no-cache-dir install ipython==5.3.0 && \ python3.11 -m pip --no-cache-dir install ipykernel==4.6.0 wheel && \ @@ -126,7 +130,8 @@ RUN python3.10 -m pip --no-cache-dir install ipython==5.3.0 && \ python3.14t -m pip --no-cache-dir install ipython==5.3.0 ipykernel==4.6.0 wheel # For PaddleTest CE -RUN python3.10 -m pip --no-cache-dir install pytest && \ +RUN python3.9 -m pip --no-cache-dir install pytest && \ + python3.10 -m pip --no-cache-dir install pytest && \ python3.11 -m pip --no-cache-dir install pytest && \ python3.12 -m pip --no-cache-dir install --break-system-packages pytest && \ python3.13 -m pip --no-cache-dir install pytest && \ @@ -134,7 +139,9 @@ RUN python3.10 -m pip --no-cache-dir install pytest && \ python3.14 -m pip --no-cache-dir install pytest && \ python3.14t -m pip --no-cache-dir install pytest -RUN python3.10 -m pip --no-cache-dir install pre-commit==2.17.0 && \ +RUN python3.9 -m pip --no-cache-dir install pre-commit==2.17.0 && \ + python3.10 -m pip --no-cache-dir install pre-commit==2.17.0 && \ + python3.9 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ python3.10 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ python3.11 -m pip --no-cache-dir install cpplint==1.6.0 clang-format==13.0.0 && \ python3.12 -m pip --no-cache-dir install --break-system-packages cpplint==1.6.0 clang-format==13.0.0 && \ @@ -146,7 +153,9 @@ RUN python3.10 -m pip --no-cache-dir install pre-commit==2.17.0 && \ COPY ./python/requirements.txt /root/ COPY ./python/unittest_py/requirements.txt /home/ -RUN python3.10 -m pip --no-cache-dir install -r /root/requirements.txt && \ +RUN python3.9 -m pip --no-cache-dir install -r /root/requirements.txt && \ + python3.9 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ + python3.10 -m pip --no-cache-dir install -r /root/requirements.txt && \ python3.10 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ python3.11 -m pip --no-cache-dir install -r /root/requirements.txt && \ python3.11 -m pip --no-cache-dir install --break-system-packages --ignore-installed -r /home/requirements.txt && \ diff --git a/tools/dockerfile/ci_dockerfile.sh b/tools/dockerfile/ci_dockerfile.sh index f50749fcd3cc05..fd984efc4d45b8 100644 --- a/tools/dockerfile/ci_dockerfile.sh +++ b/tools/dockerfile/ci_dockerfile.sh @@ -75,25 +75,24 @@ function make_ce_framework_dockerfile(){ function make_ubuntu20_cu12_dockerfile(){ dockerfile_name="Dockerfile.cuda117_cudnn8_gcc82_ubuntu18_coverage" - sed "s##nvidia/cuda:13.0.0-cudnn-devel-ubuntu24.04#g" ./Dockerfile.ubuntu24 >${dockerfile_name} - sed -i "s###g" ${dockerfile_name} + sed "s##nvidia/cuda:12.0.1-cudnn8-devel-ubuntu22.04#g" ./Dockerfile.ubuntu22 >${dockerfile_name} + sed -i "s##ENV LD_LIBRARY_PATH=/usr/local/cuda-12.0/targets/x86_64-linux/lib:\$LD_LIBRARY_PATH #g" ${dockerfile_name} sed -i 's###g' ${dockerfile_name} - sed -i 's#add-apt-repository ppa:deadsnakes/ppa \&\&#add-apt-repository ppa:deadsnakes/ppa \&\& add-apt-repository ppa:ubuntu-toolchain-r/test \&\&#g' ${dockerfile_name} sed -i "7i ENV TZ=Asia/Beijing" ${dockerfile_name} - sed -i "8i RUN ln -snf /usr/share/zoneinfo/\$TZ /etc/localtime && echo \$TZ > /etc/timezone" ${dockerfile_name} + sed -i "8i RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone" ${dockerfile_name} sed -i "27i RUN apt-get update && apt-get install -y liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev libsndfile1" ${dockerfile_name} dockerfile_line=$(wc -l ${dockerfile_name}|awk '{print $1}') sed -i "${dockerfile_line}i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz \&\& \ tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/" ${dockerfile_name} - sed -i "${dockerfile_line}i RUN apt update \&\& apt install -y git libcurl4-openssl-dev gettext pigz zstd ninja-build" ${dockerfile_name} + sed -i "${dockerfile_line}i RUN apt remove git -y \&\& apt update \&\& apt install -y libcurl4-openssl-dev gettext pigz zstd ninja-build \&\& wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz \&\& \ + tar -xvf git-2.17.1.tar.gz \&\& \ + cd git-2.17.1 \&\& \ + ./configure --with-openssl --with-curl --prefix=/usr/local \&\& \ + make -j8 \&\& make install " ${dockerfile_name} sed -i "${dockerfile_line}i RUN pip install wheel \&\& pip3.12 install PyGithub wheel distro jinja2" ${dockerfile_name} + sed -i 's# && rm /etc/apt/sources.list.d/nvidia-ml.list##g' ${dockerfile_name} sed -i 's#RUN bash /build_scripts/install_trt.sh##g' ${dockerfile_name} - sed -i "${dockerfile_line}i RUN apt-get update \&\& \ - apt-get install -y gcc-15 g++-15 \&\& \ - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 150 \&\& \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-15 150 \&\& \ - update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-15 150 \&\& \ - update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-15 150" ${dockerfile_name} + sed -i 's##RUN bash /build_scripts/install_cudnn.sh cudnn896 #g' ${dockerfile_name} }