Skip to content

Commit 74e1e9e

Browse files
[rocm6.4_internal_testing] Changes to support UB 24.04 build (#1817)
Changes applied from #1816 Test PyTorch build: http://rocm-ci.amd.com/job/mainline-framework-pytorch-ub24.04-py312-internal/5/
1 parent 7a19887 commit 74e1e9e

File tree

6 files changed

+17
-32
lines changed

6 files changed

+17
-32
lines changed

.ci/docker/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ if [[ "$image" == *-focal* ]]; then
5050
UBUNTU_VERSION=20.04
5151
elif [[ "$image" == *-jammy* ]]; then
5252
UBUNTU_VERSION=22.04
53+
elif [[ "$image" == *-noble* ]]; then
54+
UBUNTU_VERSION=24.04
5355
elif [[ "$image" == *ubuntu* ]]; then
5456
extract_version_from_image_name ubuntu UBUNTU_VERSION
5557
elif [[ "$image" == *centos* ]]; then

.ci/docker/common/install_base.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ install_ubuntu() {
1515
elif [[ "$UBUNTU_VERSION" == "22.04"* ]]; then
1616
cmake3="cmake=3.22*"
1717
maybe_libiomp_dev=""
18+
elif [[ "$UBUNTU_VERSION" == "24.04"* ]]; then
19+
cmake3="cmake=3.28*"
20+
maybe_libiomp_dev=""
1821
else
1922
cmake3="cmake=3.5*"
2023
maybe_libiomp_dev="libiomp-dev"

.ci/docker/common/install_conda.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
103103
conda_install_through_forge libstdcxx-ng=12
104104
fi
105105

106+
if [ "$ANACONDA_PYTHON_VERSION" = "3.12" ] || [ "$UBUNTU_VERSION" == "24.04"* ] ; then
107+
conda_install_through_forge libstdcxx-ng=14
108+
fi
109+
106110
# Install some other packages, including those needed for Python test reporting
107111
pip_install -r /opt/conda/requirements-ci.txt
108112

.ci/docker/common/install_rocm.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ ver() {
88

99
install_ubuntu() {
1010
apt-get update
11-
if [[ $UBUNTU_VERSION == 18.04 ]]; then
12-
# gpg-agent is not available by default on 18.04
13-
apt-get install -y --no-install-recommends gpg-agent
14-
fi
15-
if [[ $UBUNTU_VERSION == 20.04 ]]; then
16-
# gpg-agent is not available by default on 20.04
17-
apt-get install -y --no-install-recommends gpg-agent
11+
# gpg-agent is not available by default
12+
apt-get install -y --no-install-recommends gpg-agent
13+
if [[ $(ver $UBUNTU_VERSION) -ge $(ver 22.04) ]]; then
14+
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' \
15+
| sudo tee /etc/apt/preferences.d/rocm-pin-600
1816
fi
1917
apt-get install -y kmod
2018
apt-get install -y wget

.ci/docker/requirements-ci.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ click
1616
#test that import:
1717

1818
coremltools==5.0b5 ; python_version < "3.12"
19+
coremltools==7.2 ; python_version == "3.12"
1920
#Description: Apple framework for ML integration
2021
#Pinned versions: 5.0b5
2122
#test that import:
@@ -63,6 +64,7 @@ lark==0.12.0
6364
#test that import:
6465

6566
librosa>=0.6.2 ; python_version < "3.11"
67+
librosa==0.10.2 ; python_version == "3.12"
6668
#Description: A python package for music and audio analysis
6769
#Pinned versions: >=0.6.2
6870
#test that import: test_spectral_ops.py
@@ -111,6 +113,7 @@ networkx==2.8.8
111113
numba==0.49.0 ; python_version < "3.9"
112114
numba==0.55.2 ; python_version == "3.9"
113115
numba==0.55.2 ; python_version == "3.10"
116+
numba==0.60.0 ; python_version == "3.12"
114117
#Description: Just-In-Time Compiler for Numerical Functions
115118
#Pinned versions: 0.54.1, 0.49.0, <=0.49.1
116119
#test that import: test_numba_integration.py

cmake/Dependencies.cmake

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -997,31 +997,6 @@ endif()
997997

998998
# ---[ HIP
999999
if(USE_ROCM)
1000-
# This prevents linking in the libtinfo from /opt/conda/lib which conflicts with ROCm libtinfo.
1001-
# Currently only active for Ubuntu 20.04 and greater versions.
1002-
if(UNIX AND EXISTS "/etc/os-release")
1003-
file(STRINGS /etc/os-release OS_RELEASE)
1004-
set(DISTRO_NAME "")
1005-
set(DISTRO_VERSION "")
1006-
foreach(line ${OS_RELEASE})
1007-
string(REGEX MATCH "^NAME=" DISTRO_NAME_MATCH ${line})
1008-
if (NOT DISTRO_NAME_MATCH STREQUAL "")
1009-
string(REGEX REPLACE "^NAME=\"(.*)\"" "\\1" DISTRO_NAME ${line})
1010-
endif()
1011-
string(REGEX MATCH "^VERSION_ID=" DISTRO_VERSION_MATCH ${line})
1012-
if (NOT DISTRO_VERSION_MATCH STREQUAL "")
1013-
string(REGEX REPLACE "^VERSION_ID=\"(.*)\"" "\\1" DISTRO_VERSION ${line})
1014-
endif()
1015-
endforeach()
1016-
if(DISTRO_NAME STREQUAL "Ubuntu" AND DISTRO_VERSION VERSION_GREATER_EQUAL "20.04")
1017-
find_library(LIBTINFO_LOC tinfo NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH)
1018-
if(LIBTINFO_LOC)
1019-
get_filename_component(LIBTINFO_LOC_PARENT ${LIBTINFO_LOC} DIRECTORY)
1020-
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath-link,${LIBTINFO_LOC_PARENT}")
1021-
endif()
1022-
endif()
1023-
endif()
1024-
10251000
include(${CMAKE_CURRENT_LIST_DIR}/public/LoadHIP.cmake)
10261001
if(PYTORCH_FOUND_HIP)
10271002
message(INFO "Compiling with HIP for AMD.")

0 commit comments

Comments
 (0)