Skip to content

Commit

Permalink
Merge branch 'master' into fix-status-runtime-benchmark-build
Browse files Browse the repository at this point in the history
  • Loading branch information
huydhn committed Nov 1, 2022
2 parents 304576e + fdc4197 commit 34da8e1
Show file tree
Hide file tree
Showing 305 changed files with 12,032 additions and 7,864 deletions.
4 changes: 4 additions & 0 deletions .circleci/docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ case "$image" in
fi
if [[ "$image" == *rocm* ]]; then
extract_version_from_image_name rocm ROCM_VERSION
NINJA_VERSION=1.9.0
fi
if [[ "$image" == *centos7* ]]; then
NINJA_VERSION=1.10.2
fi
if [[ "$image" == *gcc* ]]; then
extract_version_from_image_name gcc GCC_VERSION
Expand Down
1 change: 1 addition & 0 deletions .circleci/docker/common/install_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ install_ubuntu() {
vim \
jq \
libtool \
vim \
unzip \
gdb

Expand Down
22 changes: 20 additions & 2 deletions .circleci/docker/common/install_rocm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ install_ubuntu() {
if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
# Add amdgpu repository
UBUNTU_VERSION_NAME=`cat /etc/os-release | grep UBUNTU_CODENAME | awk -F= '{print $2}'`
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/ubuntu"
local amdgpu_baseurl
if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/ubuntu"
else
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/ubuntu"
fi
echo "deb [arch=amd64] ${amdgpu_baseurl} ${UBUNTU_VERSION_NAME} main" > /etc/apt/sources.list.d/amdgpu.list
fi

Expand All @@ -38,6 +43,10 @@ install_ubuntu() {
ROCM_REPO="xenial"
fi

if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
ROCM_REPO="${UBUNTU_VERSION_NAME}"
fi

# Add rocm repository
wget -qO - http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -
local rocm_baseurl="http://repo.radeon.com/rocm/apt/${ROCM_VERSION}"
Expand Down Expand Up @@ -78,7 +87,16 @@ install_centos() {

if [[ $(ver $ROCM_VERSION) -ge $(ver 4.5) ]]; then
# Add amdgpu repository
local amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/7.9/main/x86_64"
local amdgpu_baseurl
if [[ $OS_VERSION == 9 ]]; then
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/9.0/main/x86_64"
else
if [[ $(ver $ROCM_VERSION) -ge $(ver 5.3) ]]; then
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${ROCM_VERSION}/rhel/7.9/main/x86_64"
else
amdgpu_baseurl="https://repo.radeon.com/amdgpu/${AMDGPU_VERSIONS[$ROCM_VERSION]}/rhel/7.9/main/x86_64"
fi
fi
echo "[AMDGPU]" > /etc/yum.repos.d/amdgpu.repo
echo "name=AMDGPU" >> /etc/yum.repos.d/amdgpu.repo
echo "baseurl=${amdgpu_baseurl}" >> /etc/yum.repos.d/amdgpu.repo
Expand Down
10 changes: 10 additions & 0 deletions .github/actions/upload-test-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,13 @@ runs:
retention-days: 14
if-no-files-found: error
path: test/**/*.xml

- name: Store Usage Logs on Github
uses: actions/upload-artifact@v3
if: inputs.use-gha
with:
# Add the run attempt, see [Artifact run attempt]
name: usage-log-runattempt${{ github.run_attempt }}-${{ inputs.file-suffix }}.zip
retention-days: 14
if-no-files-found: ignore
path: usage_log.txt
2 changes: 1 addition & 1 deletion .github/ci_commit_pins/vision.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
add75968543f36818691f8b59880f5c04689a88e
cba1c011a87dd14af10f97bcb113fa09a8e2b396
37 changes: 37 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,40 @@
- torch/_dynamo/**
- torch/_inductor/**
- benchmarks/dynamo/**
- torch/_subclasses/fake_tensor.py
- torch/_subclasses/fake_utils.py
- torch/_subclasses/meta_utils.py

"module: cpu":
- aten/src/ATen/cpu/**
- aten/src/ATen/native/cpu/**
- aten/src/ATen/native/quantized/cpu/**
- aten/src/ATen/native/Convolution*.cpp
- aten/src/ATen/native/mkldnn/**
- torch/cpu/**
- torch/utils/mkldnn.py
- test/test_mkldnn.py

"module: mkldnn":
- third_party/ideep
- caffe2/ideep/**
- caffe2/python/ideep/**
- cmake/Modules/FindMKLDNN.cmake
- third_party/mkl-dnn.BUILD
- torch/csrc/jit/codegen/onednn/**
- test/test_jit_llga_fuser.py

"module: amp (automated mixed precision)":
- torch/amp/**
- aten/src/ATen/autocast_mode.*
- torch/csrc/jit/passes/autocast.cpp
- test/test_autocast.py

"NNC":
- torch/csrc/jit/tensorexpr/**

"oncall: quantization":
- torch/ao/quantization/**
- torch/quantization/**
- aten/src/ATen/quantized/**
- aten/src/ATen/native/quantized/cpu/**
1 change: 0 additions & 1 deletion .github/merge_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
- docs/source/onnx*
- docs/source/scripts/onnx/**
- scripts/onnx/**
- test/jit/test_export_modes.py
- test/onnx/**
- tools/onnx/**
- torch/_C/__init__.pyi.in
Expand Down
6 changes: 5 additions & 1 deletion .github/requirements/conda-env-macOS-ARM64
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@ dataclasses=0.8
pip=22.2.2
six=1.16.0
pillow=9.2.0
libuv=1.39.0
pkg-config=0.29.2
wheel=0.37.1
expecttest=0.1.3

# Not pinning certifi so that we can always get the latest certificates
certifi

# Cross-compiling arm64 from x86-64 picks up 1.40.0 while testing on arm64
# itself only has up to 1.39.0 from upstream conda. Both work though
libuv>=1.39.0,<=1.40.0
2 changes: 1 addition & 1 deletion .github/scripts/build_publish_nightly_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -xeuo pipefail

PYTORCH_DOCKER_TAG=$(git describe --tags --always)-devel
CUDA_VERSION=11.3.1
CUDA_VERSION=11.6.2

# Build PyTorch nightly docker
make -f docker.Makefile \
Expand Down
25 changes: 14 additions & 11 deletions .github/scripts/check_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""check_labels.py"""

from typing import Any, List
from datetime import datetime, timedelta

from export_pytorch_labels import get_pytorch_labels
from gitutils import (
Expand Down Expand Up @@ -39,22 +38,24 @@ def delete_comment(comment_id: int) -> None:

def has_required_labels(pr: GitHubPR) -> bool:
pr_labels = pr.get_labels()

# Check if PR is not user facing
is_not_user_facing_pr = any(label.strip() == "topic: not user facing" for label in pr_labels)
if is_not_user_facing_pr:
return True
return is_not_user_facing_pr or any(label.strip() in get_release_notes_labels() for label in pr_labels)


# Check if bot has already posted a message within the past hour to include a release notes label
def delete_comments(pr: GitHubPR) -> None:
# Delete all previous comments
for comment in pr.get_comments():
if comment.body_text.lstrip(" #").startswith(ERR_MSG_TITLE) and comment.author_login in BOT_AUTHORS:
ts = datetime.strptime(comment.created_at, "%Y-%m-%dT%H:%M:%SZ")
if (datetime.utcnow() - ts) < timedelta(hours=1):
return True
delete_comment(comment.database_id)
break

return any(label.strip() in get_release_notes_labels() for label in pr_labels)

def add_comment(pr: GitHubPR) -> None:
# Only make a comment if one doesn't exist already
for comment in pr.get_comments():
if comment.body_text.lstrip(" #").startswith(ERR_MSG_TITLE) and comment.author_login in BOT_AUTHORS:
return
gh_post_pr_comment(pr.org, pr.project, pr.pr_num, ERR_MSG)


def parse_args() -> Any:
Expand All @@ -74,8 +75,10 @@ def main() -> None:
try:
if not has_required_labels(pr):
print(ERR_MSG)
gh_post_pr_comment(pr.org, pr.project, pr.pr_num, ERR_MSG)
add_comment(pr)
exit(1)
else:
delete_comments(pr)
except Exception as e:
pass

Expand Down
38 changes: 38 additions & 0 deletions .github/scripts/gql_mocks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

106 changes: 0 additions & 106 deletions .github/scripts/process_commit.py

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/_mac-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ on:
default: "3.8"
description: |
The python version to be used. Will be 3.8 by default
environment-file:
required: false
type: string
description: Set the conda environment file used to setup macOS build.
test-matrix:
required: false
type: string
Expand Down Expand Up @@ -83,9 +87,20 @@ jobs:
fi
- name: Setup miniconda
if: inputs.environment-file == ''
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
with:
python-version: ${{ inputs.python_version }}
environment-file: .github/requirements/conda-env-${{ runner.os }}-${{ runner.arch }}

# This option is used when cross-compiling arm64 from x86-64. Specifically, we need arm64 conda
# environment even though the arch is x86-64
- name: Setup miniconda using the provided environment file
if: inputs.environment-file != ''
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
with:
python-version: ${{ inputs.python_version }}
environment-file: ${{ inputs.environment-file }}

- name: Install macOS homebrew dependencies
run: |
Expand Down

0 comments on commit 34da8e1

Please sign in to comment.