Skip to content

Commit fef0dc8

Browse files
authored
Merge branch 'pytorch:main' into main
2 parents 49d4076 + 1586521 commit fef0dc8

File tree

3,009 files changed

+62399
-17624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,009 files changed

+62399
-17624
lines changed

.ci/aarch64_linux/aarch64_wheel_ci_build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def package_cuda_wheel(wheel_path, desired_cuda) -> None:
7979
os.system(f"unzip {wheel_path} -d {folder}/tmp")
8080
libs_to_copy = [
8181
"/usr/local/cuda/extras/CUPTI/lib64/libcupti.so.12",
82+
"/usr/local/cuda/extras/CUPTI/lib64/libnvperf_host.so",
8283
"/usr/local/cuda/lib64/libcudnn.so.9",
8384
"/usr/local/cuda/lib64/libcublas.so.12",
8485
"/usr/local/cuda/lib64/libcublasLt.so.12",
@@ -88,6 +89,7 @@ def package_cuda_wheel(wheel_path, desired_cuda) -> None:
8889
"/usr/local/cuda/lib64/libcusparseLt.so.0",
8990
"/usr/local/cuda/lib64/libcusolver.so.11",
9091
"/usr/local/cuda/lib64/libcurand.so.10",
92+
"/usr/local/cuda/lib64/libnccl.so.2",
9193
"/usr/local/cuda/lib64/libnvJitLink.so.12",
9294
"/usr/local/cuda/lib64/libnvrtc.so.12",
9395
"/usr/local/cuda/lib64/libcudnn_adv.so.9",

.ci/docker/build.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -275,17 +275,6 @@ case "$tag" in
275275
VISION=yes
276276
TRITON=yes
277277
;;
278-
pytorch-linux-jammy-py3-clang12-asan)
279-
ANACONDA_PYTHON_VERSION=3.9
280-
CLANG_VERSION=12
281-
VISION=yes
282-
TRITON=yes
283-
;;
284-
pytorch-linux-jammy-py3-clang15-asan)
285-
ANACONDA_PYTHON_VERSION=3.10
286-
CLANG_VERSION=15
287-
VISION=yes
288-
;;
289278
pytorch-linux-jammy-py3-clang18-asan)
290279
ANACONDA_PYTHON_VERSION=3.10
291280
CLANG_VERSION=18
@@ -394,7 +383,7 @@ if [[ -n "${CI:-}" ]]; then
394383
fi
395384

396385
# Build image
397-
docker build \
386+
tar ch . | docker build \
398387
${no_cache_flag} \
399388
${progress_flag} \
400389
--build-arg "BUILD_ENVIRONMENT=${image}" \
@@ -433,7 +422,7 @@ docker build \
433422
-f $(dirname ${DOCKERFILE})/Dockerfile \
434423
-t "$tmp_tag" \
435424
"$@" \
436-
.
425+
-
437426

438427
# NVIDIA dockers for RC releases use tag names like `11.0-cudnn9-devel-ubuntu18.04-rc`,
439428
# for this case we will set UBUNTU_VERSION to `18.04-rc` so that the Dockerfile could
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b0e26b7359c147b8aa0af686c20510fb9b15990a
1+
ae324eeac8e102a2b40370e341460f3791353398

.ci/docker/common/install_cpython.sh

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
set -uex -o pipefail
44

55
PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python
6-
PYTHON_DOWNLOAD_GITHUB_BRANCH=https://github.com/python/cpython/archive/refs/heads # @lint-ignore
76
GET_PIP_URL=https://bootstrap.pypa.io/get-pip.py
87

98
# Python versions to be installed in /opt/$VERSION_NO
10-
CPYTHON_VERSIONS=${CPYTHON_VERSIONS:-"3.9.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.0t"}
9+
CPYTHON_VERSIONS=${CPYTHON_VERSIONS:-"3.9.0 3.10.1 3.11.0 3.12.0 3.13.0 3.13.0t 3.14.0 3.14.0t"}
1110

1211
function check_var {
1312
if [ -z "$1" ]; then
@@ -24,9 +23,8 @@ function do_cpython_build {
2423
tar -xzf Python-$py_ver.tgz
2524

2625
local additional_flags=""
27-
if [ "$py_ver" == "3.13.0t" ]; then
26+
if [[ "$py_ver" == *"t" ]]; then
2827
additional_flags=" --disable-gil"
29-
mv cpython-3.13/ cpython-3.13t/
3028
fi
3129

3230
pushd $py_folder
@@ -76,24 +74,20 @@ function do_cpython_build {
7674
function build_cpython {
7775
local py_ver=$1
7876
check_var $py_ver
79-
check_var $PYTHON_DOWNLOAD_URL
80-
local py_ver_folder=$py_ver
81-
82-
if [ "$py_ver" = "3.13.0t" ]; then
83-
PY_VER_SHORT="3.13"
84-
PYT_VER_SHORT="3.13t"
85-
check_var $PYTHON_DOWNLOAD_GITHUB_BRANCH
86-
wget $PYTHON_DOWNLOAD_GITHUB_BRANCH/$PY_VER_SHORT.tar.gz -O Python-$py_ver.tgz
87-
do_cpython_build $py_ver cpython-$PYT_VER_SHORT
88-
elif [ "$py_ver" = "3.13.0" ]; then
89-
PY_VER_SHORT="3.13"
90-
check_var $PYTHON_DOWNLOAD_GITHUB_BRANCH
91-
wget $PYTHON_DOWNLOAD_GITHUB_BRANCH/$PY_VER_SHORT.tar.gz -O Python-$py_ver.tgz
92-
do_cpython_build $py_ver cpython-$PY_VER_SHORT
93-
else
94-
wget -q $PYTHON_DOWNLOAD_URL/$py_ver_folder/Python-$py_ver.tgz
95-
do_cpython_build $py_ver Python-$py_ver
77+
local py_suffix=$py_ver
78+
local py_folder=$py_ver
79+
80+
# Special handling for nogil
81+
if [[ "${py_ver}" == *"t" ]]; then
82+
py_suffix=${py_ver::-1}
83+
py_folder=$py_suffix
84+
fi
85+
# Only b3 is available now
86+
if [ "$py_suffix" == "3.14.0" ]; then
87+
py_suffix="3.14.0b3"
9688
fi
89+
wget -q $PYTHON_DOWNLOAD_URL/$py_folder/Python-$py_suffix.tgz -O Python-$py_ver.tgz
90+
do_cpython_build $py_ver Python-$py_suffix
9791

9892
rm -f Python-$py_ver.tgz
9993
}

.ci/docker/common/install_onnx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pip_install \
2020

2121
pip_install coloredlogs packaging
2222
pip_install onnxruntime==1.18.1
23-
pip_install onnxscript==0.3.0
23+
pip_install onnxscript==0.3.1
2424

2525
# Cache the transformers model to be used later by ONNX tests. We need to run the transformers
2626
# package to download the model. By default, the model is cached at ~/.cache/huggingface/hub/

.ci/docker/common/install_rocm.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ Pin: release o=repo.radeon.com
2626
Pin-Priority: 600
2727
EOF
2828

29+
# we want the patch version of 6.4 instead
30+
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
31+
ROCM_VERSION="${ROCM_VERSION}.1"
32+
fi
33+
2934
# Add amdgpu repository
3035
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
3136
echo "deb [arch=amd64] https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
@@ -67,19 +72,23 @@ EOF
6772

6873
# ROCm 6.3 had a regression where initializing static code objects had significant overhead
6974
# ROCm 6.4 did not yet fix the regression, also HIP branch names are different
70-
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.3) ]] || [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
71-
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.3) ]]; then
72-
HIP_BRANCH=rocm-6.3.x
73-
VER_STR=6.3
75+
if [[ $(ver $ROCM_VERSION) -ge $(ver 6.3) ]] && [[ $(ver $ROCM_VERSION) -lt $(ver 7.0) ]]; then
76+
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4.1) ]]; then
77+
HIP_BRANCH=release/rocm-rel-6.4
78+
VER_STR=6.4
79+
VER_PATCH=.1
7480
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
7581
HIP_BRANCH=release/rocm-rel-6.4
7682
VER_STR=6.4
83+
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.3) ]]; then
84+
HIP_BRANCH=rocm-6.3.x
85+
VER_STR=6.3
7786
fi
7887
# clr build needs CppHeaderParser but can only find it using conda's python
7988
/opt/conda/bin/python -m pip install CppHeaderParser
8089
git clone https://github.com/ROCm/HIP -b $HIP_BRANCH
8190
HIP_COMMON_DIR=$(readlink -f HIP)
82-
git clone https://github.com/jeffdaily/clr -b release/rocm-rel-${VER_STR}-statco-hotfix
91+
git clone https://github.com/jeffdaily/clr -b release/rocm-rel-${VER_STR}${VER_PATCH}-statco-hotfix
8392
mkdir -p clr/build
8493
pushd clr/build
8594
cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR

.ci/docker/common/install_rocm_magma.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ set -eou pipefail
55

66
function do_install() {
77
rocm_version=$1
8-
rocm_version_nodot=${1//./}
8+
if [[ ${rocm_version} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
9+
# chop off any patch version
10+
rocm_version="${rocm_version%.*}"
11+
fi
12+
13+
rocm_version_nodot=${rocm_version//./}
914

1015
# Version 2.7.2 + ROCm related updates
1116
MAGMA_VERSION=a1625ff4d9bc362906bd01f805dbbe12612953f6

.ci/docker/common/install_triton.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ fi
9898
if [ -n "${NUMPY_VERSION}" ]; then
9999
pip_install "numpy==${NUMPY_VERSION}"
100100
fi
101+
102+
# IMPORTANT: helion needs to be installed without dependencies.
103+
# It depends on torch and triton. We don't want to install
104+
# triton and torch from production on Docker CI images
101105
if [[ "$ANACONDA_PYTHON_VERSION" != 3.9* ]]; then
102-
pip_install helion
106+
pip_install helion --no-deps
103107
fi

.ci/docker/libtorch/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ case ${DOCKER_TAG_PREFIX} in
3939
DOCKER_GPU_BUILD_ARG=""
4040
;;
4141
rocm*)
42+
# we want the patch version of 6.4 instead
43+
if [[ $(ver $GPU_ARCH_VERSION) -eq $(ver 6.4) ]]; then
44+
GPU_ARCH_VERSION="${GPU_ARCH_VERSION}.1"
45+
fi
4246
BASE_TARGET=rocm
4347
GPU_IMAGE=rocm/dev-ubuntu-22.04:${GPU_ARCH_VERSION}-complete
4448
PYTORCH_ROCM_ARCH="gfx900;gfx906;gfx908;gfx90a;gfx942;gfx1030;gfx1100;gfx1101;gfx1102;gfx1200;gfx1201"

.ci/docker/manywheel/Dockerfile_2_28

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ADD ./common/install_openssl.sh install_openssl.sh
2626
RUN bash ./install_openssl.sh && rm install_openssl.sh
2727

2828

29-
# remove unncessary python versions
29+
# remove unnecessary python versions
3030
RUN rm -rf /opt/python/cp26-cp26m /opt/_internal/cpython-2.6.9-ucs2
3131
RUN rm -rf /opt/python/cp26-cp26mu /opt/_internal/cpython-2.6.9-ucs4
3232
RUN rm -rf /opt/python/cp33-cp33m /opt/_internal/cpython-3.3.6

0 commit comments

Comments
 (0)