8000 Merge branch 'master' of github.com:pytorch/pytorch into UCC_sequence… · pytorch/pytorch@27a7a07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 27a7a07

Browse files
committed
Merge branch 'master' of github.com:pytorch/pytorch into UCC_sequence_number_support
2 parents 2294b1a + 59001d0 commit 27a7a07

File tree

88 files changed

+2129
-930
lines changed

Some content is hidden

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

88 files changed

+2129
-930
lines changed

.circleci/docker/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ case "$image" in
250250
fi
251251
if [[ "$image" == *rocm* ]]; then
252252
extract_version_from_image_name rocm ROCM_VERSION
253+
NINJA_VERSION=1.9.0
254+
fi
255+
if [[ "$image" == *centos7* ]]; then
256+
NINJA_VERSION=1.10.2
253257
fi
254258
if [[ "$image" == *gcc* ]]; then
255259
extract_version_from_image_name gcc GCC_VERSION

.circleci/docker/common/install_base.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ install_ubuntu() {
6969
vim \
7070
jq \
7171
libtool \
72+
vim \
7273
unzip \
7374
gdb
7475

.circleci/docker/common/install_rocm.sh

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ install_ubuntu() {
2929
if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
3030
# Add amdgpu repository
3131
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
32-
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/ubuntu"
32+
local amdgpu_baseurl
33+
if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
34+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu"
35+
else
36+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/ubuntu"
37+
fi
3338
echo "deb [arch=amd64] ${amdgpu_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
3439
fi
3540

@@ -38,6 +43,10 @@ install_ubuntu() {
3843
ROCM_REPO="xenial"
3944
fi
4045

46+
if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
47+
ROCM_REPO="${UBUNTU_VERSION_NAME}"
48+
fi
49+
4150
# Add rocm repository
4251
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
4352
local rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
@@ -78,7 +87,16 @@ install_centos() {
7887

7988
if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
8089
# Add amdgpu repository
81-
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/7.9/main/x86_64"
90+
local amdgpu_baseurl
91+
if [[ $OS_VERSION == 9 ]]; then
92+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/9.0/main/x86_64"
93+
else
94+
if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
95+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/rhel/7.9/main/x86_64"
96+
else
97+
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/7.9/main/x86_64"
98+
fi
99+
fi
82100
echo "[AMDGPU]" > /etc/yum.repos.d/amdgpu.repo
83101
echo "name=AMDGPU" >> /etc/yum.repos.d/amdgpu.repo
84102
echo "baseurl=${amdgpu_baseurl}" >> /etc/yum.repos.d/amdgpu.repo

.github/actions/upload-test-artifacts/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,13 @@ runs:
129129
retention-days: 14
130130
if-no-files-found: error
131131
path: test/**/*.xml
132+
133+
- name: Store Usage Logs on Github
134+
uses: actions/upload-artifact@v3
135+
if: inputs.use-gha
136+
with:
137+
# Add the run attempt, see [Artifact run attempt]
138+
name: usage-log-runattempt${{ github.run_attempt }}-${{ inputs.file-suffix }}.zip
139+
retention-days: 14
140+
if-no-files-found: ignore
141+
path: usage_log.txt

.github/merge_rules.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
- docs/source/onnx*
77
- docs/source/scripts/onnx/**
88
- scripts/onnx/**
9-
- test/jit/test_export_modes.py
109
- test/onnx/**
1110
- tools/onnx/**
1211
- torch/_C/__init__.pyi.in

.github/requirements/conda-env-macOS-ARM64

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@ dataclasses=0.8
88
pip=22.2.2
99
six=1.16.0
1010
pillow=9.2.0
11-
libuv=1.39.0
1211
pkg-config=0.29.2
1312
wheel=0.37.1
13+
expecttest=0.1.3
1414

1515
# Not pinning certifi so that we can always get the latest certificates
1616
certifi
17+
18+
# Cross-compiling arm64 from x86-64 picks up 1.40.0 while testing on arm64
19+
# itself only has up to 1.39.0 from upstream conda. Both work though
20+
libuv>=1.39.0,<=1.40.0

.github/workflows/_mac-build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ on:
3333
default: "3.8"
3434
description: |
3535
The python version to be used. Will be 3.8 by default
36+
environment-file:
37+
required: false
38+
type: string
39+
description: Set the conda environment file used to setup macOS build.
3640
test-matrix:
3741
required: false
3842
type: string
@@ -83,9 +87,20 @@ jobs:
8387
fi
8488
8589
- name: Setup miniconda
90+
if: inputs.environment-file == ''
91+
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
92+
with:
93+
python-version: ${{ inputs.python_version }}
94+
environment-file: .github/requirements/conda-env-${{ runner.os }}-${{ runner.arch }}
95+
96+
# This option is used when cross-compiling arm64 from x86-64. Specifically, we need arm64 conda
97+
# environment even though the arch is x86-64
98+
- name: Setup miniconda using the provided environment file
99+
if: inputs.environment-file != ''
86100
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
87101
with:
88102
python-version: ${{ inputs.python_version }}
103+
environment-file: ${{ inputs.environment-file }}
89104

90105
- name: Install macOS homebrew dependencies
91106
run: |

.github/workflows/_mac-test-mps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
4242
with:
4343
python-version: 3.9
44+
environment-file: .github/requirements/conda-env-${{ runner.os }}-${{ runner.arch }}
4445

4546
- name: Install PyTorch
4647
env:
@@ -50,7 +51,6 @@ jobs:
5051
run: |
5152
# shellcheck disable=SC1090
5253
set -ex
53-
${CONDA_INSTALL} expecttest numpy=1.22.3 pyyaml=6.0
5454
${CONDA_RUN} python3 -mpip install "unittest-xml-reporting<=3.2.0,>=2.0.0"
5555
# As wheels are cross-compiled they are reported as x86_64 ones
5656
ORIG_WHLNAME=$(ls -1 dist/*.whl); ARM_WHLNAME=${ORIG_WHLNAME/x86_64/arm64}; mv ${ORIG_WHLNAME} ${ARM_WHLNAME}

.github/workflows/mac-mps.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ jobs:
2222
build-generates-artifacts: true
2323
# To match the one pre-installed in the m1 runners
2424
python_version: 3.9.12
25+
# We need to set the environment file here instead of trying to detect it automatically because
26+
# MacOS arm64 is cross-compiled from x86-64. Specifically, it means that arm64 conda environment
27+
# is needed when building PyTorch MacOS arm64 from x86-64
28+
environment-file: .github/requirements/conda-env-macOS-ARM64
2529
secrets:
2630
MACOS_SCCACHE_S3_ACCESS_KEY_ID: ${{ secrets.MACOS_SCCACHE_S3_ACCESS_KEY_ID }}
2731
MACOS_SCCACHE_S3_SECRET_ACCESS_KEY: ${{ secrets.MACOS_SCCACHE_S3_SECRET_ACCESS_KEY }}

.github/workflows/periodic.yml

Lines chang AAE4 ed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ concurrency:
1414

1515
jobs:
1616
linux-bionic-cuda11_6-py3-gcc7-slow-gradcheck-build:
17+
# Disable because slow-gradcheck tests take > 4 hrs and time out.
18+
# TODO(sdym@meta.com): investigate re-enabling slow-gradcheck tests.
19+
if: false
1720
name: linux-bionic-cuda11.6-py3-gcc7-slow-gradcheck
1821
uses: ./.github/workflows/_linux-build.yml
1922
with:
@@ -26,6 +29,9 @@ jobs:
2629
]}
2730
2831
linux-bionic-cuda11_6-py3-gcc7-slow-gradcheck-test:
32+
# Disable because slow-gradcheck tests take > 4 hrs and time out.
33+
# TODO(sdym@meta.com): investigate re-enabling slow-gradcheck tests.
34+
if: false
2935
name: linux-bionic-cuda11.6-py3-gcc7-slow-gradcheck
3036
uses: ./.github/workflows/_linux-test.yml
3137
needs: linux-bionic-cuda11_6-py3-gcc7-slow-gradcheck-build

0 commit comments

Comments
 (0)
0