Skip to content

Commit c08ce30

Browse files
fadara01pytorchmergebot
authored andcommitted
[ci][cpu] Update compiler to GCC-13 in jammy-aarch64 (pytorch#166849)
This is needed because manylinux uses GCC-13 since pytorch#152825 As a result of the current compiler version mismatches, we've seen tests passing jammy-aarch64 pre-commit CI, but failing for wheels built in manylinux Related to: pytorch#166736 Pull Request resolved: pytorch#166849 Approved by: https://github.com/robert-hardwick, https://github.com/malfet, https://github.com/Skylion007, https://github.com/atalman
1 parent e1a1aea commit c08ce30

File tree

8 files changed

+22
-11
lines changed

8 files changed

+22
-11
lines changed

.ci/docker/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ case "$tag" in
261261
PYTHON_VERSION=3.10
262262
CUDA_VERSION=12.8.1
263263
;;
264-
pytorch-linux-jammy-aarch64-py3.10-gcc11)
264+
pytorch-linux-jammy-aarch64-py3.10-gcc13)
265265
ANACONDA_PYTHON_VERSION=3.10
266-
GCC_VERSION=11
266+
GCC_VERSION=13
267267
ACL=yes
268268
VISION=yes
269269
OPENBLAS=yes
@@ -281,9 +281,9 @@ case "$tag" in
281281
# from pytorch/llvm:9.0.1 is x86 specific
282282
SKIP_LLVM_SRC_BUILD_INSTALL=yes
283283
;;
284-
pytorch-linux-jammy-aarch64-py3.10-gcc11-inductor-benchmarks)
284+
pytorch-linux-jammy-aarch64-py3.10-gcc13-inductor-benchmarks)
285285
ANACONDA_PYTHON_VERSION=3.10
286-
GCC_VERSION=11
286+
GCC_VERSION=13
287287
ACL=yes
288288
VISION=yes
289289
OPENBLAS=yes

.ci/docker/common/install_gcc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ if [ -n "$GCC_VERSION" ]; then
77
# Need the official toolchain repo to get alternate packages
88
add-apt-repository ppa:ubuntu-toolchain-r/test
99
apt-get update
10-
apt-get install -y g++-$GCC_VERSION
10+
apt-get install -y g++-$GCC_VERSION gfortran-$GCC_VERSION
1111
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-"$GCC_VERSION" 50
1212
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-"$GCC_VERSION" 50
1313
update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-"$GCC_VERSION" 50
14-
14+
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-"$GCC_VERSION" 50
1515

1616
# Cleanup package manager
1717
apt-get autoclean && apt-get clean

.github/workflows/docker-builds.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ jobs:
7777
pytorch-linux-noble-riscv64-py3.12-gcc14
7878
]
7979
include:
80-
- docker-image-name: pytorch-linux-jammy-aarch64-py3.10-gcc11
80+
- docker-image-name: pytorch-linux-jammy-aarch64-py3.10-gcc13
8181
runner: linux.arm64.m7g.4xlarge
8282
- docker-image-name: pytorch-linux-jammy-aarch64-py3.10-clang21
8383
runner: linux.arm64.m7g.4xlarge
84-
- docker-image-name: pytorch-linux-jammy-aarch64-py3.10-gcc11-inductor-benchmarks
84+
- docker-image-name: pytorch-linux-jammy-aarch64-py3.10-gcc13-inductor-benchmarks
8585
runner: linux.arm64.m7g.4xlarge
8686
timeout-minutes: 600
8787
# Docker uploads fail from LF runners, see https://github.com/pytorch/pytorch/pull/137358

.github/workflows/inductor-perf-test-nightly-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
7373
runner: linux.arm64.m7g.4xlarge
7474
build-environment: linux-jammy-aarch64-py3.10
75-
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc11-inductor-benchmarks
75+
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc13-inductor-benchmarks
7676
test-matrix: |
7777
{ include: [
7878
{ config: "inductor_huggingface_perf_cpu_aarch64", shard: 1, num_shards: 9, runner: "linux.arm64.m7g.metal" },

.github/workflows/linux-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
with:
3434
runner_prefix: ${{ needs.get-label-type.outputs.label-type }}
3535
build-environment: linux-jammy-aarch64-py3.10
36-
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc11
36+
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc13
3737
runner: linux.arm64.m7g.4xlarge
3838
test-matrix: |
3939
{ include: [

.github/workflows/operator_benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
with:
6161
build-environment: linux-jammy-aarch64-py3.10
6262
runner: linux.arm64.m7g.4xlarge
63-
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc11
63+
docker-image-name: ci-image:pytorch-linux-jammy-aarch64-py3.10-gcc13
6464
test-matrix: |
6565
{ include: [
6666
{ config: "cpu_operator_benchmark_short", shard: 1, num_shards: 1, runner: "linux.arm64.m8g.4xlarge" },

test/cpp/aoti_abi_check/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ endif()
4545
# Disable unused-variable warnings for variables that are only used to test compilation
4646
target_compile_options_if_supported(test_aoti_abi_check -Wno-unused-variable)
4747
target_compile_options_if_supported(test_aoti_abi_check -Wno-unused-but-set-variable)
48+
# Add -Wno-dangling-pointer for GCC 13
49+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
50+
target_compile_options_if_supported(test_aoti_abi_check -Wno-dangling-pointer)
51+
endif()
4852

4953
foreach(test_src ${AOTI_ABI_CHECK_VEC_TEST_SRCS})
5054
foreach(i RANGE ${NUM_CPU_CAPABILITY_NAMES})

test/cpp/api/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ if(NOT MSVC)
7070
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
7171
target_compile_options_if_supported(test_api "-Wno-error=nonnull")
7272
endif()
73+
74+
# Add -Wno-error=array-bounds for GCC 13+
75+
# See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113239
76+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13)
77+
target_compile_options_if_supported(test_api "-Wno-error=array-bounds")
78+
endif()
79+
7380
endif()
7481

7582
if(INSTALL_TEST)

0 commit comments

Comments
 (0)