From 285753619da8bc411ab75b0a4550398d5a7697a7 Mon Sep 17 00:00:00 2001 From: Eli Uriegas <1700823+seemethere@users.noreply.github.com> Date: Thu, 11 Feb 2021 17:09:41 -0800 Subject: [PATCH 1/5] .circleci: Add Python 3.9, CUDA 11.2 to CI (#3341) (cherry picked from commit 2f40a483d73018ae6e1488a484c5927f2b309969) Signed-off-by: Eli Uriegas --- .circleci/config.yml | 1236 ++++++++++++----- .circleci/config.yml.in | 20 +- .circleci/regenerate.py | 17 +- .../unittest/linux/scripts/environment.yml | 4 +- .circleci/unittest/linux/scripts/install.sh | 3 +- .circleci/unittest/linux/scripts/setup_env.sh | 9 + .../unittest/windows/scripts/environment.yml | 3 +- .circleci/unittest/windows/scripts/install.sh | 3 +- .../unittest/windows/scripts/setup_env.sh | 5 + packaging/pkg_helpers.bash | 28 +- packaging/torchvision/meta.yaml | 17 +- packaging/windows/internal/cuda_install.bat | 18 + test/common_utils.py | 4 + test/test_video.py | 4 + test/test_video_reader.py | 9 + 15 files changed, 1013 insertions(+), 367 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4d4fce9b722..017f2147266 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -73,6 +73,10 @@ binary_common: &binary_common description: "Wheel only: what docker image to use" type: string default: "pytorch/manylinux-cuda101" + conda_docker_image: + description: "Conda only: what docker image to use" + type: string + default: "pytorch/conda-builder:cpu" environment: PYTHON_VERSION: << parameters.python_version >> PYTORCH_VERSION: << parameters.pytorch_version >> @@ -189,7 +193,7 @@ jobs: binary_linux_conda: <<: *binary_common docker: - - image: "pytorch/conda-cuda" + - image: "<< parameters.conda_docker_image >>" resource_class: 2xlarge+ steps: - checkout_merge @@ -411,7 +415,11 @@ jobs: set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" conda env remove -n python${PYTHON_VERSION} || true - conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} conda install Pillow conda install -v -y -c pytorch-nightly pytorch @@ -436,7 +444,11 @@ jobs: command: | set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda env remove -n python${PYTHON_VERSION} || true + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html @@ -513,7 +525,7 @@ jobs: - env - run: name: Install torchvision - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh @@ -785,95 +797,125 @@ workflows: jobs: - circleci_consistency - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_wheel_py3.6_cpu python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_wheel_py3.6_cu101 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_wheel_py3.6_cu102 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu110 - name: binary_linux_wheel_py3.6_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_wheel_py3.6_cu112 python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_wheel_py3.7_cpu python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_wheel_py3.7_cu101 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_wheel_py3.7_cu102 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu110 - name: binary_linux_wheel_py3.7_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_wheel_py3.7_cu112 python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_wheel_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu92 - name: binary_linux_wheel_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_wheel_py3.8_cu101 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_wheel_py3.8_cu102 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_wheel: - cu_version: cu110 - name: binary_linux_wheel_py3.8_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_wheel_py3.8_cu112 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + name: binary_linux_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 + cu_version: cu101 + name: binary_linux_wheel_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 + cu_version: cu102 + name: binary_linux_wheel_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_wheel_py3.9_cu112 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda112 - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_wheel_py3.6_cpu python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_wheel_py3.7_cpu python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_wheel_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 + - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + name: binary_macos_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_win_wheel: cu_version: cpu filters: @@ -902,13 +944,13 @@ workflows: name: binary_win_wheel_py3.6_cu102 python_version: '3.6' - binary_win_wheel: - cu_version: cu110 + cu_version: cu112 filters: branches: only: master tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.6_cu110 + name: binary_win_wheel_py3.6_cu112 python_version: '3.6' - binary_win_wheel: cu_version: cpu @@ -938,16 +980,21 @@ workflows: name: binary_win_wheel_py3.7_cu102 python_version: '3.7' - binary_win_wheel: - cu_version: cu110 + cu_version: cu112 filters: branches: only: master tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.7_cu110 + name: binary_win_wheel_py3.7_cu112 python_version: '3.7' - binary_win_wheel: cu_version: cpu + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_wheel_py3.8_cpu python_version: '3.8' - binary_win_wheel: @@ -969,99 +1016,160 @@ workflows: name: binary_win_wheel_py3.8_cu102 python_version: '3.8' - binary_win_wheel: - cu_version: cu110 - name: binary_win_wheel_py3.8_cu110 + cu_version: cu112 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.8_cu112 python_version: '3.8' + - binary_win_wheel: + cu_version: cpu + name: binary_win_wheel_py3.9_cpu + python_version: '3.9' + - binary_win_wheel: + cu_version: cu101 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu101 + python_version: '3.9' + - binary_win_wheel: + cu_version: cu102 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu102 + python_version: '3.9' + - binary_win_wheel: + cu_version: cu112 + name: binary_win_wheel_py3.9_cu112 + python_version: '3.9' - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_conda_py3.6_cpu python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_conda_py3.6_cu101 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_conda_py3.6_cu102 python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu110 - name: binary_linux_conda_py3.6_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_conda_py3.6_cu112 python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_conda_py3.7_cpu python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_conda_py3.7_cu101 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_conda_py3.7_cu102 python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu110 - name: binary_linux_conda_py3.7_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_conda_py3.7_cu112 python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_linux_conda_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu92 - name: binary_linux_conda_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 name: binary_linux_conda_py3.8_cu101 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda101 - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 name: binary_linux_conda_py3.8_cu102 python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 - binary_linux_conda: - cu_version: cu110 - name: binary_linux_conda_py3.8_cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_conda_py3.8_cu112 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + name: binary_linux_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 + cu_version: cu101 + name: binary_linux_conda_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 + cu_version: cu102 + name: binary_linux_conda_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + name: binary_linux_conda_py3.9_cu112 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda112 - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_conda_py3.6_cpu python_version: '3.6' wheel_docker_image: pytorch/manylinux-cuda102 - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_conda_py3.7_cpu python_version: '3.7' wheel_docker_image: pytorch/manylinux-cuda102 - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu name: binary_macos_conda_py3.8_cpu python_version: '3.8' wheel_docker_image: pytorch/manylinux-cuda102 + - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + name: binary_macos_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_win_conda: cu_version: cpu filters: @@ -1090,13 +1198,13 @@ workflows: name: binary_win_conda_py3.6_cu102 python_version: '3.6' - binary_win_conda: - cu_version: cu110 + cu_version: cu112 filters: branches: only: master tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.6_cu110 + name: binary_win_conda_py3.6_cu112 python_version: '3.6' - binary_win_conda: cu_version: cpu @@ -1126,16 +1234,21 @@ workflows: name: binary_win_conda_py3.7_cu102 python_version: '3.7' - binary_win_conda: - cu_version: cu110 + cu_version: cu112 filters: branches: only: master tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.7_cu110 + name: binary_win_conda_py3.7_cu112 python_version: '3.7' - binary_win_conda: cu_version: cpu + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ name: binary_win_conda_py3.8_cpu python_version: '3.8' - binary_win_conda: @@ -1157,9 +1270,40 @@ workflows: name: binary_win_conda_py3.8_cu102 python_version: '3.8' - binary_win_conda: - cu_version: cu110 - name: binary_win_conda_py3.8_cu110 + cu_version: cu112 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.8_cu112 python_version: '3.8' + - binary_win_conda: + cu_version: cpu + name: binary_win_conda_py3.9_cpu + python_version: '3.9' + - binary_win_conda: + cu_version: cu101 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu101 + python_version: '3.9' + - binary_win_conda: + cu_version: cu102 + filters: + branches: + only: master + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu102 + python_version: '3.9' + - binary_win_conda: + cu_version: cu112 + name: binary_win_conda_py3.9_cu112 + python_version: '3.9' - build_docs: name: build_docs python_version: '3.7' @@ -1196,6 +1340,10 @@ workflows: cu_version: cpu name: unittest_linux_cpu_py3.8 python_version: '3.8' + - unittest_linux_cpu: + cu_version: cpu + name: unittest_linux_cpu_py3.9 + python_version: '3.9' - unittest_linux_gpu: cu_version: cu101 filters: @@ -1218,6 +1366,15 @@ workflows: cu_version: cu101 name: unittest_linux_gpu_py3.8 python_version: '3.8' + - unittest_linux_gpu: + cu_version: cu101 + filters: + branches: + only: + - master + - nightly + name: unittest_linux_gpu_py3.9 + python_version: '3.9' - unittest_windows_cpu: cu_version: cpu name: unittest_windows_cpu_py3.6 @@ -1230,6 +1387,10 @@ workflows: cu_version: cpu name: unittest_windows_cpu_py3.8 python_version: '3.8' + - unittest_windows_cpu: + cu_version: cpu + name: unittest_windows_cpu_py3.9 + python_version: '3.9' - unittest_windows_gpu: cu_version: cu101 filters: @@ -1252,6 +1413,15 @@ workflows: cu_version: cu101 name: unittest_windows_gpu_py3.8 python_version: '3.8' + - unittest_windows_gpu: + cu_version: cu101 + filters: + branches: + only: + - master + - nightly + name: unittest_windows_gpu_py3.9 + python_version: '3.9' - unittest_macos_cpu: cu_version: cpu name: unittest_macos_cpu_py3.6 @@ -1264,6 +1434,10 @@ workflows: cu_version: cpu name: unittest_macos_cpu_py3.8 python_version: '3.8' + - unittest_macos_cpu: + cu_version: cpu + name: unittest_macos_cpu_py3.9 + python_version: '3.9' cmake: jobs: @@ -1299,6 +1473,7 @@ workflows: - torchhub_test - torch_onnx_test - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -1329,36 +1504,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cpu_upload - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.6_cu92 - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.6_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.6_cu92 - subfolder: cu92/ - - smoke_test_linux_pip: - filters: - branches: - only: - - nightly - name: nightly_binary_linux_wheel_py3.6_cu92_smoke_test_pip - python_version: '3.6' - requires: - - nightly_binary_linux_wheel_py3.6_cu92_upload - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 filters: branches: @@ -1389,6 +1535,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu101_upload - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 filters: branches: @@ -1419,15 +1566,16 @@ workflows: requires: - nightly_binary_linux_wheel_py3.6_cu102_upload - binary_linux_wheel: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.6_cu110 + name: nightly_binary_linux_wheel_py3.6_cu112 python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_wheel_upload: context: org-member filters: @@ -1435,20 +1583,21 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.6_cu110_upload + name: nightly_binary_linux_wheel_py3.6_cu112_upload requires: - - nightly_binary_linux_wheel_py3.6_cu110 - subfolder: cu110/ + - nightly_binary_linux_wheel_py3.6_cu112 + subfolder: cu112/ - smoke_test_linux_pip: filters: branches: only: - nightly - name: nightly_binary_linux_wheel_py3.6_cu110_smoke_test_pip + name: nightly_binary_linux_wheel_py3.6_cu112_smoke_test_pip python_version: '3.6' requires: - - nightly_binary_linux_wheel_py3.6_cu110_upload + - nightly_binary_linux_wheel_py3.6_cu112_upload - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -1479,36 +1628,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cpu_upload - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.7_cu92 - subfolder: cu92/ - - smoke_test_linux_pip: - filters: - branches: - only: - - nightly - name: nightly_binary_linux_wheel_py3.7_cu92_smoke_test_pip - python_version: '3.7' - requires: - - nightly_binary_linux_wheel_py3.7_cu92_upload - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 filters: branches: @@ -1539,6 +1659,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu101_upload - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 filters: branches: @@ -1569,15 +1690,16 @@ workflows: requires: - nightly_binary_linux_wheel_py3.7_cu102_upload - binary_linux_wheel: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu110 + name: nightly_binary_linux_wheel_py3.7_cu112 python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_wheel_upload: context: org-member filters: @@ -1585,20 +1707,21 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.7_cu110_upload + name: nightly_binary_linux_wheel_py3.7_cu112_upload requires: - - nightly_binary_linux_wheel_py3.7_cu110 - subfolder: cu110/ + - nightly_binary_linux_wheel_py3.7_cu112 + subfolder: cu112/ - smoke_test_linux_pip: filters: branches: only: - nightly - name: nightly_binary_linux_wheel_py3.7_cu110_smoke_test_pip + name: nightly_binary_linux_wheel_py3.7_cu112_smoke_test_pip python_version: '3.7' requires: - - nightly_binary_linux_wheel_py3.7_cu110_upload + - nightly_binary_linux_wheel_py3.7_cu112_upload - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -1629,36 +1752,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cpu_upload - binary_linux_wheel: - cu_version: cu92 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.8_cu92 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_wheel_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.8_cu92_upload - requires: - - nightly_binary_linux_wheel_py3.8_cu92 - subfolder: cu92/ - - smoke_test_linux_pip: - filters: - branches: - only: - - nightly - name: nightly_binary_linux_wheel_py3.8_cu92_smoke_test_pip - python_version: '3.8' - requires: - - nightly_binary_linux_wheel_py3.8_cu92_upload - - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 filters: branches: @@ -1689,6 +1783,7 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu101_upload - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 filters: branches: @@ -1719,15 +1814,16 @@ workflows: requires: - nightly_binary_linux_wheel_py3.8_cu102_upload - binary_linux_wheel: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.8_cu110 + name: nightly_binary_linux_wheel_py3.8_cu112 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_wheel_upload: context: org-member filters: @@ -1735,28 +1831,29 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_wheel_py3.8_cu110_upload + name: nightly_binary_linux_wheel_py3.8_cu112_upload requires: - - nightly_binary_linux_wheel_py3.8_cu110 - subfolder: cu110/ + - nightly_binary_linux_wheel_py3.8_cu112 + subfolder: cu112/ - smoke_test_linux_pip: filters: branches: only: - nightly - name: nightly_binary_linux_wheel_py3.8_cu110_smoke_test_pip + name: nightly_binary_linux_wheel_py3.8_cu112_smoke_test_pip python_version: '3.8' requires: - - nightly_binary_linux_wheel_py3.8_cu110_upload - - binary_macos_wheel: + - nightly_binary_linux_wheel_py3.8_cu112_upload + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.6_cpu - python_version: '3.6' + name: nightly_binary_linux_wheel_py3.9_cpu + python_version: '3.9' wheel_docker_image: pytorch/manylinux-cuda102 - binary_wheel_upload: context: org-member @@ -1765,20 +1862,30 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.6_cpu_upload + name: nightly_binary_linux_wheel_py3.9_cpu_upload requires: - - nightly_binary_macos_wheel_py3.6_cpu - subfolder: '' - - binary_macos_wheel: - cu_version: cpu + - nightly_binary_linux_wheel_py3.9_cpu + subfolder: cpu/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cpu_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cpu_upload + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda101 + cu_version: cu101 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.7_cpu - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda102 + name: nightly_binary_linux_wheel_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 - binary_wheel_upload: context: org-member filters: @@ -1786,19 +1893,29 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.7_cpu_upload + name: nightly_binary_linux_wheel_py3.9_cu101_upload requires: - - nightly_binary_macos_wheel_py3.7_cpu - subfolder: '' - - binary_macos_wheel: - cu_version: cpu + - nightly_binary_linux_wheel_py3.9_cu101 + subfolder: cu101/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu101_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu101_upload + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda102 + cu_version: cu102 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.8_cpu - python_version: '3.8' + name: nightly_binary_linux_wheel_py3.9_cu102 + python_version: '3.9' wheel_docker_image: pytorch/manylinux-cuda102 - binary_wheel_upload: context: org-member @@ -1807,19 +1924,30 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_macos_wheel_py3.8_cpu_upload + name: nightly_binary_linux_wheel_py3.9_cu102_upload requires: - - nightly_binary_macos_wheel_py3.8_cpu - subfolder: '' - - binary_win_wheel: - cu_version: cpu + - nightly_binary_linux_wheel_py3.9_cu102 + subfolder: cu102/ + - smoke_test_linux_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_wheel_py3.9_cu102_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_linux_wheel_py3.9_cu102_upload + - binary_linux_wheel: + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cpu - python_version: '3.6' + name: nightly_binary_linux_wheel_py3.9_cu112 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda112 - binary_wheel_upload: context: org-member filters: @@ -1827,28 +1955,30 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cpu_upload + name: nightly_binary_linux_wheel_py3.9_cu112_upload requires: - - nightly_binary_win_wheel_py3.6_cpu - subfolder: cpu/ - - smoke_test_win_pip: + - nightly_binary_linux_wheel_py3.9_cu112 + subfolder: cu112/ + - smoke_test_linux_pip: filters: branches: only: - nightly - name: nightly_binary_win_wheel_py3.6_cpu_smoke_test_pip - python_version: '3.6' + name: nightly_binary_linux_wheel_py3.9_cu112_smoke_test_pip + python_version: '3.9' requires: - - nightly_binary_win_wheel_py3.6_cpu_upload - - binary_win_wheel: - cu_version: cu101 + - nightly_binary_linux_wheel_py3.9_cu112_upload + - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cu101 + name: nightly_binary_macos_wheel_py3.6_cpu python_version: '3.6' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_wheel_upload: context: org-member filters: @@ -1856,11 +1986,126 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cu101_upload + name: nightly_binary_macos_wheel_py3.6_cpu_upload requires: - - nightly_binary_win_wheel_py3.6_cu101 - subfolder: cu101/ - - smoke_test_win_pip: + - nightly_binary_macos_wheel_py3.6_cpu + subfolder: '' + - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.7_cpu + python_version: '3.7' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.7_cpu_upload + requires: + - nightly_binary_macos_wheel_py3.7_cpu + subfolder: '' + - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.8_cpu + python_version: '3.8' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.8_cpu_upload + requires: + - nightly_binary_macos_wheel_py3.8_cpu + subfolder: '' + - binary_macos_wheel: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_wheel_py3.9_cpu_upload + requires: + - nightly_binary_macos_wheel_py3.9_cpu + subfolder: '' + - binary_win_wheel: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.6_cpu + python_version: '3.6' + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.6_cpu_upload + requires: + - nightly_binary_win_wheel_py3.6_cpu + subfolder: cpu/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.6_cpu_smoke_test_pip + python_version: '3.6' + requires: + - nightly_binary_win_wheel_py3.6_cpu_upload + - binary_win_wheel: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.6_cu101 + python_version: '3.6' + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.6_cu101_upload + requires: + - nightly_binary_win_wheel_py3.6_cu101 + subfolder: cu101/ + - smoke_test_win_pip: filters: branches: only: @@ -1899,13 +2144,13 @@ workflows: requires: - nightly_binary_win_wheel_py3.6_cu102_upload - binary_win_wheel: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cu110 + name: nightly_binary_win_wheel_py3.6_cu112 python_version: '3.6' - binary_wheel_upload: context: org-member @@ -1914,19 +2159,19 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.6_cu110_upload + name: nightly_binary_win_wheel_py3.6_cu112_upload requires: - - nightly_binary_win_wheel_py3.6_cu110 - subfolder: cu110/ + - nightly_binary_win_wheel_py3.6_cu112 + subfolder: cu112/ - smoke_test_win_pip: filters: branches: only: - nightly - name: nightly_binary_win_wheel_py3.6_cu110_smoke_test_pip + name: nightly_binary_win_wheel_py3.6_cu112_smoke_test_pip python_version: '3.6' requires: - - nightly_binary_win_wheel_py3.6_cu110_upload + - nightly_binary_win_wheel_py3.6_cu112_upload - binary_win_wheel: cu_version: cpu filters: @@ -2015,13 +2260,13 @@ workflows: requires: - nightly_binary_win_wheel_py3.7_cu102_upload - binary_win_wheel: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu110 + name: nightly_binary_win_wheel_py3.7_cu112 python_version: '3.7' - binary_wheel_upload: context: org-member @@ -2030,19 +2275,19 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.7_cu110_upload + name: nightly_binary_win_wheel_py3.7_cu112_upload requires: - - nightly_binary_win_wheel_py3.7_cu110 - subfolder: cu110/ + - nightly_binary_win_wheel_py3.7_cu112 + subfolder: cu112/ - smoke_test_win_pip: filters: branches: only: - nightly - name: nightly_binary_win_wheel_py3.7_cu110_smoke_test_pip + name: nightly_binary_win_wheel_py3.7_cu112_smoke_test_pip python_version: '3.7' requires: - - nightly_binary_win_wheel_py3.7_cu110_upload + - nightly_binary_win_wheel_py3.7_cu112_upload - binary_win_wheel: cu_version: cpu filters: @@ -2131,13 +2376,13 @@ workflows: requires: - nightly_binary_win_wheel_py3.8_cu102_upload - binary_win_wheel: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.8_cu110 + name: nightly_binary_win_wheel_py3.8_cu112 python_version: '3.8' - binary_wheel_upload: context: org-member @@ -2146,58 +2391,146 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.8_cu110_upload + name: nightly_binary_win_wheel_py3.8_cu112_upload requires: - - nightly_binary_win_wheel_py3.8_cu110 - subfolder: cu110/ + - nightly_binary_win_wheel_py3.8_cu112 + subfolder: cu112/ - smoke_test_win_pip: filters: branches: only: - nightly - name: nightly_binary_win_wheel_py3.8_cu110_smoke_test_pip + name: nightly_binary_win_wheel_py3.8_cu112_smoke_test_pip python_version: '3.8' requires: - - nightly_binary_win_wheel_py3.8_cu110_upload - - binary_linux_conda: + - nightly_binary_win_wheel_py3.8_cu112_upload + - binary_win_wheel: cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cpu - python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda102 - - binary_conda_upload: + name: nightly_binary_win_wheel_py3.9_cpu + python_version: '3.9' + - binary_wheel_upload: context: org-member filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cpu_upload + name: nightly_binary_win_wheel_py3.9_cpu_upload requires: - - nightly_binary_linux_conda_py3.6_cpu - - smoke_test_linux_conda: + - nightly_binary_win_wheel_py3.9_cpu + subfolder: cpu/ + - smoke_test_win_pip: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.6_cpu_smoke_test_conda - python_version: '3.6' + name: nightly_binary_win_wheel_py3.9_cpu_smoke_test_pip + python_version: '3.9' requires: - - nightly_binary_linux_conda_py3.6_cpu_upload + - nightly_binary_win_wheel_py3.9_cpu_upload + - binary_win_wheel: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu101 + python_version: '3.9' + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu101_upload + requires: + - nightly_binary_win_wheel_py3.9_cu101 + subfolder: cu101/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu101_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu101_upload + - binary_win_wheel: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu102 + python_version: '3.9' + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu102_upload + requires: + - nightly_binary_win_wheel_py3.9_cu102 + subfolder: cu102/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu102_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu102_upload + - binary_win_wheel: + cu_version: cu112 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu112 + python_version: '3.9' + - binary_wheel_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu112_upload + requires: + - nightly_binary_win_wheel_py3.9_cu112 + subfolder: cu112/ + - smoke_test_win_pip: + filters: + branches: + only: + - nightly + name: nightly_binary_win_wheel_py3.9_cu112_smoke_test_pip + python_version: '3.9' + requires: + - nightly_binary_win_wheel_py3.9_cu112_upload - binary_linux_conda: - cu_version: cu92 + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cu92 + name: nightly_binary_linux_conda_py3.6_cpu python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda92 + wheel_docker_image: pytorch/manylinux-cuda102 - binary_conda_upload: context: org-member filters: @@ -2205,19 +2538,20 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cu92_upload + name: nightly_binary_linux_conda_py3.6_cpu_upload requires: - - nightly_binary_linux_conda_py3.6_cu92 + - nightly_binary_linux_conda_py3.6_cpu - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.6_cu92_smoke_test_conda + name: nightly_binary_linux_conda_py3.6_cpu_smoke_test_conda python_version: '3.6' requires: - - nightly_binary_linux_conda_py3.6_cu92_upload + - nightly_binary_linux_conda_py3.6_cpu_upload - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 filters: branches: @@ -2247,6 +2581,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.6_cu101_upload - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 filters: branches: @@ -2276,15 +2611,16 @@ workflows: requires: - nightly_binary_linux_conda_py3.6_cu102_upload - binary_linux_conda: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cu110 + name: nightly_binary_linux_conda_py3.6_cu112 python_version: '3.6' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_conda_upload: context: org-member filters: @@ -2292,19 +2628,20 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.6_cu110_upload + name: nightly_binary_linux_conda_py3.6_cu112_upload requires: - - nightly_binary_linux_conda_py3.6_cu110 + - nightly_binary_linux_conda_py3.6_cu112 - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.6_cu110_smoke_test_conda + name: nightly_binary_linux_conda_py3.6_cu112_smoke_test_conda python_version: '3.6' requires: - - nightly_binary_linux_conda_py3.6_cu110_upload + - nightly_binary_linux_conda_py3.6_cu112_upload - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -2334,35 +2671,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cpu_upload - binary_linux_conda: - cu_version: cu92 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.7_cu92 - python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda92 - - binary_conda_upload: - context: org-member - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.7_cu92_upload - requires: - - nightly_binary_linux_conda_py3.7_cu92 - - smoke_test_linux_conda: - filters: - branches: - only: - - nightly - name: nightly_binary_linux_conda_py3.7_cu92_smoke_test_conda - python_version: '3.7' - requires: - - nightly_binary_linux_conda_py3.7_cu92_upload - - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 cu_version: cu101 filters: branches: @@ -2392,6 +2701,7 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cu101_upload - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 cu_version: cu102 filters: branches: @@ -2421,15 +2731,16 @@ workflows: requires: - nightly_binary_linux_conda_py3.7_cu102_upload - binary_linux_conda: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.7_cu110 + name: nightly_binary_linux_conda_py3.7_cu112 python_version: '3.7' - wheel_docker_image: pytorch/manylinux-cuda110 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_conda_upload: context: org-member filters: @@ -2437,19 +2748,20 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.7_cu110_upload + name: nightly_binary_linux_conda_py3.7_cu112_upload requires: - - nightly_binary_linux_conda_py3.7_cu110 + - nightly_binary_linux_conda_py3.7_cu112 - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.7_cu110_smoke_test_conda + name: nightly_binary_linux_conda_py3.7_cu112_smoke_test_conda python_version: '3.7' requires: - - nightly_binary_linux_conda_py3.7_cu110_upload + - nightly_binary_linux_conda_py3.7_cu112_upload - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -2479,15 +2791,16 @@ workflows: requires: - nightly_binary_linux_conda_py3.8_cpu_upload - binary_linux_conda: - cu_version: cu92 + conda_docker_image: pytorch/conda-builder:cuda101 + cu_version: cu101 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu92 + name: nightly_binary_linux_conda_py3.8_cu101 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda92 + wheel_docker_image: pytorch/manylinux-cuda101 - binary_conda_upload: context: org-member filters: @@ -2495,28 +2808,29 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu92_upload + name: nightly_binary_linux_conda_py3.8_cu101_upload requires: - - nightly_binary_linux_conda_py3.8_cu92 + - nightly_binary_linux_conda_py3.8_cu101 - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.8_cu92_smoke_test_conda + name: nightly_binary_linux_conda_py3.8_cu101_smoke_test_conda python_version: '3.8' requires: - - nightly_binary_linux_conda_py3.8_cu92_upload + - nightly_binary_linux_conda_py3.8_cu101_upload - binary_linux_conda: - cu_version: cu101 + conda_docker_image: pytorch/conda-builder:cuda102 + cu_version: cu102 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu101 + name: nightly_binary_linux_conda_py3.8_cu102 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda101 + wheel_docker_image: pytorch/manylinux-cuda102 - binary_conda_upload: context: org-member filters: @@ -2524,28 +2838,29 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu101_upload + name: nightly_binary_linux_conda_py3.8_cu102_upload requires: - - nightly_binary_linux_conda_py3.8_cu101 + - nightly_binary_linux_conda_py3.8_cu102 - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.8_cu101_smoke_test_conda + name: nightly_binary_linux_conda_py3.8_cu102_smoke_test_conda python_version: '3.8' requires: - - nightly_binary_linux_conda_py3.8_cu101_upload + - nightly_binary_linux_conda_py3.8_cu102_upload - binary_linux_conda: - cu_version: cu102 + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu102 + name: nightly_binary_linux_conda_py3.8_cu112 python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda102 + wheel_docker_image: pytorch/manylinux-cuda112 - binary_conda_upload: context: org-member filters: @@ -2553,28 +2868,29 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu102_upload + name: nightly_binary_linux_conda_py3.8_cu112_upload requires: - - nightly_binary_linux_conda_py3.8_cu102 + - nightly_binary_linux_conda_py3.8_cu112 - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.8_cu102_smoke_test_conda + name: nightly_binary_linux_conda_py3.8_cu112_smoke_test_conda python_version: '3.8' requires: - - nightly_binary_linux_conda_py3.8_cu102_upload + - nightly_binary_linux_conda_py3.8_cu112_upload - binary_linux_conda: - cu_version: cu110 + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu110 - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda110 + name: nightly_binary_linux_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 - binary_conda_upload: context: org-member filters: @@ -2582,19 +2898,110 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_linux_conda_py3.8_cu110_upload + name: nightly_binary_linux_conda_py3.9_cpu_upload requires: - - nightly_binary_linux_conda_py3.8_cu110 + - nightly_binary_linux_conda_py3.9_cpu - smoke_test_linux_conda: filters: branches: only: - nightly - name: nightly_binary_linux_conda_py3.8_cu110_smoke_test_conda - python_version: '3.8' + name: nightly_binary_linux_conda_py3.9_cpu_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cpu_upload + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda101 + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu101 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda101 + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu101_upload + requires: + - nightly_binary_linux_conda_py3.9_cu101 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu101_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu101_upload + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda102 + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu102 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu102_upload + requires: + - nightly_binary_linux_conda_py3.9_cu102 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu102_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu102_upload + - binary_linux_conda: + conda_docker_image: pytorch/conda-builder:cuda112 + cu_version: cu112 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu112 + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda112 + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_linux_conda_py3.9_cu112_upload requires: - - nightly_binary_linux_conda_py3.8_cu110_upload + - nightly_binary_linux_conda_py3.9_cu112 + - smoke_test_linux_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_linux_conda_py3.9_cu112_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_linux_conda_py3.9_cu112_upload - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -2615,6 +3022,7 @@ workflows: requires: - nightly_binary_macos_conda_py3.6_cpu - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -2635,6 +3043,7 @@ workflows: requires: - nightly_binary_macos_conda_py3.7_cpu - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu cu_version: cpu filters: branches: @@ -2654,6 +3063,27 @@ workflows: name: nightly_binary_macos_conda_py3.8_cpu_upload requires: - nightly_binary_macos_conda_py3.8_cpu + - binary_macos_conda: + conda_docker_image: pytorch/conda-builder:cpu + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_conda_py3.9_cpu + python_version: '3.9' + wheel_docker_image: pytorch/manylinux-cuda102 + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_macos_conda_py3.9_cpu_upload + requires: + - nightly_binary_macos_conda_py3.9_cpu - binary_win_conda: cu_version: cpu filters: @@ -2739,13 +3169,13 @@ workflows: requires: - nightly_binary_win_conda_py3.6_cu102_upload - binary_win_conda: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.6_cu110 + name: nightly_binary_win_conda_py3.6_cu112 python_version: '3.6' - binary_conda_upload: context: org-member @@ -2754,18 +3184,18 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.6_cu110_upload + name: nightly_binary_win_conda_py3.6_cu112_upload requires: - - nightly_binary_win_conda_py3.6_cu110 + - nightly_binary_win_conda_py3.6_cu112 - smoke_test_win_conda: filters: branches: only: - nightly - name: nightly_binary_win_conda_py3.6_cu110_smoke_test_conda + name: nightly_binary_win_conda_py3.6_cu112_smoke_test_conda python_version: '3.6' requires: - - nightly_binary_win_conda_py3.6_cu110_upload + - nightly_binary_win_conda_py3.6_cu112_upload - binary_win_conda: cu_version: cpu filters: @@ -2851,13 +3281,13 @@ workflows: requires: - nightly_binary_win_conda_py3.7_cu102_upload - binary_win_conda: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu110 + name: nightly_binary_win_conda_py3.7_cu112 python_version: '3.7' - binary_conda_upload: context: org-member @@ -2866,18 +3296,18 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.7_cu110_upload + name: nightly_binary_win_conda_py3.7_cu112_upload requires: - - nightly_binary_win_conda_py3.7_cu110 + - nightly_binary_win_conda_py3.7_cu112 - smoke_test_win_conda: filters: branches: only: - nightly - name: nightly_binary_win_conda_py3.7_cu110_smoke_test_conda + name: nightly_binary_win_conda_py3.7_cu112_smoke_test_conda python_version: '3.7' requires: - - nightly_binary_win_conda_py3.7_cu110_upload + - nightly_binary_win_conda_py3.7_cu112_upload - binary_win_conda: cu_version: cpu filters: @@ -2963,13 +3393,13 @@ workflows: requires: - nightly_binary_win_conda_py3.8_cu102_upload - binary_win_conda: - cu_version: cu110 + cu_version: cu112 filters: branches: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.8_cu110 + name: nightly_binary_win_conda_py3.8_cu112 python_version: '3.8' - binary_conda_upload: context: org-member @@ -2978,18 +3408,130 @@ workflows: only: nightly tags: only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.8_cu110_upload + name: nightly_binary_win_conda_py3.8_cu112_upload requires: - - nightly_binary_win_conda_py3.8_cu110 + - nightly_binary_win_conda_py3.8_cu112 - smoke_test_win_conda: filters: branches: only: - nightly - name: nightly_binary_win_conda_py3.8_cu110_smoke_test_conda + name: nightly_binary_win_conda_py3.8_cu112_smoke_test_conda python_version: '3.8' requires: - - nightly_binary_win_conda_py3.8_cu110_upload + - nightly_binary_win_conda_py3.8_cu112_upload + - binary_win_conda: + cu_version: cpu + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cpu + python_version: '3.9' + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cpu_upload + requires: + - nightly_binary_win_conda_py3.9_cpu + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cpu_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cpu_upload + - binary_win_conda: + cu_version: cu101 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu101 + python_version: '3.9' + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu101_upload + requires: + - nightly_binary_win_conda_py3.9_cu101 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu101_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu101_upload + - binary_win_conda: + cu_version: cu102 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu102 + python_version: '3.9' + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu102_upload + requires: + - nightly_binary_win_conda_py3.9_cu102 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu102_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu102_upload + - binary_win_conda: + cu_version: cu112 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu112 + python_version: '3.9' + - binary_conda_upload: + context: org-member + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu112_upload + requires: + - nightly_binary_win_conda_py3.9_cu112 + - smoke_test_win_conda: + filters: + branches: + only: + - nightly + name: nightly_binary_win_conda_py3.9_cu112_smoke_test_conda + python_version: '3.9' + requires: + - nightly_binary_win_conda_py3.9_cu112_upload docker_build: triggers: - schedule: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 3ede3457cee..9958ce60548 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -73,6 +73,10 @@ binary_common: &binary_common description: "Wheel only: what docker image to use" type: string default: "pytorch/manylinux-cuda101" + conda_docker_image: + description: "Conda only: what docker image to use" + type: string + default: "pytorch/conda-builder:cpu" environment: PYTHON_VERSION: << parameters.python_version >> PYTORCH_VERSION: << parameters.pytorch_version >> @@ -189,7 +193,7 @@ jobs: binary_linux_conda: <<: *binary_common docker: - - image: "pytorch/conda-cuda" + - image: "<< parameters.conda_docker_image >>" resource_class: 2xlarge+ steps: - checkout_merge @@ -411,7 +415,11 @@ jobs: set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" conda env remove -n python${PYTHON_VERSION} || true - conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} conda install Pillow conda install -v -y -c pytorch-nightly pytorch @@ -436,7 +444,11 @@ jobs: command: | set -x eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda env remove -n python${PYTHON_VERSION} || true + CONDA_CHANNEL_FLAGS="" + if [[ "${PYTHON_VERSION}" = 3.9 ]]; then + CONDA_CHANNEL_FLAGS="-c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda create -yn python${PYTHON_VERSION} python=${PYTHON_VERSION} conda activate python${PYTHON_VERSION} pip install $(ls ~/workspace/torchvision*.whl) --pre -f https://download.pytorch.org/whl/nightly/torch_nightly.html @@ -513,7 +525,7 @@ jobs: - env - run: name: Install torchvision - command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL "${image_name}" .circleci/unittest/linux/scripts/install.sh + command: docker run -t --gpus all -v $PWD:$PWD -w $PWD -e UPLOAD_CHANNEL -e CU_VERSION "${image_name}" .circleci/unittest/linux/scripts/install.sh - run: name: Run tests command: docker run -t --gpus all -v $PWD:$PWD -w $PWD "${image_name}" .circleci/unittest/linux/scripts/run_test.sh diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 02e15782f4d..98c141dfebc 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -19,7 +19,8 @@ import os.path -PYTHON_VERSIONS = ["3.6", "3.7", "3.8"] +PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"] +CUDA_VERSION = ["10.1", "10.2", "11.2"] def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, windows_latest_only=False): @@ -27,8 +28,8 @@ def build_workflows(prefix='', filter_branch=None, upload=False, indentation=6, for btype in ["wheel", "conda"]: for os_type in ["linux", "macos", "win"]: python_versions = PYTHON_VERSIONS - cu_versions_dict = {"linux": ["cpu", "cu92", "cu101", "cu102", "cu110"], - "win": ["cpu", "cu101", "cu102", "cu110"], + cu_versions_dict = {"linux": ["cpu", "cu101", "cu102", "cu112"], + "win": ["cpu", "cu101", "cu102", "cu112"], "macos": ["cpu"]} cu_versions = cu_versions_dict[os_type] for python_version in python_versions: @@ -99,6 +100,7 @@ def upload_doc_job(filter_branch): "cu101": "pytorch/manylinux-cuda101", "cu102": "pytorch/manylinux-cuda102", "cu110": "pytorch/manylinux-cuda110", + "cu112": "pytorch/manylinux-cuda112", } @@ -109,6 +111,14 @@ def get_manylinux_image(cu_version): return f"pytorch/manylinux-cuda{cu_suffix}" +def get_conda_image(cu_version): + if cu_version == "cpu": + return "pytorch/conda-builder:cpu" + if cu_version.startswith('cu'): + cu_suffix = cu_version[len('cu'):] + return f"pytorch/conda-builder:cuda{cu_suffix}" + + def generate_base_workflow(base_workflow_name, python_version, cu_version, unicode, os_type, btype, *, filter_branch=None): @@ -123,6 +133,7 @@ def generate_base_workflow(base_workflow_name, python_version, cu_version, if os_type != "win": d["wheel_docker_image"] = get_manylinux_image(cu_version) + d["conda_docker_image"] = get_conda_image(cu_version) if filter_branch is not None: d["filters"] = { diff --git a/.circleci/unittest/linux/scripts/environment.yml b/.circleci/unittest/linux/scripts/environment.yml index b2d5efdf533..2ad460f2d7c 100644 --- a/.circleci/unittest/linux/scripts/environment.yml +++ b/.circleci/unittest/linux/scripts/environment.yml @@ -1,15 +1,15 @@ channels: - pytorch - defaults + # using conda-forge for python v3.9+ + - conda-forge dependencies: - - numpy - pytest - pytest-cov - codecov - pip - libpng - jpeg - - ffmpeg=4.2 - ca-certificates - pip: - future diff --git a/.circleci/unittest/linux/scripts/install.sh b/.circleci/unittest/linux/scripts/install.sh index 2de17f12744..0e22ddf12c5 100755 --- a/.circleci/unittest/linux/scripts/install.sh +++ b/.circleci/unittest/linux/scripts/install.sh @@ -22,8 +22,9 @@ else version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi + printf "Installing PyTorch with %s\n" "${cudatoolkit}" -conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}" +conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge pytorch "${cudatoolkit}" printf "* Installing torchvision\n" python setup.py develop diff --git a/.circleci/unittest/linux/scripts/setup_env.sh b/.circleci/unittest/linux/scripts/setup_env.sh index 44ee98b91d0..b44db0c42a8 100755 --- a/.circleci/unittest/linux/scripts/setup_env.sh +++ b/.circleci/unittest/linux/scripts/setup_env.sh @@ -36,4 +36,13 @@ conda activate "${env_dir}" # 3. Install Conda dependencies printf "* Installing dependencies (except PyTorch)\n" +NUMPY_MIN_VER="1.11" +FFMPEG_PIN="=4.2" +if [[ "${PYTHON_VERSION}" = "3.9" ]]; then + NUMPY_MIN_VER="1.20" + FFMPEG_PIN=">=4.2" +fi + +conda install -y -c conda-forge "numpy >=${NUMPY_MIN_VER}" +conda install -y -c pytorch "ffmpeg${FFMPEG_PIN}" conda env update --file "${this_dir}/environment.yml" --prune diff --git a/.circleci/unittest/windows/scripts/environment.yml b/.circleci/unittest/windows/scripts/environment.yml index c41693ac19d..b4f32cb3cad 100644 --- a/.circleci/unittest/windows/scripts/environment.yml +++ b/.circleci/unittest/windows/scripts/environment.yml @@ -1,8 +1,9 @@ channels: - pytorch - defaults + # use conda-forge for python v3.9+ + - conda-forge dependencies: - - numpy - pytest - pytest-cov - codecov diff --git a/.circleci/unittest/windows/scripts/install.sh b/.circleci/unittest/windows/scripts/install.sh index bdf2a869fe1..72f55a61da0 100644 --- a/.circleci/unittest/windows/scripts/install.sh +++ b/.circleci/unittest/windows/scripts/install.sh @@ -24,8 +24,9 @@ else version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" cudatoolkit="cudatoolkit=${version}" fi + printf "Installing PyTorch with %s\n" "${cudatoolkit}" -conda install -y -c "pytorch-${UPLOAD_CHANNEL}" pytorch "${cudatoolkit}" +conda install -y -c "pytorch-${UPLOAD_CHANNEL}" -c conda-forge pytorch "${cudatoolkit}" printf "* Installing torchvision\n" "$this_dir/vc_env_helper.bat" python setup.py develop diff --git a/.circleci/unittest/windows/scripts/setup_env.sh b/.circleci/unittest/windows/scripts/setup_env.sh index b0b70631112..61c3bc45bba 100644 --- a/.circleci/unittest/windows/scripts/setup_env.sh +++ b/.circleci/unittest/windows/scripts/setup_env.sh @@ -36,4 +36,9 @@ conda activate "${env_dir}" # 3. Install Conda dependencies printf "* Installing dependencies (except PyTorch)\n" +NUMPY_MIN_VER="1.11" +if [[ "${PYTHON_VERSION}" = "3.9" ]]; then + NUMPY_MIN_VER="1.20" +fi +conda install -y -c conda-forge "numpy >=${NUMPY_MIN_VER}" conda env update --file "${this_dir}/environment.yml" --prune diff --git a/packaging/pkg_helpers.bash b/packaging/pkg_helpers.bash index e0f0f6dbc37..0c205ab81ac 100644 --- a/packaging/pkg_helpers.bash +++ b/packaging/pkg_helpers.bash @@ -49,6 +49,17 @@ setup_cuda() { # Now work out the CUDA settings case "$CU_VERSION" in + cu112) + if [[ "$OSTYPE" == "msys" ]]; then + export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.2" + else + export CUDA_HOME=/usr/local/cuda-11.2/ + fi + export FORCE_CUDA=1 + # Hard-coding gencode flags is temporary situation until + # https://github.com/pytorch/pytorch/pull/23408 lands + export NVCC_FLAGS="-gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_80,code=sm_80 -gencode=arch=compute_86,code=sm_86 -gencode=arch=compute_50,code=compute_50" + ;; cu110) if [[ "$OSTYPE" == "msys" ]]; then export CUDA_HOME="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.0" @@ -170,10 +181,13 @@ setup_wheel_python() { if [[ "$(uname)" == Darwin || "$OSTYPE" == "msys" ]]; then eval "$(conda shell.bash hook)" conda env remove -n "env$PYTHON_VERSION" || true - conda create -yn "env$PYTHON_VERSION" python="$PYTHON_VERSION" + if [[ "$PYTHON_VERSION" == 3.9 ]]; then + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge" + fi + conda create ${CONDA_CHANNEL_FLAGS} -yn "env$PYTHON_VERSION" python="$PYTHON_VERSION" conda activate "env$PYTHON_VERSION" # Install libpng from Anaconda (defaults) - conda install libpng jpeg -y + conda install ${CONDA_CHANNEL_FLAGS} -c conda-forge libpng "jpeg<=9b" -y else # Install native CentOS libJPEG, LAME, freetype and GnuTLS yum install -y libjpeg-turbo-devel lame freetype gnutls @@ -189,6 +203,7 @@ setup_wheel_python() { 3.6) python_abi=cp36-cp36m ;; 3.7) python_abi=cp37-cp37m ;; 3.8) python_abi=cp38-cp38 ;; + 3.9) python_abi=cp39-cp39 ;; *) echo "Unrecognized PYTHON_VERSION=$PYTHON_VERSION" exit 1 @@ -263,6 +278,9 @@ setup_conda_pytorch_constraint() { if [[ "$OSTYPE" == msys && "$CU_VERSION" == cu92 ]]; then export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c defaults -c numba/label/dev" fi + if [[ "$PYTHON_VERSION" == 3.9 ]]; then + export CONDA_CHANNEL_FLAGS="${CONDA_CHANNEL_FLAGS} -c=conda-forge" + fi } # Translate CUDA_VERSION into CUDA_CUDATOOLKIT_CONSTRAINT @@ -272,6 +290,9 @@ setup_conda_cudatoolkit_constraint() { export CONDA_CUDATOOLKIT_CONSTRAINT="" else case "$CU_VERSION" in + cu112) + export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.2,<11.3 # [not osx]" + ;; cu110) export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.0,<11.1 # [not osx]" ;; @@ -307,6 +328,9 @@ setup_conda_cudatoolkit_plain_constraint() { export CMAKE_USE_CUDA=0 else case "$CU_VERSION" in + cu112) + export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.2" + ;; cu102) export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=10.2" ;; diff --git a/packaging/torchvision/meta.yaml b/packaging/torchvision/meta.yaml index 5802bf264c1..12f35c116be 100644 --- a/packaging/torchvision/meta.yaml +++ b/packaging/torchvision/meta.yaml @@ -9,12 +9,15 @@ requirements: build: - {{ compiler('c') }} # [win] - libpng - - jpeg - - ffmpeg =4.2 # [not win] + - jpeg <=9b + # NOTE: The only ffmpeg version that we build is actually 4.2 + - ffmpeg >=4.2 # [not win] host: - python - setuptools + - numpy >=1.20 # [py>=39] + - numpy >=1.11 # [py!=39] {{ environ.get('CONDA_PYTORCH_BUILD_CONSTRAINT') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} {{ environ.get('CONDA_CPUONLY_FEATURE') }} @@ -22,10 +25,11 @@ requirements: run: - python - libpng - - ffmpeg =4.2 # [not win] - - jpeg + - ffmpeg >=4.2 # [not win] + - jpeg <=9b - pillow >=4.1.1 - - numpy >=1.11 + - numpy >=1.20 # [py>=39] + - numpy >=1.11 # [py!=39] {{ environ.get('CONDA_PYTORCH_CONSTRAINT') }} {{ environ.get('CONDA_CUDATOOLKIT_CONSTRAINT') }} @@ -50,7 +54,8 @@ test: requires: - pytest - scipy - - av =8.0.1 + - av >=8.0.1 + - jpeg <=9b - ca-certificates diff --git a/packaging/windows/internal/cuda_install.bat b/packaging/windows/internal/cuda_install.bat index b6b26c0c54c..2d1611c6fd7 100644 --- a/packaging/windows/internal/cuda_install.bat +++ b/packaging/windows/internal/cuda_install.bat @@ -19,6 +19,7 @@ if %CUDA_VER% EQU 100 goto cuda100 if %CUDA_VER% EQU 101 goto cuda101 if %CUDA_VER% EQU 102 goto cuda102 if %CUDA_VER% EQU 110 goto cuda110 +if %CUDA_VER% EQU 112 goto cuda112 echo CUDA %CUDA_VERSION_STR% is not supported exit /b 1 @@ -107,6 +108,23 @@ if not exist "%SRC_DIR%\temp_build\cudnn-11.0-windows-x64-v8.0.4.30.zip" ( goto cuda_common +:cuda112 + +if not exist "%SRC_DIR%\temp_build\cuda_11.2.0_460.89_win10.exe" ( + curl -k -L https://ossci-windows.s3.amazonaws.com/cuda_11.2.0_460.89_win10.exe --output "%SRC_DIR%\temp_build\cuda_11.2.0_460.89_win10.exe" + if errorlevel 1 exit /b 1 + set "CUDA_SETUP_FILE=%SRC_DIR%\temp_build\cuda_11.2.0_460.89_win10.exe" + set "ARGS=nvcc_11.2 cuobjdump_11.2 nvprune_11.2 nvprof_11.2 cupti_11.2 cublas_11.2 cublas_dev_11.2 cudart_11.2 cufft_11.2 cufft_dev_11.2 curand_11.2 curand_dev_11.2 cusolver_11.2 cusolver_dev_11.2 cusparse_11.2 cusparse_dev_11.2 npp_11.2 npp_dev_11.2 nvrtc_11.2 nvrtc_dev_11.2 nvml_dev_11.2" +) + +if not exist "%SRC_DIR%\temp_build\cudnn-11.2-windows-x64-v8.1.0.77.zip" ( + curl -k -L http://s3.amazonaws.com/ossci-windows/cudnn-11.2-windows-x64-v8.1.0.77.zip --output "%SRC_DIR%\temp_build\cudnn-11.2-windows-x64-v8.1.0.77.zip" + if errorlevel 1 exit /b 1 + set "CUDNN_SETUP_FILE=%SRC_DIR%\temp_build\cudnn-11.2-windows-x64-v8.1.0.77.zip" +) + +goto cuda_common + :cuda_common if not exist "%SRC_DIR%\temp_build\NvToolsExt.7z" ( diff --git a/test/common_utils.py b/test/common_utils.py index bcb4cbce444..e1152158130 100644 --- a/test/common_utils.py +++ b/test/common_utils.py @@ -18,6 +18,10 @@ import numpy as np from PIL import Image +IS_PY39 = sys.version_info.major == 3 and sys.version_info.minor == 9 +PY39_SEGFAULT_SKIP_MSG = "Segmentation fault with Python 3.9, see https://github.com/pytorch/vision/issues/3367" +PY39_SKIP = unittest.skipIf(IS_PY39, PY39_SEGFAULT_SKIP_MSG) + @contextlib.contextmanager def get_tmp_dir(src=None, **kwargs): diff --git a/test/test_video.py b/test/test_video.py index 67450de3600..c2e15c8d883 100644 --- a/test/test_video.py +++ b/test/test_video.py @@ -4,6 +4,7 @@ import tempfile import unittest import random +import sys import itertools @@ -13,6 +14,7 @@ import torch import torchvision from torchvision.io import _HAS_VIDEO_OPT, VideoReader +from common_utils import PY39_SKIP try: import av @@ -278,6 +280,7 @@ def _template_read_video(video_object, s=0, e=None): @unittest.skipIf(_HAS_VIDEO_OPT is False, "Didn't compile with ffmpeg") class TestVideo(unittest.TestCase): + @PY39_SKIP @unittest.skipIf(av is None, "PyAV unavailable") def test_read_video_tensor(self): """ @@ -362,6 +365,7 @@ def test_metadata(self): config.duration, reader_md["video"]["duration"][0], delta=0.5 ) + @PY39_SKIP @unittest.skipIf(av is None, "PyAV unavailable") def test_video_reading_fn(self): """ diff --git a/test/test_video_reader.py b/test/test_video_reader.py index afdd2362536..5b9b2184daf 100644 --- a/test/test_video_reader.py +++ b/test/test_video_reader.py @@ -10,6 +10,7 @@ import torchvision.io as io from numpy.random import randint from torchvision.io import _HAS_VIDEO_OPT +from common_utils import PY39_SKIP try: @@ -426,6 +427,7 @@ def test_stress_test_read_video_from_file(self): audio_timebase_den, ) + @PY39_SKIP def test_read_video_from_file(self): """ Test the case when decoder starts with a video file to decode frames. @@ -471,6 +473,7 @@ def test_read_video_from_file(self): # compare decoding results self.compare_decoding_result(tv_result, pyav_result, config) + @PY39_SKIP def test_read_video_from_file_read_single_stream_only(self): """ Test the case when decoder starts with a video file to decode frames, and @@ -779,6 +782,7 @@ def test_read_video_from_file_rescale_width_and_height(self): self.assertEqual(tv_result[0].size(1), height) self.assertEqual(tv_result[0].size(2), width) + @PY39_SKIP def test_read_video_from_file_audio_resampling(self): """ Test the case when decoder starts with a video file to decode frames, and @@ -838,6 +842,7 @@ def test_read_video_from_file_audio_resampling(self): delta=0.1 * asample_rate.item(), ) + @PY39_SKIP def test_compare_read_video_from_memory_and_file(self): """ Test the case when video is already in memory, and decoder reads data in memory @@ -904,6 +909,7 @@ def test_compare_read_video_from_memory_and_file(self): # finally, compare results decoded from memory and file self.compare_decoding_result(tv_result_memory, tv_result_file) + @PY39_SKIP def test_read_video_from_memory(self): """ Test the case when video is already in memory, and decoder reads data in memory @@ -948,6 +954,7 @@ def test_read_video_from_memory(self): self.check_separate_decoding_result(tv_result, config) self.compare_decoding_result(tv_result, pyav_result, config) + @PY39_SKIP def test_read_video_from_memory_get_pts_only(self): """ Test the case when video is already in memory, and decoder reads data in memory. @@ -1017,6 +1024,7 @@ def test_read_video_from_memory_get_pts_only(self): self.assertEqual(tv_result_pts_only[5].numel(), 0) self.compare_decoding_result(tv_result, tv_result_pts_only) + @PY39_SKIP def test_read_video_in_range_from_memory(self): """ Test the case when video is already in memory, and decoder reads data in memory. @@ -1192,6 +1200,7 @@ def test_probe_video_from_memory_script(self): probe_result = scripted_fun(video_tensor) self.check_meta_result(probe_result, config) + @PY39_SKIP def test_read_video_from_memory_scripted(self): """ Test the case when video is already in memory, and decoder reads data in memory From 67f210717e522f0f771e7e523659af30cdfab96b Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Fri, 12 Feb 2021 10:00:33 +0000 Subject: [PATCH 2/5] [FBcode->GH] Enable GPU/RE teags for pytorch/*/TARGETS that needs GPU (#3384) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/3370 Pull Request resolved: https://github.com/pytorch/vision/pull/3361 Convert pytorch_gpu to use GPU/RE Reviewed By: datumbox Differential Revision: D26264102 fbshipit-source-id: b45179215ecb1142f6468386c4fee1759dd82f0c --- test/_utils_internal.py | 7 +++++++ test/common_utils.py | 17 +++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 test/_utils_internal.py diff --git a/test/_utils_internal.py b/test/_utils_internal.py new file mode 100644 index 00000000000..1a32e6f2b25 --- /dev/null +++ b/test/_utils_internal.py @@ -0,0 +1,7 @@ +import os + + +# Get relative file path +# this returns relative path from current file. +def get_relative_path(curr_file, *path_components): + return os.path.join(os.path.dirname(curr_file), *path_components) diff --git a/test/common_utils.py b/test/common_utils.py index e1152158130..76cdfdc006b 100644 --- a/test/common_utils.py +++ b/test/common_utils.py @@ -14,6 +14,7 @@ from numbers import Number from torch._six import string_classes from collections import OrderedDict +from _utils_internal import get_relative_path import numpy as np from PIL import Image @@ -110,19 +111,23 @@ def remove_prefix_suffix(text, prefix, suffix): # lives, NOT where test/common_utils.py lives. module_id = self.__class__.__module__ munged_id = remove_prefix_suffix(self.id(), module_id + ".", strip_suffix) - test_file = os.path.realpath(sys.modules[module_id].__file__) - expected_file = os.path.join(os.path.dirname(test_file), - "expect", - munged_id) + # Determine expected file based on environment + expected_file_base = get_relative_path( + os.path.realpath(sys.modules[module_id].__file__), + "expect") + + # Set expected_file based on subname. + expected_file = os.path.join(expected_file_base, munged_id) if subname: expected_file += "_" + subname expected_file += "_expect.pkl" if not ACCEPT and not os.path.exists(expected_file): raise RuntimeError( - ("No expect file exists for {}; to accept the current output, run:\n" - "python {} {} --accept").format(os.path.basename(expected_file), __main__.__file__, munged_id)) + f"No expect file exists for {os.path.basename(expected_file)} in {expected_file}; " + "to accept the current output, run:\n" + f"python {__main__.__file__} {munged_id} --accept") return expected_file From 103eec5e3e702fd15609ceba2444ac8307416bea Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Fri, 12 Feb 2021 10:18:13 +0000 Subject: [PATCH 3/5] Fix test flakiness on test_random_erasing() (#3386) * Fix test flakiness caused by rounding. * Update test/test_transforms.py * Styles Co-authored-by: Nicolas Hug --- test/test_transforms.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_transforms.py b/test/test_transforms.py index b3d426e5221..8abf9e88db3 100644 --- a/test/test_transforms.py +++ b/test/test_transforms.py @@ -1959,10 +1959,12 @@ def test_autoaugment(self): def test_random_erasing(self): img = torch.ones(3, 128, 128) - t = transforms.RandomErasing(scale=(0.1, 0.1), ratio=(1. / 3., 3. / 1.)) + t = transforms.RandomErasing(scale=(0.1, 0.1), ratio=(1 / 3, 3.)) y, x, h, w, v = t.get_params(img, t.scale, t.ratio, [t.value, ]) aspect_ratio = h / w - self.assertTrue(aspect_ratio > 1. / 3. and aspect_ratio < 3. / 1.) + # Add some tolerance due to the rounding and int conversion used in the transform + tol = 0.05 + self.assertTrue(1 / 3 - tol <= aspect_ratio <= 3 + tol) aspect_ratios = [] random.seed(42) From c28797e379163000b1c959fca91d57002d3174c0 Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Fri, 12 Feb 2021 15:41:05 +0000 Subject: [PATCH 4/5] Fixed compilation warnings on C++ codebase (#3390) --- torchvision/csrc/io/image/cpu/decode_jpeg.cpp | 6 +----- torchvision/csrc/io/image/cpu/encode_png.cpp | 7 +------ torchvision/csrc/io/video/video.cpp | 5 ++--- torchvision/csrc/io/video/video.h | 2 -- torchvision/csrc/io/video_reader/video_reader.cpp | 3 +-- 5 files changed, 5 insertions(+), 18 deletions(-) diff --git a/torchvision/csrc/io/image/cpu/decode_jpeg.cpp b/torchvision/csrc/io/image/cpu/decode_jpeg.cpp index 928a9df9b35..c6e971c3b12 100644 --- a/torchvision/csrc/io/image/cpu/decode_jpeg.cpp +++ b/torchvision/csrc/io/image/cpu/decode_jpeg.cpp @@ -24,19 +24,15 @@ struct torch_jpeg_mgr { static void torch_jpeg_init_source(j_decompress_ptr cinfo) {} static boolean torch_jpeg_fill_input_buffer(j_decompress_ptr cinfo) { - torch_jpeg_mgr* src = (torch_jpeg_mgr*)cinfo->src; // No more data. Probably an incomplete image; Raise exception. torch_jpeg_error_ptr myerr = (torch_jpeg_error_ptr)cinfo->err; strcpy(myerr->jpegLastErrorMsg, "Image is incomplete or truncated"); longjmp(myerr->setjmp_buffer, 1); - src->pub.next_input_byte = EOI_BUFFER; - src->pub.bytes_in_buffer = 1; - return TRUE; } static void torch_jpeg_skip_input_data(j_decompress_ptr cinfo, long num_bytes) { torch_jpeg_mgr* src = (torch_jpeg_mgr*)cinfo->src; - if (src->pub.bytes_in_buffer < num_bytes) { + if (src->pub.bytes_in_buffer < (size_t)num_bytes) { // Skipping over all of remaining data; output EOI. src->pub.next_input_byte = EOI_BUFFER; src->pub.bytes_in_buffer = 1; diff --git a/torchvision/csrc/io/image/cpu/encode_png.cpp b/torchvision/csrc/io/image/cpu/encode_png.cpp index 6be2b085426..3cf5de6955b 100644 --- a/torchvision/csrc/io/image/cpu/encode_png.cpp +++ b/torchvision/csrc/io/image/cpu/encode_png.cpp @@ -28,11 +28,6 @@ struct torch_png_error_mgr { using torch_png_error_mgr_ptr = torch_png_error_mgr*; -void torch_png_warn(png_structp png_ptr, png_const_charp warn_msg) { - /* Display warning to user */ - TORCH_WARN_ONCE(warn_msg); -} - void torch_png_error(png_structp png_ptr, png_const_charp error_msg) { /* png_ptr->err really points to a torch_png_error_mgr struct, so coerce * pointer */ @@ -155,7 +150,7 @@ torch::Tensor encode_png(const torch::Tensor& data, int64_t compression_level) { auto ptr = input.data_ptr(); // Encode PNG file - for (size_t y = 0; y < height; ++y) { + for (int y = 0; y < height; ++y) { png_write_row(png_write, ptr); ptr += stride; } diff --git a/torchvision/csrc/io/video/video.cpp b/torchvision/csrc/io/video/video.cpp index bda9725570e..73167e4fff6 100644 --- a/torchvision/csrc/io/video/video.cpp +++ b/torchvision/csrc/io/video/video.cpp @@ -9,7 +9,6 @@ namespace { const size_t decoderTimeoutMs = 600000; const AVPixelFormat defaultVideoPixelFormat = AV_PIX_FMT_RGB24; -const AVSampleFormat defaultAudioSampleFormat = AV_SAMPLE_FMT_FLT; // returns number of written bytes template @@ -291,7 +290,7 @@ std::tuple Video::Next() { int outWidth = format.format.video.width; int numChannels = 3; outFrame = torch::zeros({outHeight, outWidth, numChannels}, torch::kByte); - auto numberWrittenBytes = fillVideoTensor(out, outFrame); + fillVideoTensor(out, outFrame); outFrame = outFrame.permute({2, 0, 1}); } else if (format.type == TYPE_AUDIO) { @@ -307,7 +306,7 @@ std::tuple Video::Next() { outFrame = torch::zeros({numAudioSamples, outAudioChannels}, torch::kFloat); - auto numberWrittenBytes = fillAudioTensor(out, outFrame); + fillAudioTensor(out, outFrame); } // currently not supporting other formats (will do soon) diff --git a/torchvision/csrc/io/video/video.h b/torchvision/csrc/io/video/video.h index ff28fd1d290..7da5fbbf294 100644 --- a/torchvision/csrc/io/video/video.h +++ b/torchvision/csrc/io/video/video.h @@ -27,13 +27,11 @@ struct Video : torch::CustomClassHolder { std::tuple Next(); private: - bool video_any_frame = false; // add this to input parameters? bool succeeded = false; // decoder init flag // seekTS and doSeek act as a flag - if it's not set, next function simply // retruns the next frame. If it's set, we look at the global seek // time in comination with any_frame settings double seekTS = -1; - bool doSeek = false; void _getDecoderParams( double videoStartS, diff --git a/torchvision/csrc/io/video_reader/video_reader.cpp b/torchvision/csrc/io/video_reader/video_reader.cpp index 1b5df64c93b..51b0750b431 100644 --- a/torchvision/csrc/io/video_reader/video_reader.cpp +++ b/torchvision/csrc/io/video_reader/video_reader.cpp @@ -87,7 +87,7 @@ size_t fillTensor( } T* frameData = frame.numel() > 0 ? frame.data_ptr() : nullptr; int64_t* framePtsData = framePts.data_ptr(); - CHECK_EQ(framePts.size(0), msgs.size()); + CHECK_EQ(framePts.size(0), (int64_t)msgs.size()); size_t avgElementsInFrame = frame.numel() / msgs.size(); size_t offset = 0; @@ -491,7 +491,6 @@ torch::List probeVideo( videoTimeBase = torch::zeros({2}, torch::kInt); int* videoTimeBaseData = videoTimeBase.data_ptr(); const auto& header = videoMetadata; - const auto& media = header.format; videoTimeBaseData[0] = header.num; videoTimeBaseData[1] = header.den; From af97ec2f4c9daac091b9a87355c4f22d37488004 Mon Sep 17 00:00:00 2001 From: Vasilis Vryniotis Date: Fri, 12 Feb 2021 20:04:22 +0000 Subject: [PATCH 5/5] Add link-whole to torchvision ops-cpp (#3391) Summary: In opt mode, the linker could strip out the symbols related to the torchvision ops if they had not been explicitly requested. Adding link-whole is one way of fixing this. Reviewed By: datumbox, ppwwyyxx Differential Revision: D26249713 fbshipit-source-id: 4e55e2ebb483922fe308fd8b83456439bde728c9 --- test/cpp/test_custom_operators.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/test/cpp/test_custom_operators.cpp b/test/cpp/test_custom_operators.cpp index d9a950fd7cd..d660852bbfb 100644 --- a/test/cpp/test_custom_operators.cpp +++ b/test/cpp/test_custom_operators.cpp @@ -28,3 +28,33 @@ TEST(test_custom_operators, nms) { ASSERT_TRUE(output_jit.allclose(output)); } + +TEST(test_custom_operators, roi_align_visible) { + // make sure that the torchvision ops are visible to the jit interpreter even if + // not explicitly included + auto& ops = torch::jit::getAllOperatorsFor(torch::jit::Symbol::fromQualString("torchvision::roi_align")); + ASSERT_EQ(ops.size(), 1); + + auto& op = ops.front(); + ASSERT_EQ(op->schema().name(), "torchvision::roi_align"); + + torch::jit::Stack stack; + float roi_data[] = { + 0., 0., 0., 5., 5., + 0., 5., 5., 10., 10. + }; + at::Tensor input = at::rand({1, 2, 10, 10}), rois = at::from_blob(roi_data, {2, 5}); + double spatial_scale = 1.0; + int64_t pooled_height = 3, pooled_width = 3, sampling_ratio = -1; + bool aligned = true; + + torch::jit::push(stack, input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned); + op->getOperation()(&stack); + at::Tensor output_jit; + torch::jit::pop(stack, output_jit); + + ASSERT_EQ(output_jit.sizes()[0], 2); + ASSERT_EQ(output_jit.sizes()[1], 2); + ASSERT_EQ(output_jit.sizes()[2], 3); + ASSERT_EQ(output_jit.sizes()[3], 3); +}