Skip to content

Commit

Permalink
Merge branch 'master' into fix-overrides-classmethods
Browse files Browse the repository at this point in the history
  • Loading branch information
ezyang committed Nov 3, 2020
2 parents e0ffce1 + a341a43 commit 178b1c5
Show file tree
Hide file tree
Showing 393 changed files with 9,675 additions and 3,217 deletions.
1 change: 1 addition & 0 deletions .circleci/cimodel/data/dimensions.py
Expand Up @@ -10,6 +10,7 @@
ROCM_VERSIONS = [
"3.7",
"3.8",
"3.9",
]

ROCM_VERSION_LABELS = ["rocm" + v for v in ROCM_VERSIONS]
Expand Down
8 changes: 6 additions & 2 deletions .circleci/cimodel/data/pytorch_build_data.py
Expand Up @@ -57,7 +57,7 @@
]),
]),
]),
("11.1", [
("11.0", [
("3.8", [
X(True),
("libtorch", [
Expand All @@ -84,7 +84,11 @@
("gcc", [
("9", [
("3.8", [
("coverage", [XImportant(True)]),
("coverage", [
(True, [
("shard_test", [XImportant(True)]),
]),
]),
]),
]),
]),
Expand Down
9 changes: 5 additions & 4 deletions .circleci/cimodel/data/pytorch_build_definitions.py
Expand Up @@ -272,6 +272,7 @@ def instantiate_configs():
compiler_version = fc.find_prop("compiler_version")
is_xla = fc.find_prop("is_xla") or False
is_asan = fc.find_prop("is_asan") or False
is_coverage = fc.find_prop("is_coverage") or False
is_onnx = fc.find_prop("is_onnx") or False
is_pure_torch = fc.find_prop("is_pure_torch") or False
is_vulkan = fc.find_prop("is_vulkan") or False
Expand Down Expand Up @@ -311,6 +312,10 @@ def instantiate_configs():
python_version = fc.find_prop("pyver")
parms_list[0] = fc.find_prop("abbreviated_pyver")

if is_coverage:
parms_list_ignored_for_docker_image.append("coverage")
python_version = fc.find_prop("pyver")

if is_onnx:
parms_list.append("onnx")
python_version = fc.find_prop("pyver")
Expand All @@ -325,17 +330,13 @@ def instantiate_configs():
is_important = fc.find_prop("is_important") or False
parallel_backend = fc.find_prop("parallel_backend") or None
build_only = fc.find_prop("build_only") or False
is_coverage = fc.find_prop("is_coverage") or False
shard_test = fc.find_prop("shard_test") or False
# TODO: fix pure_torch python test packaging issue.
if shard_test:
restrict_phases = ["build"] if restrict_phases is None else restrict_phases
restrict_phases.extend(["test1", "test2"])
if build_only or is_pure_torch:
restrict_phases = ["build"]
if is_coverage and restrict_phases is None:
restrict_phases = ["build", "coverage_test"]


gpu_resource = None
if cuda_version and cuda_version != "10":
Expand Down
2 changes: 1 addition & 1 deletion .circleci/cimodel/data/simple/docker_definitions.py
Expand Up @@ -43,7 +43,7 @@ def get_workflow_jobs():
parameters = OrderedDict({
"name": quote(f"docker-{image_name}"),
"image_name": quote(image_name),
})
})
if image_name == "pytorch-linux-xenial-py3.6-gcc5.4":
# pushing documentation on tags requires CircleCI to also
# build all the dependencies on tags, including this docker image
Expand Down
201 changes: 183 additions & 18 deletions .circleci/config.yml
Expand Up @@ -655,9 +655,11 @@ jobs:
echo "Retrieving test reports"
docker cp $id:/var/lib/jenkins/workspace/test/test-reports ./ || echo 'No test reports found!'
if [[ ${BUILD_ENVIRONMENT} == *"coverage"* ]]; then
echo "Retrieving coverage report"
echo "Retrieving Python coverage report"
docker cp $id:/var/lib/jenkins/workspace/test/.coverage ./test
docker cp $id:/var/lib/jenkins/workspace/test/coverage.xml ./test
echo "Retrieving C++ coverage report"
docker cp $id:/var/lib/jenkins/workspace/build/coverage.info ./test
python3 -mpip install codecov
python3 -mcodecov
fi
Expand Down Expand Up @@ -2179,6 +2181,39 @@ workflows:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
docker_image: "pytorch/manylinux-rocm:3.8"
- binary_linux_build:
name: binary_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly_build
build_environment: "manywheel 3.6m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
docker_image: "pytorch/manylinux-rocm:3.9"
- binary_linux_build:
name: binary_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly_build
build_environment: "manywheel 3.7m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
docker_image: "pytorch/manylinux-rocm:3.9"
- binary_linux_build:
name: binary_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly_build
build_environment: "manywheel 3.8m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
docker_image: "pytorch/manylinux-rocm:3.9"
- binary_linux_build:
name: binary_linux_conda_3_6_cpu_devtoolset7_nightly_build
build_environment: "conda 3.6 cpu devtoolset7"
Expand Down Expand Up @@ -3523,6 +3558,51 @@ workflows:
docker_image: "pytorch/manylinux-rocm:3.8"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- binary_linux_test:
name: binary_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly_test
build_environment: "manywheel 3.6m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
requires:
- binary_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly_build
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- binary_linux_test:
name: binary_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly_test
build_environment: "manywheel 3.7m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
requires:
- binary_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly_build
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- binary_linux_test:
name: binary_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly_test
build_environment: "manywheel 3.8m rocm3.9 devtoolset7"
filters:
branches:
only:
- /.*/
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
requires:
- binary_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly_build
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- binary_linux_test:
name: binary_linux_conda_3_6_cpu_devtoolset7_nightly_test
build_environment: "conda 3.6 cpu devtoolset7"
Expand Down Expand Up @@ -5068,6 +5148,48 @@ workflows:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: manywheel
upload_subfolder: rocm3.8
- binary_upload:
name: binary_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly_upload
context: org-member
requires:
- binary_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly_test
filters:
branches:
only:
- nightly
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: manywheel
upload_subfolder: rocm3.9
- binary_upload:
name: binary_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly_upload
context: org-member
requires:
- binary_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly_test
filters:
branches:
only:
- nightly
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: manywheel
upload_subfolder: rocm3.9
- binary_upload:
name: binary_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly_upload
context: org-member
requires:
- binary_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly_test
filters:
branches:
only:
- nightly
tags:
only:
- /v[0-9]+(\.[0-9]+)*-rc[0-9]+/
package_type: manywheel
upload_subfolder: rocm3.9
- binary_upload:
name: binary_linux_conda_3_6_cpu_devtoolset7_nightly_upload
context: org-member
Expand Down Expand Up @@ -6806,37 +6928,37 @@ workflows:
build_environment: "pytorch-libtorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda10.2-cudnn7-py3-gcc7"
- pytorch_linux_build:
name: pytorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
name: pytorch_linux_xenial_cuda11_0_cudnn8_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
- "docker-pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7"
filters:
branches:
only:
- master
- /ci-all\/.*/
- /release\/.*/
build_environment: "pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_environment: "pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7"
- pytorch_linux_test:
name: pytorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_test
name: pytorch_linux_xenial_cuda11_0_cudnn8_py3_gcc7_test
requires:
- pytorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
- pytorch_linux_xenial_cuda11_0_cudnn8_py3_gcc7_build
filters:
branches:
only:
- master
- /ci-all\/.*/
- /release\/.*/
build_environment: "pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_environment: "pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7-test"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- pytorch_linux_build:
name: pytorch_libtorch_linux_xenial_cuda11_1_cudnn8_py3_gcc7_build
name: pytorch_libtorch_linux_xenial_cuda11_0_cudnn8_py3_gcc7_build
requires:
- "docker-pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
build_environment: "pytorch-libtorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.1-cudnn8-py3-gcc7"
- "docker-pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7"
build_environment: "pytorch-libtorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-xenial-cuda11.0-cudnn8-py3-gcc7"
- pytorch_linux_build:
name: pytorch_linux_bionic_py3_6_clang9_build
requires:
Expand Down Expand Up @@ -6877,16 +6999,23 @@ workflows:
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.6-clang9"
resource_class: large
- pytorch_linux_build:
name: pytorch_linux_bionic_py3_8_gcc9_build
name: pytorch_linux_bionic_py3_8_gcc9_coverage_build
requires:
- "docker-pytorch-linux-bionic-py3.8-gcc9"
build_environment: "pytorch-linux-bionic-py3.8-gcc9-build"
build_environment: "pytorch-linux-bionic-py3.8-gcc9-coverage-build"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.8-gcc9"
- pytorch_linux_test:
name: pytorch_linux_bionic_py3_8_gcc9_coverage_test1
requires:
- pytorch_linux_bionic_py3_8_gcc9_coverage_build
build_environment: "pytorch-linux-bionic-py3.8-gcc9-coverage-test1"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.8-gcc9"
resource_class: large
- pytorch_linux_test:
name: pytorch_linux_bionic_py3_8_gcc9_coverage_test
name: pytorch_linux_bionic_py3_8_gcc9_coverage_test2
requires:
- pytorch_linux_bionic_py3_8_gcc9_build
build_environment: "pytorch-linux-bionic-py3.8-gcc9-coverage_test"
- pytorch_linux_bionic_py3_8_gcc9_coverage_build
build_environment: "pytorch-linux-bionic-py3.8-gcc9-coverage-test2"
docker_image: "308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.8-gcc9"
resource_class: large
- pytorch_linux_build:
Expand Down Expand Up @@ -7661,6 +7790,42 @@ workflows:
docker_image: "pytorch/manylinux-rocm:3.8"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- smoke_linux_test:
name: smoke_linux_manywheel_3_6m_rocm3_9_devtoolset7_nightly
build_environment: "manywheel 3.6m rocm3.9 devtoolset7"
requires:
- update_s3_htmls
filters:
branches:
only:
- postnightly
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- smoke_linux_test:
name: smoke_linux_manywheel_3_7m_rocm3_9_devtoolset7_nightly
build_environment: "manywheel 3.7m rocm3.9 devtoolset7"
requires:
- update_s3_htmls
filters:
branches:
only:
- postnightly
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- smoke_linux_test:
name: smoke_linux_manywheel_3_8m_rocm3_9_devtoolset7_nightly
build_environment: "manywheel 3.8m rocm3.9 devtoolset7"
requires:
- update_s3_htmls
filters:
branches:
only:
- postnightly
docker_image: "pytorch/manylinux-rocm:3.9"
use_cuda_docker_runtime: "1"
resource_class: gpu.medium
- smoke_linux_test:
name: smoke_linux_conda_3_6_cpu_devtoolset7_nightly
build_environment: "conda 3.6 cpu devtoolset7"
Expand Down
18 changes: 1 addition & 17 deletions .circleci/docker/build.sh
Expand Up @@ -77,9 +77,7 @@ TRAVIS_DL_URL_PREFIX="https://s3.amazonaws.com/travis-python-archives/binaries/u
# from scratch
case "$image" in
pytorch-linux-xenial-py3.8)
# TODO: This is a hack, get rid of this as soon as you get rid of the travis downloads
TRAVIS_DL_URL_PREFIX="https://s3.amazonaws.com/travis-python-archives/binaries/ubuntu/16.04/x86_64"
TRAVIS_PYTHON_VERSION=3.8
ANACONDA_PYTHON_VERSION=3.8
GCC_VERSION=7
# Do not install PROTOBUF, DB, and VISION as a test
;;
Expand Down Expand Up @@ -362,7 +360,6 @@ docker build \
--build-arg "GLIBC_VERSION=${GLIBC_VERSION}" \
--build-arg "CLANG_VERSION=${CLANG_VERSION}" \
--build-arg "ANACONDA_PYTHON_VERSION=${ANACONDA_PYTHON_VERSION}" \
--build-arg "TRAVIS_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION}" \
--build-arg "GCC_VERSION=${GCC_VERSION}" \
--build-arg "CUDA_VERSION=${CUDA_VERSION}" \
--build-arg "CUDNN_VERSION=${CUDNN_VERSION}" \
Expand Down Expand Up @@ -405,19 +402,6 @@ if [[ "$OS" == "ubuntu" ]]; then
fi
fi

if [ -n "$TRAVIS_PYTHON_VERSION" ]; then
if [[ "$TRAVIS_PYTHON_VERSION" != nightly ]]; then
if !(drun python --version 2>&1 | grep -qF "Python $TRAVIS_PYTHON_VERSION"); then
echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION, but:"
drun python --version
exit 1
fi
else
echo "Please manually check nightly is OK:"
drun python --version
fi
fi

if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
if !(drun python --version 2>&1 | grep -qF "Python $ANACONDA_PYTHON_VERSION"); then
echo "ANACONDA_PYTHON_VERSION=$ANACONDA_PYTHON_VERSION, but:"
Expand Down
2 changes: 1 addition & 1 deletion .circleci/docker/centos-rocm/Dockerfile
Expand Up @@ -27,7 +27,7 @@ RUN rm install_glibc.sh
ADD ./common/install_user.sh install_user.sh
RUN bash ./install_user.sh && rm install_user.sh

# Install conda
# Install conda and other packages (e.g., numpy, coverage, pytest)
ENV PATH /opt/conda/bin:$PATH
ARG ANACONDA_PYTHON_VERSION
ADD ./common/install_conda.sh install_conda.sh
Expand Down

0 comments on commit 178b1c5

Please sign in to comment.