From 23acff5916056dac82e384b89b72f6728e9f69ed Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 4 Apr 2023 16:13:55 +0200 Subject: [PATCH 01/14] enable Windows GPU CI --- .github/workflows/test-windows.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index dd663d9e939..3778e3ed9ca 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -20,12 +20,11 @@ jobs: - "3.11" runner: ["windows.4xlarge"] gpu-arch-type: ["cpu"] - # FIXME: enable this as soon as nvjpeg is available on the Windows runner -# include: -# - python-version: "3.8" -# runner: windows.8xlarge.nvidia.gpu -# gpu-arch-type: cuda -# gpu-arch-version: "11.7" + include: + - python-version: "3.8" + runner: windows.8xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "11.7" fail-fast: false uses: pytorch/test-infra/.github/workflows/windows_job.yml@main with: From eb184a335f3f027c79279c66dbf831a1222b0580 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 4 Apr 2023 16:15:58 +0200 Subject: [PATCH 02/14] [REVERTME] disable unrelated CI --- .circleci/config.yml | 1399 ----------------- .github/workflows/build-conda-linux.yml | 51 - .github/workflows/build-conda-m1.yml | 52 - .github/workflows/build-conda-macos.yml | 52 - .github/workflows/build-wheels-linux.yml | 50 - .github/workflows/build-wheels-m1.yml | 51 - .github/workflows/build-wheels-macos.yml | 51 - .github/workflows/docs.yml | 81 - .github/workflows/lint.yml | 98 -- .../workflows/prototype-tests-linux-gpu.yml | 54 - .github/workflows/test-linux.yml | 105 -- .github/workflows/test-macos.yml | 40 - .github/workflows/test-windows.yml | 7 - 13 files changed, 2091 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .github/workflows/build-conda-linux.yml delete mode 100644 .github/workflows/build-conda-m1.yml delete mode 100644 .github/workflows/build-conda-macos.yml delete mode 100644 .github/workflows/build-wheels-linux.yml delete mode 100644 .github/workflows/build-wheels-m1.yml delete mode 100644 .github/workflows/build-wheels-macos.yml delete mode 100644 .github/workflows/docs.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/prototype-tests-linux-gpu.yml delete mode 100644 .github/workflows/test-linux.yml delete mode 100644 .github/workflows/test-macos.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2acc7e0c78d..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,1399 +0,0 @@ -version: 2.1 - -# How to test the Linux jobs: -# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ -# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_win_wheel_py3.8 -# - Replace binary_win_wheel_py3.8 with the name of the job you want to test. -# Job names are 'name:' key. - -executors: - windows-cpu: - machine: - resource_class: windows.xlarge - image: windows-server-2019-vs2019:stable - shell: bash.exe - - windows-gpu: - machine: - resource_class: windows.gpu.nvidia.medium - image: windows-server-2019-nvidia:stable - shell: bash.exe - -commands: - checkout_merge: - description: "checkout merge branch" - steps: - - checkout -# - run: -# name: Checkout merge branch -# command: | -# set -ex -# BRANCH=$(git rev-parse --abbrev-ref HEAD) -# if [[ "$BRANCH" != "main" ]]; then -# git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} -# git checkout "merged/$CIRCLE_BRANCH" -# fi - designate_upload_channel: - description: "inserts the correct upload channel into ${BASH_ENV}" - steps: - - run: - name: adding UPLOAD_CHANNEL to BASH_ENV - command: | - our_upload_channel=nightly - # On tags upload to test instead - if [[ -n "${CIRCLE_TAG}" ]]; then - our_upload_channel=test - fi - echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} - - brew_update: - description: "Update Homebrew and install base formulae" - steps: - - run: - name: Update Homebrew - no_output_timeout: "10m" - command: | - set -ex - - # Update repositories manually. - # Running `brew update` produces a comparison between the - # current checkout and the updated checkout, which takes a - # very long time because the existing checkout is 2y old. - for path in $(find /usr/local/Homebrew -type d -name .git) - do - cd $path/.. - git fetch --depth=1 origin - git reset --hard origin/master - done - - export HOMEBREW_NO_AUTO_UPDATE=1 - - # Install expect and moreutils so that we can call `unbuffer` and `ts`. - # moreutils installs a `parallel` executable by default, which conflicts - # with the executable from the GNU `parallel`, so we must unlink GNU - # `parallel` first, and relink it afterwards. - brew install coreutils - brew unlink parallel - brew install moreutils - brew link parallel --overwrite - brew install expect - - brew_install: - description: "Install Homebrew formulae" - parameters: - formulae: - type: string - default: "" - steps: - - run: - name: Install << parameters.formulae >> - no_output_timeout: "10m" - command: | - set -ex - export HOMEBREW_NO_AUTO_UPDATE=1 - brew install << parameters.formulae >> - - run_brew_for_ios_build: - steps: - - brew_update - - brew_install: - formulae: libtool - - pip_install: - parameters: - args: - type: string - descr: - type: string - default: "" - user: - type: boolean - default: true - steps: - - run: - name: > - <<^ parameters.descr >> pip install << parameters.args >> <> - <<# parameters.descr >> << parameters.descr >> <> - command: > - pip install - <<# parameters.user >> --user <> - --progress-bar=off - << parameters.args >> - -binary_common: &binary_common - parameters: - # Edit these defaults to do a release - build_version: - description: "version number of release binary; by default, build a nightly" - type: string - default: "" - pytorch_version: - description: "PyTorch version to build against; by default, use a nightly" - type: string - default: "" - # Don't edit these - python_version: - description: "Python version to build against (e.g., 3.8)" - type: string - cu_version: - description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" - type: string - default: "cpu" - unicode_abi: - description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" - type: string - default: "" - wheel_docker_image: - description: "Wheel only: what docker image to use" - type: string - default: "" - 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 >> - UNICODE_ABI: << parameters.unicode_abi >> - CU_VERSION: << parameters.cu_version >> - MACOSX_DEPLOYMENT_TARGET: 10.9 - -torchvision_ios_params: &torchvision_ios_params - parameters: - build_environment: - type: string - default: "" - ios_arch: - type: string - default: "" - ios_platform: - type: string - default: "" - environment: - BUILD_ENVIRONMENT: << parameters.build_environment >> - IOS_ARCH: << parameters.ios_arch >> - IOS_PLATFORM: << parameters.ios_platform >> - -torchvision_android_params: &torchvision_android_params - parameters: - build_environment: - type: string - default: "" - environment: - BUILD_ENVIRONMENT: << parameters.build_environment >> - -smoke_test_common: &smoke_test_common - <<: *binary_common - docker: - - image: torchvision/smoke_test:latest - -jobs: - circleci_consistency: - docker: - - image: cimg/python:3.8 - steps: - - checkout - - pip_install: - args: jinja2 pyyaml - - run: - name: Check CircleCI config consistency - command: | - python .circleci/regenerate.py - git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) - - binary_win_conda: - <<: *binary_common - executor: windows-cpu - steps: - - checkout_merge - - designate_upload_channel - - run: - name: Build conda packages - no_output_timeout: 30m - command: | - set -ex - source packaging/windows/internal/vc_install_helper.sh - packaging/windows/internal/cuda_install.bat - eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda activate base - conda install -yq conda-build "conda-package-handling!=1.5.0" - packaging/build_conda.sh - rm /C/tools/miniconda3/conda-bld/win-64/vs${VC_YEAR}*.tar.bz2 - - store_artifacts: - path: C:/tools/miniconda3/conda-bld/win-64 - - persist_to_workspace: - root: C:/tools/miniconda3/conda-bld/win-64 - paths: - - "*" - - store_test_results: - path: build_results/ - - binary_win_wheel: - <<: *binary_common - executor: windows-cpu - steps: - - checkout_merge - - designate_upload_channel - - run: - name: Build wheel packages - no_output_timeout: 30m - command: | - set -ex - source packaging/windows/internal/vc_install_helper.sh - packaging/windows/internal/cuda_install.bat - packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - store_test_results: - path: build_results/ - - binary_macos_wheel: - <<: *binary_common - macos: - xcode: "14.0" - steps: - - checkout_merge - - designate_upload_channel - - run: - # Cannot easily deduplicate this as source'ing activate - # will set environment variables which we need to propagate - # to build_wheel.sh - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - packaging/build_wheel.sh - - store_artifacts: - path: dist - - persist_to_workspace: - root: dist - paths: - - "*" - - binary_ios_build: - <<: *torchvision_ios_params - macos: - xcode: "14.0" - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run_brew_for_ios_build - - run: - name: Build - no_output_timeout: "1h" - command: | - script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_build.sh" - cat "$script" - source "$script" - - persist_to_workspace: - root: /Users/distiller/workspace/ - paths: ios - - binary_ios_upload: - <<: *torchvision_ios_params - macos: - xcode: "14.0" - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run_brew_for_ios_build - - run: - name: Upload - no_output_timeout: "1h" - command: | - script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_upload.sh" - cat "$script" - source "$script" - - binary_android_build: - <<: *torchvision_android_params - docker: - - image: cimg/android:2021.08-ndk - resource_class: xlarge - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run: - name: Build - no_output_timeout: "1h" - command: | - script="/home/circleci/project/.circleci/unittest/android/scripts/binary_android_build.sh" - cat "$script" - source "$script" - - store_artifacts: - path: ~/workspace/artifacts - - binary_android_upload: - <<: *torchvision_android_params - docker: - - image: cimg/android:2021.08-ndk - resource_class: xlarge - steps: - - attach_workspace: - at: ~/workspace - - checkout - - run: - name: Upload - no_output_timeout: "1h" - command: | - script="/home/circleci/project/.circleci/unittest/android/scripts/binary_android_upload.sh" - cat "$script" - source "$script" - - binary_macos_conda: - <<: *binary_common - macos: - xcode: "14.0" - steps: - - checkout_merge - - designate_upload_channel - - run: - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - conda install -yq conda-build - packaging/build_conda.sh - - store_artifacts: - path: /Users/distiller/miniconda3/conda-bld/osx-64 - - persist_to_workspace: - root: /Users/distiller/miniconda3/conda-bld/osx-64 - paths: - - "*" - - store_test_results: - path: build_results/ - - # Requires org-member context - binary_conda_upload: - docker: - - image: continuumio/miniconda - steps: - - attach_workspace: - at: ~/workspace - - designate_upload_channel - - run: - command: | - # Prevent credential from leaking - conda install -yq anaconda-client - set -x - anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/*.tar.bz2 -u "pytorch-${UPLOAD_CHANNEL}" --label main --no-progress --force - - # Requires org-member context - binary_wheel_upload: - parameters: - subfolder: - description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)" - type: string - docker: - - image: cimg/python:3.8 - steps: - - attach_workspace: - at: ~/workspace - - designate_upload_channel - - checkout - - pip_install: - args: awscli - - run: - command: | - export PATH="$HOME/.local/bin:$PATH" - # Prevent credential from leaking - set +x - export AWS_ACCESS_KEY_ID="${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}" - export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}" - set -x - for pkg in ~/workspace/*.whl; do - aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read - done - - smoke_test_docker_image_build: - machine: - image: ubuntu-2004:202104-01 - resource_class: large - environment: - image_name: torchvision/smoke_test - steps: - - checkout - - designate_upload_channel - - run: - name: Build and push Docker image - no_output_timeout: "1h" - command: | - set +x - echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin - set -x - cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} - docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest - docker push ${image_name}:${CIRCLE_WORKFLOW_ID} - docker push ${image_name}:latest - - unittest_windows_cpu: - <<: *binary_common - executor: - name: windows-cpu - steps: - - checkout - - designate_upload_channel - - run: - name: Generate cache key - # This will refresh cache on Sundays, nightly build should generate new cache. - command: echo "$(date +"%Y-%U")" > .circleci-weekly - - restore_cache: - - keys: - - env-v2-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - - run: - name: Setup - command: .circleci/unittest/windows/scripts/setup_env.sh - - save_cache: - - key: env-v2-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - paths: - - conda - - env - - run: - name: Install torchvision - command: .circleci/unittest/windows/scripts/install.sh - - run: - name: Run tests - command: .circleci/unittest/windows/scripts/run_test.sh - - run: - name: Post process - command: .circleci/unittest/windows/scripts/post_process.sh - - store_test_results: - path: test-results - - unittest_windows_gpu: - <<: *binary_common - executor: - name: windows-gpu - environment: - CUDA_VERSION: "11.7" - PYTHON_VERSION: << parameters.python_version >> - steps: - - checkout - - designate_upload_channel - - run: - name: Generate cache key - # This will refresh cache on Sundays, nightly build should generate new cache. - command: echo "$(date +"%Y-%U")" > .circleci-weekly - - restore_cache: - - keys: - - env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - - run: - name: Setup - command: .circleci/unittest/windows/scripts/setup_env.sh - - save_cache: - - key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - paths: - - conda - - env - - run: - name: Install CUDA - command: packaging/windows/internal/cuda_install.bat - - run: - name: Update CUDA driver - command: packaging/windows/internal/driver_update.bat - - run: - name: Install torchvision - command: .circleci/unittest/windows/scripts/install.sh - - run: - name: Run tests - command: .circleci/unittest/windows/scripts/run_test.sh - - run: - name: Post process - command: .circleci/unittest/windows/scripts/post_process.sh - - store_test_results: - path: test-results - - cmake_linux_cpu: - <<: *binary_common - docker: - - image: "pytorch/manylinux-cpu" - resource_class: 2xlarge+ - steps: - - checkout_merge - - designate_upload_channel - - run: - name: Setup conda - command: .circleci/unittest/linux/scripts/setup_env.sh - - run: packaging/build_cmake.sh - - cmake_linux_gpu: - <<: *binary_common - machine: - image: ubuntu-2004-cuda-11.4:202110-01 - resource_class: gpu.nvidia.small - steps: - - checkout_merge - - designate_upload_channel - - run: - name: Setup conda - command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> .circleci/unittest/linux/scripts/setup_env.sh - - run: - name: Build torchvision C++ distribution and test - no_output_timeout: 30m - command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -e UPLOAD_CHANNEL -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh - - cmake_macos_cpu: - <<: *binary_common - macos: - xcode: "14.0" - steps: - - checkout_merge - - designate_upload_channel - - run: - command: | - curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh - sh conda.sh -b - source $HOME/miniconda3/bin/activate - conda install -yq conda-build cmake python=<< parameters.python_version >> - packaging/build_cmake.sh - - cmake_windows_cpu: - <<: *binary_common - executor: - name: windows-cpu - steps: - - checkout_merge - - designate_upload_channel - - run: - command: | - set -ex - source packaging/windows/internal/vc_install_helper.sh - eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda activate base - conda create -yn python39 python=3.9 - conda activate python39 - packaging/build_cmake.sh - - cmake_windows_gpu: - <<: *binary_common - executor: - name: windows-gpu - steps: - - checkout_merge - - designate_upload_channel - - run: - name: Update CUDA driver - command: packaging/windows/internal/driver_update.bat - - run: - command: | - set -ex - source packaging/windows/internal/vc_install_helper.sh - packaging/windows/internal/cuda_install.bat - eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" - conda activate - conda update -y conda - conda create -yn python39 python=3.9 - conda activate python39 - packaging/build_cmake.sh - - -workflows: - lint: - jobs: - - circleci_consistency - - build: - jobs: - - binary_win_wheel: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.8_cpu - python_version: '3.8' - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.8_cu117 - python_version: '3.8' - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.8_cu118 - python_version: '3.8' - - binary_win_wheel: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.9_cpu - python_version: '3.9' - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.9_cu117 - python_version: '3.9' - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.9_cu118 - python_version: '3.9' - - binary_win_wheel: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.10_cpu - python_version: '3.10' - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.10_cu117 - python_version: '3.10' - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.10_cu118 - python_version: '3.10' - - binary_win_wheel: - cu_version: cpu - name: binary_win_wheel_py3.11_cpu - python_version: '3.11' - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_wheel_py3.11_cu117 - python_version: '3.11' - - binary_win_wheel: - cu_version: cu118 - name: binary_win_wheel_py3.11_cu118 - python_version: '3.11' - - binary_win_conda: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.8_cpu - python_version: '3.8' - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.8_cu117 - python_version: '3.8' - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.8_cu118 - python_version: '3.8' - - binary_win_conda: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.9_cpu - python_version: '3.9' - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.9_cu117 - python_version: '3.9' - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.9_cu118 - python_version: '3.9' - - binary_win_conda: - cu_version: cpu - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.10_cpu - python_version: '3.10' - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.10_cu117 - python_version: '3.10' - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.10_cu118 - python_version: '3.10' - - binary_win_conda: - cu_version: cpu - name: binary_win_conda_py3.11_cpu - python_version: '3.11' - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: main - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: binary_win_conda_py3.11_cu117 - python_version: '3.11' - - binary_win_conda: - cu_version: cu118 - name: binary_win_conda_py3.11_cu118 - python_version: '3.11' - - binary_ios_build: - build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64 - ios_arch: x86_64 - ios_platform: SIMULATOR - name: binary_libtorchvision_ops_ios_12.0.0_x86_64 - - binary_ios_build: - build_environment: binary-libtorchvision_ops-ios-12.0.0-arm64 - ios_arch: arm64 - ios_platform: OS - name: binary_libtorchvision_ops_ios_12.0.0_arm64 - - binary_android_build: - build_environment: binary-libtorchvision_ops-android - name: binary_libtorchvision_ops_android - - unittest: - jobs: - - unittest_windows_cpu: - 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_cpu: - cu_version: cpu - name: unittest_windows_cpu_py3.10 - python_version: '3.10' - - unittest_windows_gpu: - cu_version: cu117 - name: unittest_windows_gpu_py3.8 - python_version: '3.8' - - unittest_windows_gpu: - cu_version: cu117 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.9 - python_version: '3.9' - - unittest_windows_gpu: - cu_version: cu117 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.10 - python_version: '3.10' - - cmake: - jobs: - - cmake_linux_cpu: - cu_version: cpu - name: cmake_linux_cpu - python_version: '3.8' - - cmake_linux_gpu: - cu_version: cu117 - name: cmake_linux_gpu - python_version: '3.8' - wheel_docker_image: pytorch/manylinux-cuda117 - - cmake_windows_cpu: - cu_version: cpu - name: cmake_windows_cpu - python_version: '3.8' - - cmake_windows_gpu: - cu_version: cu117 - name: cmake_windows_gpu - python_version: '3.8' - - cmake_macos_cpu: - cu_version: cpu - name: cmake_macos_cpu - python_version: '3.8' - - nightly: - jobs: - - binary_ios_build: - build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64 - filters: - branches: - only: - - nightly - ios_arch: x86_64 - ios_platform: SIMULATOR - name: nightly_binary_libtorchvision_ops_ios_12.0.0_x86_64 - - binary_ios_build: - build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-arm64 - filters: - branches: - only: - - nightly - ios_arch: arm64 - ios_platform: OS - name: nightly_binary_libtorchvision_ops_ios_12.0.0_arm64 - - binary_ios_upload: - build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-upload - context: org-member - filters: - branches: - only: - - nightly - requires: - - nightly_binary_libtorchvision_ops_ios_12.0.0_x86_64 - - nightly_binary_libtorchvision_ops_ios_12.0.0_arm64 - - binary_android_upload: - build_environment: nightly-binary-libtorchvision_ops-android-upload - context: org-member - filters: - branches: - only: - - nightly - name: nightly_binary_libtorchvision_ops_android_upload - - 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.8_cpu - python_version: '3.8' - - 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.8_cpu_upload - requires: - - nightly_binary_win_wheel_py3.8_cpu - subfolder: cpu/ - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.8_cu117 - python_version: '3.8' - - 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.8_cu117_upload - requires: - - nightly_binary_win_wheel_py3.8_cu117 - subfolder: cu117/ - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.8_cu118 - python_version: '3.8' - - 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.8_cu118_upload - requires: - - nightly_binary_win_wheel_py3.8_cu118 - subfolder: cu118/ - - 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.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_win_wheel_py3.9_cpu_upload - requires: - - nightly_binary_win_wheel_py3.9_cpu - subfolder: cpu/ - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.9_cu117 - 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_cu117_upload - requires: - - nightly_binary_win_wheel_py3.9_cu117 - subfolder: cu117/ - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.9_cu118 - 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_cu118_upload - requires: - - nightly_binary_win_wheel_py3.9_cu118 - subfolder: cu118/ - - 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.10_cpu - python_version: '3.10' - - 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.10_cpu_upload - requires: - - nightly_binary_win_wheel_py3.10_cpu - subfolder: cpu/ - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.10_cu117 - python_version: '3.10' - - 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.10_cu117_upload - requires: - - nightly_binary_win_wheel_py3.10_cu117 - subfolder: cu117/ - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.10_cu118 - python_version: '3.10' - - 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.10_cu118_upload - requires: - - nightly_binary_win_wheel_py3.10_cu118 - subfolder: cu118/ - - 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.11_cpu - python_version: '3.11' - - 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.11_cpu_upload - requires: - - nightly_binary_win_wheel_py3.11_cpu - subfolder: cpu/ - - binary_win_wheel: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.11_cu117 - python_version: '3.11' - - 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.11_cu117_upload - requires: - - nightly_binary_win_wheel_py3.11_cu117 - subfolder: cu117/ - - binary_win_wheel: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_wheel_py3.11_cu118 - python_version: '3.11' - - 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.11_cu118_upload - requires: - - nightly_binary_win_wheel_py3.11_cu118 - subfolder: cu118/ - - 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.8_cpu - python_version: '3.8' - - 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.8_cpu_upload - requires: - - nightly_binary_win_conda_py3.8_cpu - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.8_cu117 - python_version: '3.8' - - 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.8_cu117_upload - requires: - - nightly_binary_win_conda_py3.8_cu117 - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.8_cu118 - python_version: '3.8' - - 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.8_cu118_upload - requires: - - nightly_binary_win_conda_py3.8_cu118 - - 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 - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.9_cu117 - 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_cu117_upload - requires: - - nightly_binary_win_conda_py3.9_cu117 - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.9_cu118 - 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_cu118_upload - requires: - - nightly_binary_win_conda_py3.9_cu118 - - 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.10_cpu - python_version: '3.10' - - 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.10_cpu_upload - requires: - - nightly_binary_win_conda_py3.10_cpu - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.10_cu117 - python_version: '3.10' - - 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.10_cu117_upload - requires: - - nightly_binary_win_conda_py3.10_cu117 - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.10_cu118 - python_version: '3.10' - - 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.10_cu118_upload - requires: - - nightly_binary_win_conda_py3.10_cu118 - - 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.11_cpu - python_version: '3.11' - - 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.11_cpu_upload - requires: - - nightly_binary_win_conda_py3.11_cpu - - binary_win_conda: - cu_version: cu117 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.11_cu117 - python_version: '3.11' - - 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.11_cu117_upload - requires: - - nightly_binary_win_conda_py3.11_cu117 - - binary_win_conda: - cu_version: cu118 - filters: - branches: - only: nightly - tags: - only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ - name: nightly_binary_win_conda_py3.11_cu118 - python_version: '3.11' - - 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.11_cu118_upload - requires: - - nightly_binary_win_conda_py3.11_cu118 - docker_build: - triggers: - - schedule: - cron: "0 10 * * 0" - filters: - branches: - only: - - main - jobs: - - smoke_test_docker_image_build: - context: org-member diff --git a/.github/workflows/build-conda-linux.yml b/.github/workflows/build-conda-linux.yml deleted file mode 100644 index e44bb877ed6..00000000000 --- a/.github/workflows/build-conda-linux.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build Linux Conda - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: conda - os: linux - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: "" - post-script: "" - conda-package-directory: packaging/torchvision - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_conda_linux.yml@main - with: - conda-package-directory: ${{ matrix.conda-package-directory }} - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - smoke-test-script: ${{ matrix.smoke-test-script }} - trigger-event: ${{ github.event_name }} - secrets: - CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-conda-m1.yml b/.github/workflows/build-conda-m1.yml deleted file mode 100644 index 7006b6714aa..00000000000 --- a/.github/workflows/build-conda-m1.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build M1 Conda - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: conda - os: macos-arm64 - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: "" - post-script: "" - conda-package-directory: packaging/torchvision - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_conda_macos.yml@main - with: - conda-package-directory: ${{ matrix.conda-package-directory }} - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - smoke-test-script: ${{ matrix.smoke-test-script }} - runner-type: macos-m1-12 - trigger-event: ${{ github.event_name }} - secrets: - CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-conda-macos.yml b/.github/workflows/build-conda-macos.yml deleted file mode 100644 index 39d00534b3a..00000000000 --- a/.github/workflows/build-conda-macos.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Build Macos Conda - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: conda - os: macos - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: "" - post-script: "" - conda-package-directory: packaging/torchvision - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_conda_macos.yml@main - with: - conda-package-directory: ${{ matrix.conda-package-directory }} - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - smoke-test-script: ${{ matrix.smoke-test-script }} - runner-type: macos-12 - trigger-event: ${{ github.event_name }} - secrets: - CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-wheels-linux.yml b/.github/workflows/build-wheels-linux.yml deleted file mode 100644 index e997d648ec2..00000000000 --- a/.github/workflows/build-wheels-linux.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Build Linux Wheels - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: wheel - os: linux - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: packaging/pre_build_script.sh - post-script: packaging/post_build_script.sh - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main - with: - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - smoke-test-script: ${{ matrix.smoke-test-script }} - trigger-event: ${{ github.event_name }} - secrets: - AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} - AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml deleted file mode 100644 index 66c7687acc9..00000000000 --- a/.github/workflows/build-wheels-m1.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build M1 Wheels - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: wheel - os: macos-arm64 - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: packaging/pre_build_script.sh - post-script: packaging/post_build_script.sh - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main - with: - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - runner-type: macos-m1-12 - smoke-test-script: ${{ matrix.smoke-test-script }} - trigger-event: ${{ github.event_name }} - secrets: - AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} - AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/build-wheels-macos.yml b/.github/workflows/build-wheels-macos.yml deleted file mode 100644 index 6c5ebc0fc37..00000000000 --- a/.github/workflows/build-wheels-macos.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build Macos Wheels - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - tags: - # NOTE: Binary build pipelines should only get triggered on release candidate builds - # Release candidate tags look like: v1.11.0-rc1 - - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ - workflow_dispatch: - -jobs: - generate-matrix: - uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main - with: - package-type: wheel - os: macos - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build: - needs: generate-matrix - strategy: - fail-fast: false - matrix: - include: - - repository: pytorch/vision - pre-script: packaging/pre_build_script.sh - post-script: packaging/post_build_script.sh - smoke-test-script: test/smoke_test.py - package-name: torchvision - name: ${{ matrix.repository }} - uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main - with: - repository: ${{ matrix.repository }} - ref: "" - test-infra-repository: pytorch/test-infra - test-infra-ref: main - build-matrix: ${{ needs.generate-matrix.outputs.matrix }} - pre-script: ${{ matrix.pre-script }} - post-script: ${{ matrix.post-script }} - package-name: ${{ matrix.package-name }} - runner-type: macos-12 - smoke-test-script: ${{ matrix.smoke-test-script }} - trigger-event: ${{ github.event_name }} - secrets: - AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} - AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index efec5a2c2b5..00000000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,81 +0,0 @@ -name: Docs - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - workflow_dispatch: - -jobs: - build: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - upload-artifact: docs - script: | - set -euo pipefail - - export PYTHON_VERSION=3.8 - export GPU_ARCH_TYPE=cpu - export GPU_ARCH_VERSION='' - ./.github/scripts/setup-env.sh - - # Prepare conda - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - # FIXME: not sure why we need this. `ldd torchvision/video_reader.so` shows that it - # already links against the one pulled from conda. However, at runtime it pulls from - # /lib64 - # Should we maybe always do this in `./.github/scripts/setup-env.sh` so that we don't - # have to pay attention in all other workflows? - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" - - cd docs - - echo '::group::Install doc requirements' - pip install --progress-bar=off -r requirements.txt - echo '::endgroup::' - - echo '::group::Build HTML docs' - # The runner does not have sufficient memory to run with as many processes as their are - # cores (`-j auto`). Thus, we limit to a single process (`-j 1`) here. - sed -i -e 's/-j auto/-j 1/' Makefile - make html - echo '::endgroup::' - - mv build/html "${RUNNER_ARTIFACT_DIR}" - - upload-preview: - if: github.event_name == 'pull_request' - needs: [build] - runs-on: [self-hosted, linux.2xlarge] - steps: - - uses: actions/download-artifact@v3 - with: - name: docs - - - name: Upload docs preview - uses: seemethere/upload-artifact-s3@v5 - with: - retention-days: 14 - s3-bucket: doc-previews - if-no-files-found: error - path: html - s3-prefix: pytorch/vision/${{ github.event.pull_request.number }} - - # The upload below duplicates the upload from above, but to a different path. This is needed since we are in the - # process of changing the path, but want to keep the disruption to a minimum. - # See https://github.com/pytorch/test-infra/issues/3894 - # After a grace period, we can delete this again - - name: Upload docs preview - uses: seemethere/upload-artifact-s3@v5 - with: - retention-days: 14 - s3-bucket: doc-previews - if-no-files-found: error - path: html - s3-prefix: pytorch/pytorch/vision/${{ github.event.pull_request.number }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index ae5249a9219..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,98 +0,0 @@ -name: Lint - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - workflow_dispatch: - -jobs: - python-source-and-configs: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - echo '::group::Setup environment' - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda create --name ci --quiet --yes python=3.8 pip - conda activate ci - echo '::endgroup::' - - echo '::group::Install lint tools' - pip install --progress-bar=off pre-commit - echo '::endgroup::' - - echo '::group::Lint Python source and configs' - set +e - pre-commit run --all-files - - if [ $? -ne 0 ]; then - git --no-pager diff - exit 1 - fi - echo '::endgroup::' - - c-source: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - echo '::group::Setup environment' - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - # clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda - # and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge - # channel. Since we are not building or testing here, this is fine. - conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc - conda activate ci - export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" - echo '::endgroup::' - - echo '::group::Install lint tools' - curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format - chmod +x ./clang-format - echo '::endgroup::' - - echo '::group::Lint C source' - set +e - ./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format - - if [ $? -ne 0 ]; then - git --no-pager diff - exit 1 - fi - echo '::endgroup::' - - - python-types: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - export PYTHON_VERSION=3.8 - export GPU_ARCH_TYPE=cpu - export GPU_ARCH_VERSION='' - - ./.github/scripts/setup-env.sh - - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - - echo '::group::Install lint tools' - pip install --progress-bar=off mypy - echo '::endgroup::' - - echo '::group::Lint Python types' - mypy --install-types --non-interactive --config-file mypy.ini - echo '::endgroup::' diff --git a/.github/workflows/prototype-tests-linux-gpu.yml b/.github/workflows/prototype-tests-linux-gpu.yml deleted file mode 100644 index dee425054d5..00000000000 --- a/.github/workflows/prototype-tests-linux-gpu.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Prototype tests on Linux - -on: - pull_request: - -jobs: - unittests-prototype: - strategy: - matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - runner: ["linux.12xlarge"] - gpu-arch-type: ["cpu"] - include: - - python-version: "3.8" - runner: linux.g5.4xlarge.nvidia.gpu - gpu-arch-type: cuda - gpu-arch-version: "11.7" - fail-fast: false - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - runner: ${{ matrix.runner }} - gpu-arch-type: ${{ matrix.gpu-arch-type }} - gpu-arch-version: ${{ matrix.gpu-arch-version }} - timeout: 120 - script: | - set -euo pipefail - - export PYTHON_VERSION=${{ matrix.python-version }} - export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} - export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} - ./.github/scripts/setup-env.sh - - # Prepare conda - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - - echo '::group::Install testing utilities' - pip install --progress-bar=off pytest pytest-mock pytest-cov - echo '::endgroup::' - - # We don't want to run the prototype datasets tests. Since the positional glob into `pytest`, i.e. - # `test/test_prototype*.py` takes the highest priority, neither `--ignore` nor `--ignore-glob` can help us here. - rm test/test_prototype_datasets*.py - pytest \ - -v --durations=25 \ - --cov=torchvision/prototype --cov-report=term-missing \ - --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" \ - test/test_prototype_*.py diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml deleted file mode 100644 index b9b01b7a55e..00000000000 --- a/.github/workflows/test-linux.yml +++ /dev/null @@ -1,105 +0,0 @@ -name: Tests on Linux - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - workflow_dispatch: - -jobs: - unittests: - strategy: - matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - runner: ["linux.12xlarge"] - gpu-arch-type: ["cpu"] - include: - - python-version: 3.8 - runner: linux.g5.4xlarge.nvidia.gpu - gpu-arch-type: cuda - gpu-arch-version: "11.7" - fail-fast: false - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - runner: ${{ matrix.runner }} - gpu-arch-type: ${{ matrix.gpu-arch-type }} - gpu-arch-version: ${{ matrix.gpu-arch-version }} - timeout: 120 - script: | - set -euo pipefail - - export PYTHON_VERSION=${{ matrix.python-version }} - export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} - export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} - - ./.github/scripts/unittest.sh - - onnx: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - export PYTHON_VERSION=3.8 - export GPU_ARCH_TYPE=cpu - export GPU_ARCH_VERSION='' - - ./.github/scripts/setup-env.sh - - # Prepare conda - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - - echo '::group::Install ONNX' - pip install --progress-bar=off onnx onnxruntime - echo '::endgroup::' - - echo '::group::Install testing utilities' - pip install --progress-bar=off pytest - echo '::endgroup::' - - echo '::group::Run ONNX tests' - pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py - echo '::endgroup::' - - unittests-extended: - uses: pytorch/test-infra/.github/workflows/linux_job.yml@main - with: - repository: pytorch/vision - script: | - set -euo pipefail - - export PYTHON_VERSION=3.8 - export GPU_ARCH_TYPE=cpu - export GPU_ARCH_VERSION='' - - ./.github/scripts/setup-env.sh - - # Prepare conda - CONDA_PATH=$(which conda) - eval "$(${CONDA_PATH} shell.bash hook)" - conda activate ci - - echo '::group::Pre-download model weights' - pip install --progress-bar=off aiohttp aiofiles tqdm - python scripts/download_model_urls.py - echo '::endgroup::' - - echo '::group::Install testing utilities' - pip install --progress-bar=off pytest - echo '::endgroup::' - - echo '::group::Run extended unittests' - export PYTORCH_TEST_WITH_EXTENDED=1 - pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py - echo '::endgroup::' diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml deleted file mode 100644 index 03e4b2db121..00000000000 --- a/.github/workflows/test-macos.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Tests on macOS - -on: - pull_request: - push: - branches: - - nightly - - main - - release/* - workflow_dispatch: - -jobs: - unittests: - strategy: - matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - runner: ["macos-12"] - include: - - python-version: "3.8" - runner: macos-m1-12 - fail-fast: false - uses: pytorch/test-infra/.github/workflows/macos_job.yml@main - with: - repository: pytorch/vision - # We need an increased timeout here, since the macos-12 runner is the free one from GH - # and needs roughly 2 hours to just run the test suite - timeout: 240 - runner: ${{ matrix.runner }} - script: | - set -euo pipefail - - export PYTHON_VERSION=${{ matrix.python-version }} - export GPU_ARCH_TYPE=cpu - export GPU_ARCH_VERSION='' - - ./.github/scripts/unittest.sh diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 3778e3ed9ca..25c6d5de91d 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -13,13 +13,6 @@ jobs: unittests: strategy: matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - runner: ["windows.4xlarge"] - gpu-arch-type: ["cpu"] include: - python-version: "3.8" runner: windows.8xlarge.nvidia.gpu From aa6cd7c6c2f3b4b000173543803afd80221e7474 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 20 Apr 2023 14:09:12 +0200 Subject: [PATCH 03/14] use other runner type --- .github/workflows/test-windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index 25c6d5de91d..ae2518964a1 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -15,7 +15,7 @@ jobs: matrix: include: - python-version: "3.8" - runner: windows.8xlarge.nvidia.gpu + runner: windows.g5.4xlarge.nvidia.gpu gpu-arch-type: cuda gpu-arch-version: "11.7" fail-fast: false From 082f8a15b918abdd25a12e4cfc5cb13fcfda56ca Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 20 Apr 2023 14:46:06 +0200 Subject: [PATCH 04/14] [REVERTME] only run smoke tests --- .github/scripts/unittest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 2a0b7154200..267edfedcbc 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -11,4 +11,5 @@ echo '::group::Install testing utilities' pip install --progress-bar=off pytest pytest-mock pytest-cov echo '::endgroup::' -pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 +python test/smoke_test.py +#pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 From 6b9db825784e519195d722c02cc9d73c05c9e979 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 20 Apr 2023 15:08:31 +0200 Subject: [PATCH 05/14] improve smoke test --- test/smoke_test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index 1f1364512ee..649e097e9c8 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -1,13 +1,11 @@ """Run smoke tests""" -import os import sys from pathlib import Path import torch -import torch.nn as nn import torchvision -from torchvision.io import read_image +from torchvision.io import decode_jpeg, read_file, read_image from torchvision.models import resnet50, ResNet50_Weights SCRIPT_DIR = Path(__file__).parent @@ -29,6 +27,13 @@ def smoke_test_torchvision_read_decode() -> None: raise RuntimeError(f"Unexpected shape of img_png: {img_png.shape}") +def smoke_test_torchvision_decode_jpeg_cuda(): + img_jpg_data = read_file(str(SCRIPT_DIR / "assets" / "encode_jpeg" / "grace_hopper_517x606.jpg")) + img_jpg = decode_jpeg(img_jpg_data, device="cuda") + if img_jpg.ndim != 3 or img_jpg.numel() < 100: + raise RuntimeError(f"Unexpected shape of img_jpg: {img_jpg.shape}") + + def smoke_test_compile() -> None: try: model = resnet50().cuda() @@ -77,6 +82,7 @@ def main() -> None: smoke_test_torchvision_read_decode() smoke_test_torchvision_resnet50_classify() if torch.cuda.is_available(): + smoke_test_torchvision_decode_jpeg_cuda() smoke_test_torchvision_resnet50_classify("cuda") smoke_test_compile() From e32de6143959ab35b7863d628179b7add0424378 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Fri, 21 Apr 2023 09:44:32 +0200 Subject: [PATCH 06/14] trigger CI From 350f94a2520215810364522490a3824daa96708f Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 10:57:06 +0200 Subject: [PATCH 07/14] readd one CPU workflow --- .github/workflows/test-windows.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index ae2518964a1..f8cd996e0be 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -13,6 +13,10 @@ jobs: unittests: strategy: matrix: + python-version: + - "3.8" + runner: ["windows.4xlarge"] + gpu-arch-type: ["cpu"] include: - python-version: "3.8" runner: windows.g5.4xlarge.nvidia.gpu From 122dc355afff9e0b37c2584d23658a1f9c760b0c Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 11:57:40 +0200 Subject: [PATCH 08/14] add debug sleep for GPU runner --- .github/scripts/unittest.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 267edfedcbc..53a4f26c8b9 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -11,5 +11,9 @@ echo '::group::Install testing utilities' pip install --progress-bar=off pytest pytest-mock pytest-cov echo '::endgroup::' +if [[ $GPU_ARCH_TYPE == 'cuda' ]]; then + sleep 3600 +fi + python test/smoke_test.py #pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 From 5c0da2e95466fbfe151c5434e96d15cb241b26bd Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 22:14:23 +0200 Subject: [PATCH 09/14] add CUDA bin directory to path --- .github/workflows/test-windows.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index f8cd996e0be..c106fce66e6 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -42,6 +42,7 @@ jobs: # TODO: This should be handled by the generic Windows job the same as its done by the generic Linux job export CUDA_HOME="/c/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${{ matrix.gpu-arch-version }}" export CUDA_PATH="${CUDA_HOME}" + export PATH="${CUDA_PATH}/bin:${PATH}" fi ./.github/scripts/unittest.sh From f09eb149aca25305e262a7d6a5db6d8001d7c629 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 11:57:40 +0200 Subject: [PATCH 10/14] Revert "add debug sleep for GPU runner" This reverts commit 122dc355afff9e0b37c2584d23658a1f9c760b0c. --- .github/scripts/unittest.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 53a4f26c8b9..267edfedcbc 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -11,9 +11,5 @@ echo '::group::Install testing utilities' pip install --progress-bar=off pytest pytest-mock pytest-cov echo '::endgroup::' -if [[ $GPU_ARCH_TYPE == 'cuda' ]]; then - sleep 3600 -fi - python test/smoke_test.py #pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 From 19dab283709234a235d89ddfbe408e9f1e15b5f1 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 20 Apr 2023 14:46:06 +0200 Subject: [PATCH 11/14] Revert "[REVERTME] only run smoke tests" This reverts commit 082f8a15b918abdd25a12e4cfc5cb13fcfda56ca. --- .github/scripts/unittest.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/scripts/unittest.sh b/.github/scripts/unittest.sh index 267edfedcbc..2a0b7154200 100755 --- a/.github/scripts/unittest.sh +++ b/.github/scripts/unittest.sh @@ -11,5 +11,4 @@ echo '::group::Install testing utilities' pip install --progress-bar=off pytest pytest-mock pytest-cov echo '::endgroup::' -python test/smoke_test.py -#pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 +pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 From f28628d74d098bf4da9f63ba879a33793e6d5d0a Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 23:00:13 +0200 Subject: [PATCH 12/14] Revert "[REVERTME] disable unrelated CI" This reverts commit eb184a335f3f027c79279c66dbf831a1222b0580. --- .circleci/config.yml | 1399 +++++++++++++++++ .github/workflows/build-conda-linux.yml | 51 + .github/workflows/build-conda-m1.yml | 52 + .github/workflows/build-conda-macos.yml | 52 + .github/workflows/build-wheels-linux.yml | 50 + .github/workflows/build-wheels-m1.yml | 51 + .github/workflows/build-wheels-macos.yml | 51 + .github/workflows/docs.yml | 81 + .github/workflows/lint.yml | 98 ++ .../workflows/prototype-tests-linux-gpu.yml | 54 + .github/workflows/test-linux.yml | 105 ++ .github/workflows/test-macos.yml | 40 + .github/workflows/test-windows.yml | 3 + 13 files changed, 2087 insertions(+) create mode 100644 .circleci/config.yml create mode 100644 .github/workflows/build-conda-linux.yml create mode 100644 .github/workflows/build-conda-m1.yml create mode 100644 .github/workflows/build-conda-macos.yml create mode 100644 .github/workflows/build-wheels-linux.yml create mode 100644 .github/workflows/build-wheels-m1.yml create mode 100644 .github/workflows/build-wheels-macos.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/prototype-tests-linux-gpu.yml create mode 100644 .github/workflows/test-linux.yml create mode 100644 .github/workflows/test-macos.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..2acc7e0c78d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,1399 @@ +version: 2.1 + +# How to test the Linux jobs: +# - Install CircleCI local CLI: https://circleci.com/docs/2.0/local-cli/ +# - circleci config process .circleci/config.yml > gen.yml && circleci local execute -c gen.yml --job binary_win_wheel_py3.8 +# - Replace binary_win_wheel_py3.8 with the name of the job you want to test. +# Job names are 'name:' key. + +executors: + windows-cpu: + machine: + resource_class: windows.xlarge + image: windows-server-2019-vs2019:stable + shell: bash.exe + + windows-gpu: + machine: + resource_class: windows.gpu.nvidia.medium + image: windows-server-2019-nvidia:stable + shell: bash.exe + +commands: + checkout_merge: + description: "checkout merge branch" + steps: + - checkout +# - run: +# name: Checkout merge branch +# command: | +# set -ex +# BRANCH=$(git rev-parse --abbrev-ref HEAD) +# if [[ "$BRANCH" != "main" ]]; then +# git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} +# git checkout "merged/$CIRCLE_BRANCH" +# fi + designate_upload_channel: + description: "inserts the correct upload channel into ${BASH_ENV}" + steps: + - run: + name: adding UPLOAD_CHANNEL to BASH_ENV + command: | + our_upload_channel=nightly + # On tags upload to test instead + if [[ -n "${CIRCLE_TAG}" ]]; then + our_upload_channel=test + fi + echo "export UPLOAD_CHANNEL=${our_upload_channel}" >> ${BASH_ENV} + + brew_update: + description: "Update Homebrew and install base formulae" + steps: + - run: + name: Update Homebrew + no_output_timeout: "10m" + command: | + set -ex + + # Update repositories manually. + # Running `brew update` produces a comparison between the + # current checkout and the updated checkout, which takes a + # very long time because the existing checkout is 2y old. + for path in $(find /usr/local/Homebrew -type d -name .git) + do + cd $path/.. + git fetch --depth=1 origin + git reset --hard origin/master + done + + export HOMEBREW_NO_AUTO_UPDATE=1 + + # Install expect and moreutils so that we can call `unbuffer` and `ts`. + # moreutils installs a `parallel` executable by default, which conflicts + # with the executable from the GNU `parallel`, so we must unlink GNU + # `parallel` first, and relink it afterwards. + brew install coreutils + brew unlink parallel + brew install moreutils + brew link parallel --overwrite + brew install expect + + brew_install: + description: "Install Homebrew formulae" + parameters: + formulae: + type: string + default: "" + steps: + - run: + name: Install << parameters.formulae >> + no_output_timeout: "10m" + command: | + set -ex + export HOMEBREW_NO_AUTO_UPDATE=1 + brew install << parameters.formulae >> + + run_brew_for_ios_build: + steps: + - brew_update + - brew_install: + formulae: libtool + + pip_install: + parameters: + args: + type: string + descr: + type: string + default: "" + user: + type: boolean + default: true + steps: + - run: + name: > + <<^ parameters.descr >> pip install << parameters.args >> <> + <<# parameters.descr >> << parameters.descr >> <> + command: > + pip install + <<# parameters.user >> --user <> + --progress-bar=off + << parameters.args >> + +binary_common: &binary_common + parameters: + # Edit these defaults to do a release + build_version: + description: "version number of release binary; by default, build a nightly" + type: string + default: "" + pytorch_version: + description: "PyTorch version to build against; by default, use a nightly" + type: string + default: "" + # Don't edit these + python_version: + description: "Python version to build against (e.g., 3.8)" + type: string + cu_version: + description: "CUDA version to build against, in CU format (e.g., cpu or cu100)" + type: string + default: "cpu" + unicode_abi: + description: "Python 2.7 wheel only: whether or not we are cp27mu (default: no)" + type: string + default: "" + wheel_docker_image: + description: "Wheel only: what docker image to use" + type: string + default: "" + 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 >> + UNICODE_ABI: << parameters.unicode_abi >> + CU_VERSION: << parameters.cu_version >> + MACOSX_DEPLOYMENT_TARGET: 10.9 + +torchvision_ios_params: &torchvision_ios_params + parameters: + build_environment: + type: string + default: "" + ios_arch: + type: string + default: "" + ios_platform: + type: string + default: "" + environment: + BUILD_ENVIRONMENT: << parameters.build_environment >> + IOS_ARCH: << parameters.ios_arch >> + IOS_PLATFORM: << parameters.ios_platform >> + +torchvision_android_params: &torchvision_android_params + parameters: + build_environment: + type: string + default: "" + environment: + BUILD_ENVIRONMENT: << parameters.build_environment >> + +smoke_test_common: &smoke_test_common + <<: *binary_common + docker: + - image: torchvision/smoke_test:latest + +jobs: + circleci_consistency: + docker: + - image: cimg/python:3.8 + steps: + - checkout + - pip_install: + args: jinja2 pyyaml + - run: + name: Check CircleCI config consistency + command: | + python .circleci/regenerate.py + git diff --exit-code || (echo ".circleci/config.yml not in sync with config.yml.in! Run .circleci/regenerate.py to update config"; exit 1) + + binary_win_conda: + <<: *binary_common + executor: windows-cpu + steps: + - checkout_merge + - designate_upload_channel + - run: + name: Build conda packages + no_output_timeout: 30m + command: | + set -ex + source packaging/windows/internal/vc_install_helper.sh + packaging/windows/internal/cuda_install.bat + eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" + conda activate base + conda install -yq conda-build "conda-package-handling!=1.5.0" + packaging/build_conda.sh + rm /C/tools/miniconda3/conda-bld/win-64/vs${VC_YEAR}*.tar.bz2 + - store_artifacts: + path: C:/tools/miniconda3/conda-bld/win-64 + - persist_to_workspace: + root: C:/tools/miniconda3/conda-bld/win-64 + paths: + - "*" + - store_test_results: + path: build_results/ + + binary_win_wheel: + <<: *binary_common + executor: windows-cpu + steps: + - checkout_merge + - designate_upload_channel + - run: + name: Build wheel packages + no_output_timeout: 30m + command: | + set -ex + source packaging/windows/internal/vc_install_helper.sh + packaging/windows/internal/cuda_install.bat + packaging/build_wheel.sh + - store_artifacts: + path: dist + - persist_to_workspace: + root: dist + paths: + - "*" + - store_test_results: + path: build_results/ + + binary_macos_wheel: + <<: *binary_common + macos: + xcode: "14.0" + steps: + - checkout_merge + - designate_upload_channel + - run: + # Cannot easily deduplicate this as source'ing activate + # will set environment variables which we need to propagate + # to build_wheel.sh + command: | + curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh + sh conda.sh -b + source $HOME/miniconda3/bin/activate + packaging/build_wheel.sh + - store_artifacts: + path: dist + - persist_to_workspace: + root: dist + paths: + - "*" + + binary_ios_build: + <<: *torchvision_ios_params + macos: + xcode: "14.0" + steps: + - attach_workspace: + at: ~/workspace + - checkout + - run_brew_for_ios_build + - run: + name: Build + no_output_timeout: "1h" + command: | + script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_build.sh" + cat "$script" + source "$script" + - persist_to_workspace: + root: /Users/distiller/workspace/ + paths: ios + + binary_ios_upload: + <<: *torchvision_ios_params + macos: + xcode: "14.0" + steps: + - attach_workspace: + at: ~/workspace + - checkout + - run_brew_for_ios_build + - run: + name: Upload + no_output_timeout: "1h" + command: | + script="/Users/distiller/project/.circleci/unittest/ios/scripts/binary_ios_upload.sh" + cat "$script" + source "$script" + + binary_android_build: + <<: *torchvision_android_params + docker: + - image: cimg/android:2021.08-ndk + resource_class: xlarge + steps: + - attach_workspace: + at: ~/workspace + - checkout + - run: + name: Build + no_output_timeout: "1h" + command: | + script="/home/circleci/project/.circleci/unittest/android/scripts/binary_android_build.sh" + cat "$script" + source "$script" + - store_artifacts: + path: ~/workspace/artifacts + + binary_android_upload: + <<: *torchvision_android_params + docker: + - image: cimg/android:2021.08-ndk + resource_class: xlarge + steps: + - attach_workspace: + at: ~/workspace + - checkout + - run: + name: Upload + no_output_timeout: "1h" + command: | + script="/home/circleci/project/.circleci/unittest/android/scripts/binary_android_upload.sh" + cat "$script" + source "$script" + + binary_macos_conda: + <<: *binary_common + macos: + xcode: "14.0" + steps: + - checkout_merge + - designate_upload_channel + - run: + command: | + curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh + sh conda.sh -b + source $HOME/miniconda3/bin/activate + conda install -yq conda-build + packaging/build_conda.sh + - store_artifacts: + path: /Users/distiller/miniconda3/conda-bld/osx-64 + - persist_to_workspace: + root: /Users/distiller/miniconda3/conda-bld/osx-64 + paths: + - "*" + - store_test_results: + path: build_results/ + + # Requires org-member context + binary_conda_upload: + docker: + - image: continuumio/miniconda + steps: + - attach_workspace: + at: ~/workspace + - designate_upload_channel + - run: + command: | + # Prevent credential from leaking + conda install -yq anaconda-client + set -x + anaconda -t "${CONDA_PYTORCHBOT_TOKEN}" upload ~/workspace/*.tar.bz2 -u "pytorch-${UPLOAD_CHANNEL}" --label main --no-progress --force + + # Requires org-member context + binary_wheel_upload: + parameters: + subfolder: + description: "What whl subfolder to upload to, e.g., blank or cu100/ (trailing slash is important)" + type: string + docker: + - image: cimg/python:3.8 + steps: + - attach_workspace: + at: ~/workspace + - designate_upload_channel + - checkout + - pip_install: + args: awscli + - run: + command: | + export PATH="$HOME/.local/bin:$PATH" + # Prevent credential from leaking + set +x + export AWS_ACCESS_KEY_ID="${PYTORCH_BINARY_AWS_ACCESS_KEY_ID}" + export AWS_SECRET_ACCESS_KEY="${PYTORCH_BINARY_AWS_SECRET_ACCESS_KEY}" + set -x + for pkg in ~/workspace/*.whl; do + aws s3 cp "$pkg" "s3://pytorch/whl/${UPLOAD_CHANNEL}/<< parameters.subfolder >>" --acl public-read + done + + smoke_test_docker_image_build: + machine: + image: ubuntu-2004:202104-01 + resource_class: large + environment: + image_name: torchvision/smoke_test + steps: + - checkout + - designate_upload_channel + - run: + name: Build and push Docker image + no_output_timeout: "1h" + command: | + set +x + echo "${DOCKER_HUB_TOKEN}" | docker login --username "${DOCKER_HUB_USERNAME}" --password-stdin + set -x + cd .circleci/smoke_test/docker && docker build . -t ${image_name}:${CIRCLE_WORKFLOW_ID} + docker tag ${image_name}:${CIRCLE_WORKFLOW_ID} ${image_name}:latest + docker push ${image_name}:${CIRCLE_WORKFLOW_ID} + docker push ${image_name}:latest + + unittest_windows_cpu: + <<: *binary_common + executor: + name: windows-cpu + steps: + - checkout + - designate_upload_channel + - run: + name: Generate cache key + # This will refresh cache on Sundays, nightly build should generate new cache. + command: echo "$(date +"%Y-%U")" > .circleci-weekly + - restore_cache: + + keys: + - env-v2-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} + + - run: + name: Setup + command: .circleci/unittest/windows/scripts/setup_env.sh + - save_cache: + + key: env-v2-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} + + paths: + - conda + - env + - run: + name: Install torchvision + command: .circleci/unittest/windows/scripts/install.sh + - run: + name: Run tests + command: .circleci/unittest/windows/scripts/run_test.sh + - run: + name: Post process + command: .circleci/unittest/windows/scripts/post_process.sh + - store_test_results: + path: test-results + + unittest_windows_gpu: + <<: *binary_common + executor: + name: windows-gpu + environment: + CUDA_VERSION: "11.7" + PYTHON_VERSION: << parameters.python_version >> + steps: + - checkout + - designate_upload_channel + - run: + name: Generate cache key + # This will refresh cache on Sundays, nightly build should generate new cache. + command: echo "$(date +"%Y-%U")" > .circleci-weekly + - restore_cache: + + keys: + - env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} + + - run: + name: Setup + command: .circleci/unittest/windows/scripts/setup_env.sh + - save_cache: + + key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} + + paths: + - conda + - env + - run: + name: Install CUDA + command: packaging/windows/internal/cuda_install.bat + - run: + name: Update CUDA driver + command: packaging/windows/internal/driver_update.bat + - run: + name: Install torchvision + command: .circleci/unittest/windows/scripts/install.sh + - run: + name: Run tests + command: .circleci/unittest/windows/scripts/run_test.sh + - run: + name: Post process + command: .circleci/unittest/windows/scripts/post_process.sh + - store_test_results: + path: test-results + + cmake_linux_cpu: + <<: *binary_common + docker: + - image: "pytorch/manylinux-cpu" + resource_class: 2xlarge+ + steps: + - checkout_merge + - designate_upload_channel + - run: + name: Setup conda + command: .circleci/unittest/linux/scripts/setup_env.sh + - run: packaging/build_cmake.sh + + cmake_linux_gpu: + <<: *binary_common + machine: + image: ubuntu-2004-cuda-11.4:202110-01 + resource_class: gpu.nvidia.small + steps: + - checkout_merge + - designate_upload_channel + - run: + name: Setup conda + command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> .circleci/unittest/linux/scripts/setup_env.sh + - run: + name: Build torchvision C++ distribution and test + no_output_timeout: 30m + command: docker run -e CU_VERSION -e PYTHON_VERSION -e UNICODE_ABI -e PYTORCH_VERSION -e UPLOAD_CHANNEL -t --gpus all -v $PWD:$PWD -w $PWD << parameters.wheel_docker_image >> packaging/build_cmake.sh + + cmake_macos_cpu: + <<: *binary_common + macos: + xcode: "14.0" + steps: + - checkout_merge + - designate_upload_channel + - run: + command: | + curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh + sh conda.sh -b + source $HOME/miniconda3/bin/activate + conda install -yq conda-build cmake python=<< parameters.python_version >> + packaging/build_cmake.sh + + cmake_windows_cpu: + <<: *binary_common + executor: + name: windows-cpu + steps: + - checkout_merge + - designate_upload_channel + - run: + command: | + set -ex + source packaging/windows/internal/vc_install_helper.sh + eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" + conda activate base + conda create -yn python39 python=3.9 + conda activate python39 + packaging/build_cmake.sh + + cmake_windows_gpu: + <<: *binary_common + executor: + name: windows-gpu + steps: + - checkout_merge + - designate_upload_channel + - run: + name: Update CUDA driver + command: packaging/windows/internal/driver_update.bat + - run: + command: | + set -ex + source packaging/windows/internal/vc_install_helper.sh + packaging/windows/internal/cuda_install.bat + eval "$('/C/tools/miniconda3/Scripts/conda.exe' 'shell.bash' 'hook')" + conda activate + conda update -y conda + conda create -yn python39 python=3.9 + conda activate python39 + packaging/build_cmake.sh + + +workflows: + lint: + jobs: + - circleci_consistency + + build: + jobs: + - binary_win_wheel: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.8_cpu + python_version: '3.8' + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.8_cu117 + python_version: '3.8' + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.8_cu118 + python_version: '3.8' + - binary_win_wheel: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cpu + python_version: '3.9' + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu117 + python_version: '3.9' + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.9_cu118 + python_version: '3.9' + - binary_win_wheel: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.10_cpu + python_version: '3.10' + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.10_cu117 + python_version: '3.10' + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.10_cu118 + python_version: '3.10' + - binary_win_wheel: + cu_version: cpu + name: binary_win_wheel_py3.11_cpu + python_version: '3.11' + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_wheel_py3.11_cu117 + python_version: '3.11' + - binary_win_wheel: + cu_version: cu118 + name: binary_win_wheel_py3.11_cu118 + python_version: '3.11' + - binary_win_conda: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.8_cpu + python_version: '3.8' + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.8_cu117 + python_version: '3.8' + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.8_cu118 + python_version: '3.8' + - binary_win_conda: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cpu + python_version: '3.9' + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu117 + python_version: '3.9' + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.9_cu118 + python_version: '3.9' + - binary_win_conda: + cu_version: cpu + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.10_cpu + python_version: '3.10' + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.10_cu117 + python_version: '3.10' + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.10_cu118 + python_version: '3.10' + - binary_win_conda: + cu_version: cpu + name: binary_win_conda_py3.11_cpu + python_version: '3.11' + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: main + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: binary_win_conda_py3.11_cu117 + python_version: '3.11' + - binary_win_conda: + cu_version: cu118 + name: binary_win_conda_py3.11_cu118 + python_version: '3.11' + - binary_ios_build: + build_environment: binary-libtorchvision_ops-ios-12.0.0-x86_64 + ios_arch: x86_64 + ios_platform: SIMULATOR + name: binary_libtorchvision_ops_ios_12.0.0_x86_64 + - binary_ios_build: + build_environment: binary-libtorchvision_ops-ios-12.0.0-arm64 + ios_arch: arm64 + ios_platform: OS + name: binary_libtorchvision_ops_ios_12.0.0_arm64 + - binary_android_build: + build_environment: binary-libtorchvision_ops-android + name: binary_libtorchvision_ops_android + + unittest: + jobs: + - unittest_windows_cpu: + 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_cpu: + cu_version: cpu + name: unittest_windows_cpu_py3.10 + python_version: '3.10' + - unittest_windows_gpu: + cu_version: cu117 + name: unittest_windows_gpu_py3.8 + python_version: '3.8' + - unittest_windows_gpu: + cu_version: cu117 + filters: + branches: + only: + - main + - nightly + name: unittest_windows_gpu_py3.9 + python_version: '3.9' + - unittest_windows_gpu: + cu_version: cu117 + filters: + branches: + only: + - main + - nightly + name: unittest_windows_gpu_py3.10 + python_version: '3.10' + + cmake: + jobs: + - cmake_linux_cpu: + cu_version: cpu + name: cmake_linux_cpu + python_version: '3.8' + - cmake_linux_gpu: + cu_version: cu117 + name: cmake_linux_gpu + python_version: '3.8' + wheel_docker_image: pytorch/manylinux-cuda117 + - cmake_windows_cpu: + cu_version: cpu + name: cmake_windows_cpu + python_version: '3.8' + - cmake_windows_gpu: + cu_version: cu117 + name: cmake_windows_gpu + python_version: '3.8' + - cmake_macos_cpu: + cu_version: cpu + name: cmake_macos_cpu + python_version: '3.8' + + nightly: + jobs: + - binary_ios_build: + build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-x86_64 + filters: + branches: + only: + - nightly + ios_arch: x86_64 + ios_platform: SIMULATOR + name: nightly_binary_libtorchvision_ops_ios_12.0.0_x86_64 + - binary_ios_build: + build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-arm64 + filters: + branches: + only: + - nightly + ios_arch: arm64 + ios_platform: OS + name: nightly_binary_libtorchvision_ops_ios_12.0.0_arm64 + - binary_ios_upload: + build_environment: nightly-binary-libtorchvision_ops-ios-12.0.0-upload + context: org-member + filters: + branches: + only: + - nightly + requires: + - nightly_binary_libtorchvision_ops_ios_12.0.0_x86_64 + - nightly_binary_libtorchvision_ops_ios_12.0.0_arm64 + - binary_android_upload: + build_environment: nightly-binary-libtorchvision_ops-android-upload + context: org-member + filters: + branches: + only: + - nightly + name: nightly_binary_libtorchvision_ops_android_upload + - 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.8_cpu + python_version: '3.8' + - 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.8_cpu_upload + requires: + - nightly_binary_win_wheel_py3.8_cpu + subfolder: cpu/ + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.8_cu117 + python_version: '3.8' + - 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.8_cu117_upload + requires: + - nightly_binary_win_wheel_py3.8_cu117 + subfolder: cu117/ + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.8_cu118 + python_version: '3.8' + - 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.8_cu118_upload + requires: + - nightly_binary_win_wheel_py3.8_cu118 + subfolder: cu118/ + - 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.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_win_wheel_py3.9_cpu_upload + requires: + - nightly_binary_win_wheel_py3.9_cpu + subfolder: cpu/ + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu117 + 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_cu117_upload + requires: + - nightly_binary_win_wheel_py3.9_cu117 + subfolder: cu117/ + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.9_cu118 + 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_cu118_upload + requires: + - nightly_binary_win_wheel_py3.9_cu118 + subfolder: cu118/ + - 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.10_cpu + python_version: '3.10' + - 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.10_cpu_upload + requires: + - nightly_binary_win_wheel_py3.10_cpu + subfolder: cpu/ + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.10_cu117 + python_version: '3.10' + - 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.10_cu117_upload + requires: + - nightly_binary_win_wheel_py3.10_cu117 + subfolder: cu117/ + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.10_cu118 + python_version: '3.10' + - 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.10_cu118_upload + requires: + - nightly_binary_win_wheel_py3.10_cu118 + subfolder: cu118/ + - 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.11_cpu + python_version: '3.11' + - 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.11_cpu_upload + requires: + - nightly_binary_win_wheel_py3.11_cpu + subfolder: cpu/ + - binary_win_wheel: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.11_cu117 + python_version: '3.11' + - 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.11_cu117_upload + requires: + - nightly_binary_win_wheel_py3.11_cu117 + subfolder: cu117/ + - binary_win_wheel: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_wheel_py3.11_cu118 + python_version: '3.11' + - 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.11_cu118_upload + requires: + - nightly_binary_win_wheel_py3.11_cu118 + subfolder: cu118/ + - 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.8_cpu + python_version: '3.8' + - 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.8_cpu_upload + requires: + - nightly_binary_win_conda_py3.8_cpu + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.8_cu117 + python_version: '3.8' + - 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.8_cu117_upload + requires: + - nightly_binary_win_conda_py3.8_cu117 + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.8_cu118 + python_version: '3.8' + - 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.8_cu118_upload + requires: + - nightly_binary_win_conda_py3.8_cu118 + - 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 + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu117 + 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_cu117_upload + requires: + - nightly_binary_win_conda_py3.9_cu117 + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.9_cu118 + 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_cu118_upload + requires: + - nightly_binary_win_conda_py3.9_cu118 + - 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.10_cpu + python_version: '3.10' + - 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.10_cpu_upload + requires: + - nightly_binary_win_conda_py3.10_cpu + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.10_cu117 + python_version: '3.10' + - 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.10_cu117_upload + requires: + - nightly_binary_win_conda_py3.10_cu117 + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.10_cu118 + python_version: '3.10' + - 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.10_cu118_upload + requires: + - nightly_binary_win_conda_py3.10_cu118 + - 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.11_cpu + python_version: '3.11' + - 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.11_cpu_upload + requires: + - nightly_binary_win_conda_py3.11_cpu + - binary_win_conda: + cu_version: cu117 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.11_cu117 + python_version: '3.11' + - 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.11_cu117_upload + requires: + - nightly_binary_win_conda_py3.11_cu117 + - binary_win_conda: + cu_version: cu118 + filters: + branches: + only: nightly + tags: + only: /v[0-9]+(\.[0-9]+)*-rc[0-9]+/ + name: nightly_binary_win_conda_py3.11_cu118 + python_version: '3.11' + - 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.11_cu118_upload + requires: + - nightly_binary_win_conda_py3.11_cu118 + docker_build: + triggers: + - schedule: + cron: "0 10 * * 0" + filters: + branches: + only: + - main + jobs: + - smoke_test_docker_image_build: + context: org-member diff --git a/.github/workflows/build-conda-linux.yml b/.github/workflows/build-conda-linux.yml new file mode 100644 index 00000000000..e44bb877ed6 --- /dev/null +++ b/.github/workflows/build-conda-linux.yml @@ -0,0 +1,51 @@ +name: Build Linux Conda + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: conda + os: linux + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: "" + post-script: "" + conda-package-directory: packaging/torchvision + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_conda_linux.yml@main + with: + conda-package-directory: ${{ matrix.conda-package-directory }} + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-conda-m1.yml b/.github/workflows/build-conda-m1.yml new file mode 100644 index 00000000000..7006b6714aa --- /dev/null +++ b/.github/workflows/build-conda-m1.yml @@ -0,0 +1,52 @@ +name: Build M1 Conda + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: conda + os: macos-arm64 + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: "" + post-script: "" + conda-package-directory: packaging/torchvision + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_conda_macos.yml@main + with: + conda-package-directory: ${{ matrix.conda-package-directory }} + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + runner-type: macos-m1-12 + trigger-event: ${{ github.event_name }} + secrets: + CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-conda-macos.yml b/.github/workflows/build-conda-macos.yml new file mode 100644 index 00000000000..39d00534b3a --- /dev/null +++ b/.github/workflows/build-conda-macos.yml @@ -0,0 +1,52 @@ +name: Build Macos Conda + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: conda + os: macos + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: "" + post-script: "" + conda-package-directory: packaging/torchvision + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_conda_macos.yml@main + with: + conda-package-directory: ${{ matrix.conda-package-directory }} + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + runner-type: macos-12 + trigger-event: ${{ github.event_name }} + secrets: + CONDA_PYTORCHBOT_TOKEN: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} diff --git a/.github/workflows/build-wheels-linux.yml b/.github/workflows/build-wheels-linux.yml new file mode 100644 index 00000000000..e997d648ec2 --- /dev/null +++ b/.github/workflows/build-wheels-linux.yml @@ -0,0 +1,50 @@ +name: Build Linux Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: linux + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: packaging/pre_build_script.sh + post-script: packaging/post_build_script.sh + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} + AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/build-wheels-m1.yml b/.github/workflows/build-wheels-m1.yml new file mode 100644 index 00000000000..66c7687acc9 --- /dev/null +++ b/.github/workflows/build-wheels-m1.yml @@ -0,0 +1,51 @@ +name: Build M1 Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: macos-arm64 + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: packaging/pre_build_script.sh + post-script: packaging/post_build_script.sh + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + runner-type: macos-m1-12 + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} + AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/build-wheels-macos.yml b/.github/workflows/build-wheels-macos.yml new file mode 100644 index 00000000000..6c5ebc0fc37 --- /dev/null +++ b/.github/workflows/build-wheels-macos.yml @@ -0,0 +1,51 @@ +name: Build Macos Wheels + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + tags: + # NOTE: Binary build pipelines should only get triggered on release candidate builds + # Release candidate tags look like: v1.11.0-rc1 + - v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+ + workflow_dispatch: + +jobs: + generate-matrix: + uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main + with: + package-type: wheel + os: macos + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build: + needs: generate-matrix + strategy: + fail-fast: false + matrix: + include: + - repository: pytorch/vision + pre-script: packaging/pre_build_script.sh + post-script: packaging/post_build_script.sh + smoke-test-script: test/smoke_test.py + package-name: torchvision + name: ${{ matrix.repository }} + uses: pytorch/test-infra/.github/workflows/build_wheels_macos.yml@main + with: + repository: ${{ matrix.repository }} + ref: "" + test-infra-repository: pytorch/test-infra + test-infra-ref: main + build-matrix: ${{ needs.generate-matrix.outputs.matrix }} + pre-script: ${{ matrix.pre-script }} + post-script: ${{ matrix.post-script }} + package-name: ${{ matrix.package-name }} + runner-type: macos-12 + smoke-test-script: ${{ matrix.smoke-test-script }} + trigger-event: ${{ github.event_name }} + secrets: + AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} + AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000000..efec5a2c2b5 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,81 @@ +name: Docs + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + workflow_dispatch: + +jobs: + build: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + upload-artifact: docs + script: | + set -euo pipefail + + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + export GPU_ARCH_VERSION='' + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + # FIXME: not sure why we need this. `ldd torchvision/video_reader.so` shows that it + # already links against the one pulled from conda. However, at runtime it pulls from + # /lib64 + # Should we maybe always do this in `./.github/scripts/setup-env.sh` so that we don't + # have to pay attention in all other workflows? + export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" + + cd docs + + echo '::group::Install doc requirements' + pip install --progress-bar=off -r requirements.txt + echo '::endgroup::' + + echo '::group::Build HTML docs' + # The runner does not have sufficient memory to run with as many processes as their are + # cores (`-j auto`). Thus, we limit to a single process (`-j 1`) here. + sed -i -e 's/-j auto/-j 1/' Makefile + make html + echo '::endgroup::' + + mv build/html "${RUNNER_ARTIFACT_DIR}" + + upload-preview: + if: github.event_name == 'pull_request' + needs: [build] + runs-on: [self-hosted, linux.2xlarge] + steps: + - uses: actions/download-artifact@v3 + with: + name: docs + + - name: Upload docs preview + uses: seemethere/upload-artifact-s3@v5 + with: + retention-days: 14 + s3-bucket: doc-previews + if-no-files-found: error + path: html + s3-prefix: pytorch/vision/${{ github.event.pull_request.number }} + + # The upload below duplicates the upload from above, but to a different path. This is needed since we are in the + # process of changing the path, but want to keep the disruption to a minimum. + # See https://github.com/pytorch/test-infra/issues/3894 + # After a grace period, we can delete this again + - name: Upload docs preview + uses: seemethere/upload-artifact-s3@v5 + with: + retention-days: 14 + s3-bucket: doc-previews + if-no-files-found: error + path: html + s3-prefix: pytorch/pytorch/vision/${{ github.event.pull_request.number }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..ae5249a9219 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,98 @@ +name: Lint + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + workflow_dispatch: + +jobs: + python-source-and-configs: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + set -euo pipefail + + echo '::group::Setup environment' + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda create --name ci --quiet --yes python=3.8 pip + conda activate ci + echo '::endgroup::' + + echo '::group::Install lint tools' + pip install --progress-bar=off pre-commit + echo '::endgroup::' + + echo '::group::Lint Python source and configs' + set +e + pre-commit run --all-files + + if [ $? -ne 0 ]; then + git --no-pager diff + exit 1 + fi + echo '::endgroup::' + + c-source: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + set -euo pipefail + + echo '::group::Setup environment' + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + # clang-format needs some shared libraries that conflict with the system ones. Thus, we install them from conda + # and prepend the libraries to linker path to prioritize them. `ncurses=5` is only available on the conda-forge + # channel. Since we are not building or testing here, this is fine. + conda create --name ci --quiet --yes -c conda-forge python=3.8 ncurses=5 libgcc + conda activate ci + export LD_LIBRARY_PATH="${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}" + echo '::endgroup::' + + echo '::group::Install lint tools' + curl https://oss-clang-format.s3.us-east-2.amazonaws.com/linux64/clang-format-linux64 -o ./clang-format + chmod +x ./clang-format + echo '::endgroup::' + + echo '::group::Lint C source' + set +e + ./.circleci/unittest/linux/scripts/run-clang-format.py -r torchvision/csrc --clang-format-executable ./clang-format + + if [ $? -ne 0 ]; then + git --no-pager diff + exit 1 + fi + echo '::endgroup::' + + + python-types: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + set -euo pipefail + + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + export GPU_ARCH_VERSION='' + + ./.github/scripts/setup-env.sh + + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Install lint tools' + pip install --progress-bar=off mypy + echo '::endgroup::' + + echo '::group::Lint Python types' + mypy --install-types --non-interactive --config-file mypy.ini + echo '::endgroup::' diff --git a/.github/workflows/prototype-tests-linux-gpu.yml b/.github/workflows/prototype-tests-linux-gpu.yml new file mode 100644 index 00000000000..dee425054d5 --- /dev/null +++ b/.github/workflows/prototype-tests-linux-gpu.yml @@ -0,0 +1,54 @@ +name: Prototype tests on Linux + +on: + pull_request: + +jobs: + unittests-prototype: + strategy: + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + runner: ["linux.12xlarge"] + gpu-arch-type: ["cpu"] + include: + - python-version: "3.8" + runner: linux.g5.4xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "11.7" + fail-fast: false + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + runner: ${{ matrix.runner }} + gpu-arch-type: ${{ matrix.gpu-arch-type }} + gpu-arch-version: ${{ matrix.gpu-arch-version }} + timeout: 120 + script: | + set -euo pipefail + + export PYTHON_VERSION=${{ matrix.python-version }} + export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} + export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest pytest-mock pytest-cov + echo '::endgroup::' + + # We don't want to run the prototype datasets tests. Since the positional glob into `pytest`, i.e. + # `test/test_prototype*.py` takes the highest priority, neither `--ignore` nor `--ignore-glob` can help us here. + rm test/test_prototype_datasets*.py + pytest \ + -v --durations=25 \ + --cov=torchvision/prototype --cov-report=term-missing \ + --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" \ + test/test_prototype_*.py diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml new file mode 100644 index 00000000000..b9b01b7a55e --- /dev/null +++ b/.github/workflows/test-linux.yml @@ -0,0 +1,105 @@ +name: Tests on Linux + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + workflow_dispatch: + +jobs: + unittests: + strategy: + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + runner: ["linux.12xlarge"] + gpu-arch-type: ["cpu"] + include: + - python-version: 3.8 + runner: linux.g5.4xlarge.nvidia.gpu + gpu-arch-type: cuda + gpu-arch-version: "11.7" + fail-fast: false + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + runner: ${{ matrix.runner }} + gpu-arch-type: ${{ matrix.gpu-arch-type }} + gpu-arch-version: ${{ matrix.gpu-arch-version }} + timeout: 120 + script: | + set -euo pipefail + + export PYTHON_VERSION=${{ matrix.python-version }} + export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }} + export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }} + + ./.github/scripts/unittest.sh + + onnx: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + set -euo pipefail + + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + export GPU_ARCH_VERSION='' + + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Install ONNX' + pip install --progress-bar=off onnx onnxruntime + echo '::endgroup::' + + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest + echo '::endgroup::' + + echo '::group::Run ONNX tests' + pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_onnx.py + echo '::endgroup::' + + unittests-extended: + uses: pytorch/test-infra/.github/workflows/linux_job.yml@main + with: + repository: pytorch/vision + script: | + set -euo pipefail + + export PYTHON_VERSION=3.8 + export GPU_ARCH_TYPE=cpu + export GPU_ARCH_VERSION='' + + ./.github/scripts/setup-env.sh + + # Prepare conda + CONDA_PATH=$(which conda) + eval "$(${CONDA_PATH} shell.bash hook)" + conda activate ci + + echo '::group::Pre-download model weights' + pip install --progress-bar=off aiohttp aiofiles tqdm + python scripts/download_model_urls.py + echo '::endgroup::' + + echo '::group::Install testing utilities' + pip install --progress-bar=off pytest + echo '::endgroup::' + + echo '::group::Run extended unittests' + export PYTORCH_TEST_WITH_EXTENDED=1 + pytest --junit-xml="${RUNNER_TEST_RESULTS_DIR}/test-results.xml" -v --durations=25 test/test_extended_*.py + echo '::endgroup::' diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml new file mode 100644 index 00000000000..03e4b2db121 --- /dev/null +++ b/.github/workflows/test-macos.yml @@ -0,0 +1,40 @@ +name: Tests on macOS + +on: + pull_request: + push: + branches: + - nightly + - main + - release/* + workflow_dispatch: + +jobs: + unittests: + strategy: + matrix: + python-version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + runner: ["macos-12"] + include: + - python-version: "3.8" + runner: macos-m1-12 + fail-fast: false + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + with: + repository: pytorch/vision + # We need an increased timeout here, since the macos-12 runner is the free one from GH + # and needs roughly 2 hours to just run the test suite + timeout: 240 + runner: ${{ matrix.runner }} + script: | + set -euo pipefail + + export PYTHON_VERSION=${{ matrix.python-version }} + export GPU_ARCH_TYPE=cpu + export GPU_ARCH_VERSION='' + + ./.github/scripts/unittest.sh diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index c106fce66e6..40c97def8fc 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -15,6 +15,9 @@ jobs: matrix: python-version: - "3.8" + - "3.9" + - "3.10" + - "3.11" runner: ["windows.4xlarge"] gpu-arch-type: ["cpu"] include: From 7844bca4400f3540b4aff4fbbc3a60a0ba1705cc Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Thu, 20 Apr 2023 15:08:31 +0200 Subject: [PATCH 13/14] Revert "improve smoke test" This reverts commit 6b9db825784e519195d722c02cc9d73c05c9e979. --- test/smoke_test.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/test/smoke_test.py b/test/smoke_test.py index 649e097e9c8..1f1364512ee 100644 --- a/test/smoke_test.py +++ b/test/smoke_test.py @@ -1,11 +1,13 @@ """Run smoke tests""" +import os import sys from pathlib import Path import torch +import torch.nn as nn import torchvision -from torchvision.io import decode_jpeg, read_file, read_image +from torchvision.io import read_image from torchvision.models import resnet50, ResNet50_Weights SCRIPT_DIR = Path(__file__).parent @@ -27,13 +29,6 @@ def smoke_test_torchvision_read_decode() -> None: raise RuntimeError(f"Unexpected shape of img_png: {img_png.shape}") -def smoke_test_torchvision_decode_jpeg_cuda(): - img_jpg_data = read_file(str(SCRIPT_DIR / "assets" / "encode_jpeg" / "grace_hopper_517x606.jpg")) - img_jpg = decode_jpeg(img_jpg_data, device="cuda") - if img_jpg.ndim != 3 or img_jpg.numel() < 100: - raise RuntimeError(f"Unexpected shape of img_jpg: {img_jpg.shape}") - - def smoke_test_compile() -> None: try: model = resnet50().cuda() @@ -82,7 +77,6 @@ def main() -> None: smoke_test_torchvision_read_decode() smoke_test_torchvision_resnet50_classify() if torch.cuda.is_available(): - smoke_test_torchvision_decode_jpeg_cuda() smoke_test_torchvision_resnet50_classify("cuda") smoke_test_compile() From c12e4f7e7c4bdc7a74ff9673dd9ddb5da3bc2af6 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Mon, 1 May 2023 23:16:34 +0200 Subject: [PATCH 14/14] remove Windows GPU tests from CircleCI --- .circleci/config.yml | 72 ----------------------------------------- .circleci/config.yml.in | 51 ----------------------------- .circleci/regenerate.py | 31 ------------------ 3 files changed, 154 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea5500723be..a37820bfcf8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -433,53 +433,6 @@ jobs: docker push ${image_name}:${CIRCLE_WORKFLOW_ID} docker push ${image_name}:latest - unittest_windows_gpu: - <<: *binary_common - executor: - name: windows-gpu - environment: - CUDA_VERSION: "11.7" - PYTHON_VERSION: << parameters.python_version >> - steps: - - checkout - - designate_upload_channel - - run: - name: Generate cache key - # This will refresh cache on Sundays, nightly build should generate new cache. - command: echo "$(date +"%Y-%U")" > .circleci-weekly - - restore_cache: - - keys: - - env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - - run: - name: Setup - command: .circleci/unittest/windows/scripts/setup_env.sh - - save_cache: - - key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - - paths: - - conda - - env - - run: - name: Install CUDA - command: packaging/windows/internal/cuda_install.bat - - run: - name: Update CUDA driver - command: packaging/windows/internal/driver_update.bat - - run: - name: Install torchvision - command: .circleci/unittest/windows/scripts/install.sh - - run: - name: Run tests - command: .circleci/unittest/windows/scripts/run_test.sh - - run: - name: Post process - command: .circleci/unittest/windows/scripts/post_process.sh - - store_test_results: - path: test-results - cmake_linux_cpu: <<: *binary_common docker: @@ -853,31 +806,6 @@ workflows: build_environment: binary-libtorchvision_ops-android name: binary_libtorchvision_ops_android - unittest: - jobs: - - unittest_windows_gpu: - cu_version: cu117 - name: unittest_windows_gpu_py3.8 - python_version: '3.8' - - unittest_windows_gpu: - cu_version: cu117 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.9 - python_version: '3.9' - - unittest_windows_gpu: - cu_version: cu117 - filters: - branches: - only: - - main - - nightly - name: unittest_windows_gpu_py3.10 - python_version: '3.10' - cmake: jobs: - cmake_linux_cpu: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 0a6679938a9..d7ccd400c96 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -433,53 +433,6 @@ jobs: docker push ${image_name}:${CIRCLE_WORKFLOW_ID} docker push ${image_name}:latest - unittest_windows_gpu: - <<: *binary_common - executor: - name: windows-gpu - environment: - CUDA_VERSION: "11.7" - PYTHON_VERSION: << parameters.python_version >> - steps: - - checkout - - designate_upload_channel - - run: - name: Generate cache key - # This will refresh cache on Sundays, nightly build should generate new cache. - command: echo "$(date +"%Y-%U")" > .circleci-weekly - - restore_cache: - {% raw %} - keys: - - env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - {% endraw %} - - run: - name: Setup - command: .circleci/unittest/windows/scripts/setup_env.sh - - save_cache: - {% raw %} - key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }} - {% endraw %} - paths: - - conda - - env - - run: - name: Install CUDA - command: packaging/windows/internal/cuda_install.bat - - run: - name: Update CUDA driver - command: packaging/windows/internal/driver_update.bat - - run: - name: Install torchvision - command: .circleci/unittest/windows/scripts/install.sh - - run: - name: Run tests - command: .circleci/unittest/windows/scripts/run_test.sh - - run: - name: Post process - command: .circleci/unittest/windows/scripts/post_process.sh - - store_test_results: - path: test-results - cmake_linux_cpu: <<: *binary_common docker: @@ -575,10 +528,6 @@ workflows: {{ ios_workflows() }} {{ android_workflows() }} - unittest: - jobs: - {{ unittest_workflows() }} - cmake: jobs: {{ cmake_workflows() }} diff --git a/.circleci/regenerate.py b/.circleci/regenerate.py index 6e69dde4833..8db3637020f 100755 --- a/.circleci/regenerate.py +++ b/.circleci/regenerate.py @@ -217,36 +217,6 @@ def indent(indentation, data_list): return ("\n" + " " * indentation).join(yaml.dump(data_list, default_flow_style=False).splitlines()) -def unittest_workflows(indentation=6): - jobs = [] - for os_type in ["windows"]: - for device_type in ["gpu"]: - if os_type == "macos" and device_type == "gpu": - continue - - for i, python_version in enumerate(PYTHON_VERSIONS): - - # Turn off unit tests for 3.11, unit test are not setup properly - if python_version == "3.11": - continue - - job = { - "name": f"unittest_{os_type}_{device_type}_py{python_version}", - "python_version": python_version, - } - - if device_type == "gpu": - if python_version != "3.8": - job["filters"] = gen_filter_branch_tree("main", "nightly") - job["cu_version"] = "cu117" - else: - job["cu_version"] = "cpu" - - jobs.append({f"unittest_{os_type}_{device_type}": job}) - - return indent(indentation, jobs) - - def cmake_workflows(indentation=6): jobs = [] python_version = "3.8" @@ -331,7 +301,6 @@ def android_workflows(indentation=6, nightly=False): f.write( env.get_template("config.yml.in").render( build_workflows=build_workflows, - unittest_workflows=unittest_workflows, cmake_workflows=cmake_workflows, ios_workflows=ios_workflows, android_workflows=android_workflows,