Skip to content

Commit c26b1e1

Browse files
committed
Update
[ghstack-poisoned]
2 parents 5afa62f + 816b2cf commit c26b1e1

File tree

597 files changed

+14729
-19475
lines changed

Some content is hidden

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

597 files changed

+14729
-19475
lines changed

.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ build --cxxopt=--std=c++17
22
build --copt=-I.
33
# Bazel does not support including its cc_library targets as system
44
# headers. We work around this for generated code
5-
# (e.g. c10/macros/cmake_macros.h) by making the generated directory a
5+
# (e.g. torch/headeronly/macros/cmake_macros.h) by making the generated directory a
66
# system include path.
77
build --copt=-isystem --copt bazel-out/k8-fastbuild/bin
88
build --copt=-isystem --copt bazel-out/darwin-fastbuild/bin

.ci/docker/build.sh

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -231,33 +231,34 @@ case "$tag" in
231231
VISION=yes
232232
TRITON=yes
233233
;;
234-
pytorch-linux-jammy-rocm-n-1-py3)
235-
ANACONDA_PYTHON_VERSION=3.10
234+
pytorch-linux-jammy-rocm-n-py3 | pytorch-linux-noble-rocm-n-py3)
235+
if [[ $tag =~ "jammy" ]]; then
236+
ANACONDA_PYTHON_VERSION=3.10
237+
else
238+
ANACONDA_PYTHON_VERSION=3.12
239+
fi
236240
GCC_VERSION=11
237241
VISION=yes
238-
ROCM_VERSION=6.3
242+
ROCM_VERSION=6.4
239243
NINJA_VERSION=1.9.0
240244
TRITON=yes
241245
KATEX=yes
242246
UCX_COMMIT=${_UCX_COMMIT}
243247
UCC_COMMIT=${_UCC_COMMIT}
244248
INDUCTOR_BENCHMARKS=yes
245249
;;
246-
pytorch-linux-jammy-rocm-n-py3 | pytorch-linux-noble-rocm-n-py3)
247-
if [[ $tag =~ "jammy" ]]; then
248-
ANACONDA_PYTHON_VERSION=3.10
249-
else
250-
ANACONDA_PYTHON_VERSION=3.12
251-
fi
250+
pytorch-linux-noble-rocm-alpha-py3)
251+
ANACONDA_PYTHON_VERSION=3.12
252252
GCC_VERSION=11
253253
VISION=yes
254-
ROCM_VERSION=6.4
254+
ROCM_VERSION=7.0
255255
NINJA_VERSION=1.9.0
256256
TRITON=yes
257257
KATEX=yes
258258
UCX_COMMIT=${_UCX_COMMIT}
259259
UCC_COMMIT=${_UCC_COMMIT}
260260
INDUCTOR_BENCHMARKS=yes
261+
PYTORCH_ROCM_ARCH="gfx90a;gfx942;gfx950"
261262
;;
262263
pytorch-linux-jammy-xpu-2025.0-py3)
263264
ANACONDA_PYTHON_VERSION=3.9

.ci/docker/ci_commit_pins/triton.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ae848267bebc65c6181e8cc5e64a6357d2679260
1+
11ec6354315768a85da41032535e3b7b99c5f706

.ci/docker/common/install_conda.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ set -ex
44

55
# Optionally install conda
66
if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
7-
BASE_URL="https://repo.anaconda.com/miniconda"
8-
CONDA_FILE="Miniconda3-latest-Linux-x86_64.sh"
9-
if [[ $(uname -m) == "aarch64" ]] || [[ "$BUILD_ENVIRONMENT" == *xpu* ]] || [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
10-
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
11-
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
12-
fi
7+
BASE_URL="https://github.com/conda-forge/miniforge/releases/latest/download" # @lint-ignore
8+
CONDA_FILE="Miniforge3-Linux-$(uname -m).sh"
139

1410
MAJOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 1)
1511
MINOR_PYTHON_VERSION=$(echo "$ANACONDA_PYTHON_VERSION" | cut -d . -f 2)
@@ -21,7 +17,6 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
2117
exit 1
2218
;;
2319
esac
24-
2520
mkdir -p /opt/conda
2621
chown jenkins:jenkins /opt/conda
2722

.ci/docker/common/install_rocm.sh

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,22 @@ EOF
3333
ROCM_VERSION="${ROCM_VERSION}.1"
3434
fi
3535

36+
# Default url values
37+
rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
38+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu"
39+
40+
# Special case for ROCM_VERSION == 7.0
41+
if [[ $(ver "$ROCM_VERSION") -eq $(ver 7.0) ]]; then
42+
rocm_baseurl="https://repo.radeon.com/rocm/apt/7.0_alpha2"
43+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/30.10_alpha2/ubuntu"
44+
fi
45+
3646
# Add amdgpu repository
3747
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
38-
echo "deb [arch=amd64] https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
48+
echo "deb [arch=amd64] ${amdgpu_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
3949

4050
# Add rocm repository
4151
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
42-
local rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
4352
echo "deb [arch=amd64] ${rocm_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/rocm.list
4453
apt-get update --allow-insecure-repositories
4554

@@ -73,30 +82,30 @@ EOF
7382
done
7483

7584
# ROCm 6.3 had a regression where initializing static code objects had significant overhead
85+
# CI no longer builds for ROCm 6.3, but
7686
# ROCm 6.4 did not yet fix the regression, also HIP branch names are different
77-
if [[ $(ver $ROCM_VERSION) -ge $(ver 6.3) ]] && [[ $(ver $ROCM_VERSION) -lt $(ver 7.0) ]]; then
87+
if [[ $(ver $ROCM_VERSION) -ge $(ver 6.4) ]] && [[ $(ver $ROCM_VERSION) -lt $(ver 7.0) ]]; then
7888
if [[ $(ver $ROCM_VERSION) -eq $(ver 6.4.1) ]]; then
7989
HIP_BRANCH=release/rocm-rel-6.4
80-
VER_STR=6.4
81-
VER_PATCH=.1
90+
CLR_HASH=ca18eb3f77fa09292fcda62bc60c3e565d752ada # branch release/rocm-rel-6.4.1-statco-hotfix
8291
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.4) ]]; then
8392
HIP_BRANCH=release/rocm-rel-6.4
84-
VER_STR=6.4
85-
elif [[ $(ver $ROCM_VERSION) -eq $(ver 6.3) ]]; then
86-
HIP_BRANCH=rocm-6.3.x
87-
VER_STR=6.3
93+
CLR_HASH=600f5b0d2baed94d5121e2174a9de0851b040b0c # branch release/rocm-rel-6.4-statco-hotfix
8894
fi
8995
# clr build needs CppHeaderParser but can only find it using conda's python
9096
python -m pip install CppHeaderParser
9197
git clone https://github.com/ROCm/HIP -b $HIP_BRANCH
9298
HIP_COMMON_DIR=$(readlink -f HIP)
93-
git clone https://github.com/jeffdaily/clr -b release/rocm-rel-${VER_STR}${VER_PATCH}-statco-hotfix
99+
git clone https://github.com/jeffdaily/clr
100+
pushd clr
101+
git checkout $CLR_HASH
102+
popd
94103
mkdir -p clr/build
95104
pushd clr/build
96105
# Need to point CMake to the correct python installation to find CppHeaderParser
97106
cmake .. -DPython3_EXECUTABLE=/opt/conda/envs/py_${ANACONDA_PYTHON_VERSION}/bin/python3 -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR
98107
make -j
99-
cp hipamd/lib/libamdhip64.so.${VER_STR}.* /opt/rocm/lib/libamdhip64.so.${VER_STR}.*
108+
cp hipamd/lib/libamdhip64.so.6.4.* /opt/rocm/lib/libamdhip64.so.6.4.*
100109
popd
101110
rm -rf HIP clr
102111
fi

.ci/docker/requirements-docs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ sphinx-copybutton==0.5.0
5959
sphinx-design==0.4.0
6060
sphinxcontrib-mermaid==1.0.0
6161
myst-parser==0.18.1
62+
myst-nb

.ci/manywheel/build_common.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ if [[ -z "$PYTORCH_ROOT" ]]; then
9797
exit 1
9898
fi
9999
pushd "$PYTORCH_ROOT"
100-
retry pip install -q "setuptools>=70.1.0" packaging
101-
retry pip install -qU cmake ninja
100+
retry pip install -qUr requirements-build.txt
102101
python setup.py clean
103102
retry pip install -qr requirements.txt
104103
case ${DESIRED_PYTHON} in

.ci/manywheel/build_libtorch.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ if [[ -z "$PYTORCH_ROOT" ]]; then
9292
exit 1
9393
fi
9494
pushd "$PYTORCH_ROOT"
95-
retry pip install -q "setuptools>=70.1.0" packaging
96-
retry pip install -qU cmake ninja
95+
retry pip install -qUr requirements-build.txt
9796
python setup.py clean
9897
retry pip install -qr requirements.txt
9998
retry pip install -q numpy==2.0.1

.ci/pytorch/run_tests.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,13 @@ else
7474
fi
7575

7676
# Environment initialization
77+
retry pip install -qUr requirements-build.txt
7778
if [[ "$(uname)" == Darwin ]]; then
7879
# Install the testing dependencies
79-
retry pip install -q future hypothesis ${NUMPY_PACKAGE} ${PROTOBUF_PACKAGE} pytest setuptools six typing_extensions pyyaml
80+
retry pip install -q future hypothesis ${NUMPY_PACKAGE} ${PROTOBUF_PACKAGE} pytest
8081
else
8182
retry pip install -qr requirements.txt || true
82-
retry pip install -q hypothesis protobuf pytest setuptools || true
83+
retry pip install -q hypothesis protobuf pytest || true
8384
numpy_ver=1.15
8485
case "$(python --version 2>&1)" in
8586
*2* | *3.5* | *3.6*)

.ci/pytorch/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@ elif [[ $TEST_CONFIG == 'nogpu_AVX512' ]]; then
289289
export ATEN_CPU_CAPABILITY=avx2
290290
fi
291291

292+
if [[ "${TEST_CONFIG}" == "legacy_nvidia_driver" ]]; then
293+
# Make sure that CUDA can be initialized
294+
(cd test && python -c "import torch; torch.rand(2, 2, device='cuda')")
295+
export USE_LEGACY_DRIVER=1
296+
fi
297+
292298
test_python_legacy_jit() {
293299
time python test/run_test.py --include test_jit_legacy test_jit_fuser_legacy --verbose
294300
assert_git_not_dirty

0 commit comments

Comments
 (0)