Skip to content

Commit 3a43c94

Browse files
Update
[ghstack-poisoned]
2 parents dabb920 + fef07f6 commit 3a43c94

File tree

194 files changed

+2539
-974
lines changed

Some content is hidden

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

194 files changed

+2539
-974
lines changed

.ci/docker/build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ case "$image" in
291291
PROTOBUF=yes
292292
DB=yes
293293
VISION=yes
294-
ROCM_VERSION=6.0
294+
ROCM_VERSION=6.1
295295
NINJA_VERSION=1.9.0
296296
CONDA_CMAKE=yes
297297
TRITON=yes
@@ -302,7 +302,7 @@ case "$image" in
302302
PROTOBUF=yes
303303
DB=yes
304304
VISION=yes
305-
ROCM_VERSION=6.1
305+
ROCM_VERSION=6.2
306306
NINJA_VERSION=1.9.0
307307
CONDA_CMAKE=yes
308308
TRITON=yes

.ci/docker/common/install_cusparselt.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55
# cuSPARSELt license: https://docs.nvidia.com/cuda/cusparselt/license.html
66
mkdir tmp_cusparselt && cd tmp_cusparselt
77

8-
if [[ ${CUDA_VERSION:0:4} =~ ^12\.[2-4]$ ]]; then
8+
if [[ ${CUDA_VERSION:0:4} =~ ^12\.[2-6]$ ]]; then
99
arch_path='sbsa'
1010
export TARGETARCH=${TARGETARCH:-$(uname -m)}
1111
if [ ${TARGETARCH} = 'amd64' ] || [ "${TARGETARCH}" = 'x86_64' ]; then

.ci/docker/common/install_miopen.sh

+40-8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ if [[ -z $ROCM_VERSION ]]; then
1010
exit 1;
1111
fi
1212

13+
IS_UBUNTU=0
14+
ID=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
15+
case "$ID" in
16+
ubuntu)
17+
IS_UBUNTU=1
18+
;;
19+
centos)
20+
IS_UBUNTU=0
21+
;;
22+
*)
23+
echo "Unable to determine OS..."
24+
exit 1
25+
;;
26+
esac
27+
1328
# To make version comparison easier, create an integer representation.
1429
save_IFS="$IFS"
1530
IFS=. ROCM_VERSION_ARRAY=(${ROCM_VERSION})
@@ -58,8 +73,7 @@ MIOPEN_CMAKE_COMMON_FLAGS="
5873
"
5974
# Pull MIOpen repo and set DMIOPEN_EMBED_DB based on ROCm version
6075
if [[ $ROCM_INT -ge 60200 ]] && [[ $ROCM_INT -lt 60300 ]]; then
61-
echo "ROCm 6.2 MIOpen does not need any patches, do not build from source"
62-
exit 0
76+
MIOPEN_BRANCH="release/rocm-rel-6.2-staging"
6377
elif [[ $ROCM_INT -ge 60100 ]] && [[ $ROCM_INT -lt 60200 ]]; then
6478
echo "ROCm 6.1 MIOpen does not need any patches, do not build from source"
6579
exit 0
@@ -93,12 +107,21 @@ else
93107
exit 1
94108
fi
95109

96-
yum remove -y miopen-hip
110+
111+
if [[ ${IS_UBUNTU} == 1 ]]; then
112+
apt-get remove -y miopen-hip
113+
else
114+
yum remove -y miopen-hip
115+
fi
97116

98117
git clone https://github.com/ROCm/MIOpen -b ${MIOPEN_BRANCH}
99118
pushd MIOpen
100119
# remove .git to save disk space since CI runner was running out
101120
rm -rf .git
121+
# Don't build CK to save docker build time
122+
if [[ $ROCM_INT -ge 60200 ]]; then
123+
sed -i '/composable_kernel/d' requirements.txt
124+
fi
102125
# Don't build MLIR to save docker build time
103126
# since we are disabling MLIR backend for MIOpen anyway
104127
if [[ $ROCM_INT -ge 50400 ]] && [[ $ROCM_INT -lt 50500 ]]; then
@@ -111,10 +134,15 @@ cmake -P install_deps.cmake --minimum
111134

112135
# clean up since CI runner was running out of disk space
113136
rm -rf /tmp/*
114-
yum clean all
115-
rm -rf /var/cache/yum
116-
rm -rf /var/lib/yum/yumdb
117-
rm -rf /var/lib/yum/history
137+
if [[ ${IS_UBUNTU} == 1 ]]; then
138+
apt-get autoclean && apt-get clean
139+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
140+
else
141+
yum clean all
142+
rm -rf /var/cache/yum
143+
rm -rf /var/lib/yum/yumdb
144+
rm -rf /var/lib/yum/history
145+
fi
118146

119147
## Build MIOpen
120148
mkdir -p build
@@ -131,7 +159,11 @@ make -j $(nproc) package
131159
# clean up since CI runner was running out of disk space
132160
rm -rf /usr/local/cget
133161

134-
yum install -y miopen-*.rpm
162+
if [[ ${IS_UBUNTU} == 1 ]]; then
163+
sudo dpkg -i miopen-hip*.deb
164+
else
165+
yum install -y miopen-*.rpm
166+
fi
135167

136168
popd
137169
rm -rf MIOpen

.ci/docker/ubuntu-rocm/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ RUN rm install_rocm.sh
6868
COPY ./common/install_rocm_magma.sh install_rocm_magma.sh
6969
RUN bash ./install_rocm_magma.sh
7070
RUN rm install_rocm_magma.sh
71+
ADD ./common/install_miopen.sh install_miopen.sh
72+
RUN bash ./install_miopen.sh ${ROCM_VERSION} && rm install_miopen.sh
7173
ENV ROCM_PATH /opt/rocm
7274
ENV PATH /opt/rocm/bin:$PATH
7375
ENV PATH /opt/rocm/hcc/bin:$PATH
@@ -121,5 +123,8 @@ RUN bash ./install_cache.sh && rm install_cache.sh
121123
ARG BUILD_ENVIRONMENT
122124
ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT}
123125

126+
# Install LLVM dev version (Defined in the pytorch/builder github repository)
127+
COPY --from=pytorch/llvm:9.0.1 /opt/llvm /opt/llvm
128+
124129
USER jenkins
125130
CMD ["bash"]

.ci/pytorch/build.sh

+2-7
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,8 @@ if [[ ${BUILD_ENVIRONMENT} == *"parallelnative"* ]]; then
4949
fi
5050

5151
# Enable LLVM dependency for TensorExpr testing
52-
if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
53-
export USE_LLVM=/opt/rocm/llvm
54-
export LLVM_DIR=/opt/rocm/llvm/lib/cmake/llvm
55-
else
56-
export USE_LLVM=/opt/llvm
57-
export LLVM_DIR=/opt/llvm/lib/cmake/llvm
58-
fi
52+
export USE_LLVM=/opt/llvm
53+
export LLVM_DIR=/opt/llvm/lib/cmake/llvm
5954

6055
if [[ "$BUILD_ENVIRONMENT" == *executorch* ]]; then
6156
# To build test_edge_op_registration

.ci/pytorch/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1403,7 +1403,7 @@ test_linux_aarch64() {
14031403
inductor/test_pattern_matcher inductor/test_perf inductor/test_profiler inductor/test_select_algorithm inductor/test_smoke \
14041404
inductor/test_split_cat_fx_passes inductor/test_standalone_compile inductor/test_torchinductor \
14051405
inductor/test_torchinductor_codegen_dynamic_shapes inductor/test_torchinductor_dynamic_shapes \
1406-
--shard "$SHARD_NUMBER" "$NUM_TEST_SHARDS" --verbose
1406+
--shard "$SHARD_NUMBER" "$NUM_TEST_SHARDS" --verbose inductor/test_memory
14071407
}
14081408

14091409
if ! [[ "${BUILD_ENVIRONMENT}" == *libtorch* || "${BUILD_ENVIRONMENT}" == *-bazel-* ]]; then

.github/workflows/inductor-rocm.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -31,28 +31,28 @@ jobs:
3131
curr_branch: ${{ github.head_ref || github.ref_name }}
3232
curr_ref_type: ${{ github.ref_type }}
3333

34-
linux-focal-rocm6_1-py3_10-inductor-build:
35-
name: rocm6.1-py3.10-inductor
34+
linux-focal-rocm6_2-py3_10-inductor-build:
35+
name: rocm6.2-py3.10-inductor
3636
uses: ./.github/workflows/_linux-build.yml
3737
needs: get-label-type
3838
with:
3939
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
40-
build-environment: linux-focal-rocm6.1-py3.10
40+
build-environment: linux-focal-rocm6.2-py3.10
4141
docker-image-name: pytorch-linux-focal-rocm-n-py3
4242
test-matrix: |
4343
{ include: [
4444
{ config: "inductor", shard: 1, num_shards: 2, runner: "linux.rocm.gpu.2" },
4545
{ config: "inductor", shard: 2, num_shards: 2, runner: "linux.rocm.gpu.2" },
4646
]}
4747
48-
linux-focal-rocm6_1-py3_10-inductor-test:
48+
linux-focal-rocm6_2-py3_10-inductor-test:
4949
permissions:
5050
id-token: write
5151
contents: read
52-
name: rocm6.1-py3.10-inductor
52+
name: rocm6.2-py3.10-inductor
5353
uses: ./.github/workflows/_rocm-test.yml
54-
needs: linux-focal-rocm6_1-py3_10-inductor-build
54+
needs: linux-focal-rocm6_2-py3_10-inductor-build
5555
with:
56-
build-environment: linux-focal-rocm6.1-py3.10
57-
docker-image: ${{ needs.linux-focal-rocm6_1-py3_10-inductor-build.outputs.docker-image }}
58-
test-matrix: ${{ needs.linux-focal-rocm6_1-py3_10-inductor-build.outputs.test-matrix }}
56+
build-environment: linux-focal-rocm6.2-py3.10
57+
docker-image: ${{ needs.linux-focal-rocm6_2-py3_10-inductor-build.outputs.docker-image }}
58+
test-matrix: ${{ needs.linux-focal-rocm6_2-py3_10-inductor-build.outputs.test-matrix }}

.github/workflows/periodic.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -297,13 +297,13 @@ jobs:
297297
docker-image: ${{ needs.linux-vulkan-focal-py3_11-clang10-build.outputs.docker-image }}
298298
test-matrix: ${{ needs.linux-vulkan-focal-py3_11-clang10-build.outputs.test-matrix }}
299299

300-
linux-focal-rocm6_1-py3_10-build:
301-
name: linux-focal-rocm6.1-py3.10
300+
linux-focal-rocm6_2-py3_10-build:
301+
name: linux-focal-rocm6.2-py3.10
302302
uses: ./.github/workflows/_linux-build.yml
303303
needs: get-label-type
304304
with:
305305
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
306-
build-environment: linux-focal-rocm6.1-py3.10
306+
build-environment: linux-focal-rocm6.2-py3.10
307307
docker-image-name: pytorch-linux-focal-rocm-n-py3
308308
test-matrix: |
309309
{ include: [
@@ -312,19 +312,19 @@ jobs:
312312
{ config: "distributed", shard: 3, num_shards: 3, runner: "linux.rocm.gpu" },
313313
]}
314314
315-
linux-focal-rocm6_1-py3_10-test:
315+
linux-focal-rocm6_2-py3_10-test:
316316
permissions:
317317
id-token: write
318318
contents: read
319-
name: linux-focal-rocm6.1-py3.10
319+
name: linux-focal-rocm6.2-py3.10
320320
uses: ./.github/workflows/_rocm-test.yml
321321
needs:
322-
- linux-focal-rocm6_1-py3_10-build
322+
- linux-focal-rocm6_2-py3_10-build
323323
- target-determination
324324
with:
325-
build-environment: linux-focal-rocm6.1-py3.10
326-
docker-image: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.docker-image }}
327-
test-matrix: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.test-matrix }}
325+
build-environment: linux-focal-rocm6.2-py3.10
326+
docker-image: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.docker-image }}
327+
test-matrix: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.test-matrix }}
328328

329329
linux-focal-cuda12_1-py3_10-gcc9-experimental-split-build:
330330
name: linux-focal-cuda12.1-py3.10-gcc9-experimental-split-build

.github/workflows/pull.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,15 @@ jobs:
503503
]}
504504
secrets: inherit
505505

506-
linux-focal-rocm6_1-py3_10-build:
506+
linux-focal-rocm6_2-py3_10-build:
507507
# don't run build twice on main
508508
if: github.event_name == 'pull_request'
509-
name: linux-focal-rocm6.1-py3.10
509+
name: linux-focal-rocm6.2-py3.10
510510
uses: ./.github/workflows/_linux-build.yml
511511
needs: get-label-type
512512
with:
513513
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
514-
build-environment: linux-focal-rocm6.1-py3.10
514+
build-environment: linux-focal-rocm6.2-py3.10
515515
docker-image-name: pytorch-linux-focal-rocm-n-py3
516516
sync-tag: rocm-build
517517
test-matrix: |

.github/workflows/rocm.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ jobs:
2525
id-token: write
2626
contents: read
2727

28-
linux-focal-rocm6_1-py3_10-build:
29-
name: linux-focal-rocm6.1-py3.10
28+
linux-focal-rocm6_2-py3_10-build:
29+
name: linux-focal-rocm6.2-py3.10
3030
uses: ./.github/workflows/_linux-build.yml
3131
with:
32-
build-environment: linux-focal-rocm6.1-py3.10
32+
build-environment: linux-focal-rocm6.2-py3.10
3333
docker-image-name: pytorch-linux-focal-rocm-n-py3
3434
sync-tag: rocm-build
3535
test-matrix: |
@@ -42,16 +42,16 @@ jobs:
4242
{ config: "default", shard: 6, num_shards: 6, runner: "linux.rocm.gpu.2" },
4343
]}
4444
45-
linux-focal-rocm6_1-py3_10-test:
45+
linux-focal-rocm6_2-py3_10-test:
4646
permissions:
4747
id-token: write
4848
contents: read
49-
name: linux-focal-rocm6.1-py3.10
49+
name: linux-focal-rocm6.2-py3.10
5050
uses: ./.github/workflows/_rocm-test.yml
5151
needs:
52-
- linux-focal-rocm6_1-py3_10-build
52+
- linux-focal-rocm6_2-py3_10-build
5353
- target-determination
5454
with:
55-
build-environment: linux-focal-rocm6.1-py3.10
56-
docker-image: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.docker-image }}
57-
test-matrix: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.test-matrix }}
55+
build-environment: linux-focal-rocm6.2-py3.10
56+
docker-image: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.docker-image }}
57+
test-matrix: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.test-matrix }}

.github/workflows/slow.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -130,33 +130,33 @@ jobs:
130130
docker-image: ${{ needs.linux-focal-py3_9-clang10-build.outputs.docker-image }}
131131
test-matrix: ${{ needs.linux-focal-py3_9-clang10-build.outputs.test-matrix }}
132132

133-
linux-focal-rocm6_1-py3_10-build:
134-
name: linux-focal-rocm6.1-py3.10
133+
linux-focal-rocm6_2-py3_10-build:
134+
name: linux-focal-rocm6.2-py3.10
135135
uses: ./.github/workflows/_linux-build.yml
136136
needs: get-label-type
137137
with:
138138
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
139-
build-environment: linux-focal-rocm6.1-py3.10
139+
build-environment: linux-focal-rocm6.2-py3.10
140140
docker-image-name: pytorch-linux-focal-rocm-n-py3
141141
test-matrix: |
142142
{ include: [
143143
{ config: "slow", shard: 1, num_shards: 2, runner: "linux.rocm.gpu" },
144144
{ config: "slow", shard: 2, num_shards: 2, runner: "linux.rocm.gpu" },
145145
]}
146146
147-
linux-focal-rocm6_1-py3_10-test:
147+
linux-focal-rocm6_2-py3_10-test:
148148
permissions:
149149
id-token: write
150150
contents: read
151-
name: linux-focal-rocm6.1-py3.10
151+
name: linux-focal-rocm6.2-py3.10
152152
uses: ./.github/workflows/_rocm-test.yml
153153
needs:
154-
- linux-focal-rocm6_1-py3_10-build
154+
- linux-focal-rocm6_2-py3_10-build
155155
- target-determination
156156
with:
157-
build-environment: linux-focal-rocm6.1-py3.10
158-
docker-image: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.docker-image }}
159-
test-matrix: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.test-matrix }}
157+
build-environment: linux-focal-rocm6.2-py3.10
158+
docker-image: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.docker-image }}
159+
test-matrix: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.test-matrix }}
160160

161161
linux-jammy-py3_10-clang15-asan-build:
162162
name: linux-jammy-py3.10-clang15-asan

.github/workflows/trunk.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ jobs:
223223
cuda-version: "12.1"
224224
runner: "${{ needs.get-label-type.outputs.label-type }}windows.4xlarge.nonephemeral"
225225

226-
linux-focal-rocm6_1-py3_10-build:
227-
name: linux-focal-rocm6.1-py3.10
226+
linux-focal-rocm6_2-py3_10-build:
227+
name: linux-focal-rocm6.2-py3.10
228228
uses: ./.github/workflows/_linux-build.yml
229229
needs: get-label-type
230230
with:
231231
runner_prefix: "${{ needs.get-label-type.outputs.label-type }}"
232-
build-environment: linux-focal-rocm6.1-py3.10
232+
build-environment: linux-focal-rocm6.2-py3.10
233233
docker-image-name: pytorch-linux-focal-rocm-n-py3
234234
sync-tag: rocm-build
235235
test-matrix: |
@@ -240,19 +240,19 @@ jobs:
240240
]}
241241
secrets: inherit
242242

243-
linux-focal-rocm6_1-py3_10-test:
243+
linux-focal-rocm6_2-py3_10-test:
244244
permissions:
245245
id-token: write
246246
contents: read
247-
name: linux-focal-rocm6.1-py3.10
247+
name: linux-focal-rocm6.2-py3.10
248248
uses: ./.github/workflows/_rocm-test.yml
249249
needs:
250-
- linux-focal-rocm6_1-py3_10-build
250+
- linux-focal-rocm6_2-py3_10-build
251251
- target-determination
252252
with:
253-
build-environment: linux-focal-rocm6.1-py3.10
254-
docker-image: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.docker-image }}
255-
test-matrix: ${{ needs.linux-focal-rocm6_1-py3_10-build.outputs.test-matrix }}
253+
build-environment: linux-focal-rocm6.2-py3.10
254+
docker-image: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.docker-image }}
255+
test-matrix: ${{ needs.linux-focal-rocm6_2-py3_10-build.outputs.test-matrix }}
256256
tests-to-include: "test_nn test_torch test_cuda test_ops test_unary_ufuncs test_binary_ufuncs test_autograd inductor/test_torchinductor distributed/test_c10d_common distributed/test_c10d_nccl"
257257

258258
linux-focal-cuda12_4-py3_10-gcc9-experimental-split-build:

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,6 @@
127127
[submodule "third_party/NVTX"]
128128
path = third_party/NVTX
129129
url = https://github.com/NVIDIA/NVTX.git
130+
[submodule "third_party/x86-simd-sort"]
131+
path = third_party/x86-simd-sort
132+
url = https://github.com/intel/x86-simd-sort.git

0 commit comments

Comments
 (0)