| # @generated DO NOT EDIT MANUALLY | |
| # Template is at: .github/templates/linux_binary_build_workflow.yml.j2 | |
| # Generation script: .github/scripts/generate_ci_workflows.py | |
| name: linux-binary-manywheel | |
| on: | |
| push: | |
| # NOTE: Meta Employees can trigger new nightlies using: https://fburl.com/trigger_pytorch_nightly_build | |
| branches: | |
| - nightly | |
| 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]+ | |
| - 'ciflow/binaries/*' | |
| - 'ciflow/binaries_wheel/*' | |
| workflow_dispatch: | |
| env: | |
| # Needed for conda builds | |
| ALPINE_IMAGE: "308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine" | |
| ANACONDA_USER: pytorch | |
| AWS_DEFAULT_REGION: us-east-1 | |
| BINARY_ENV_FILE: /tmp/env | |
| BUILD_ENVIRONMENT: linux-binary-manywheel | |
| BUILDER_ROOT: /builder | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| PYTORCH_FINAL_PACKAGE_DIR: /artifacts | |
| PYTORCH_ROOT: /pytorch | |
| SHA1: ${{ github.event.pull_request.head.sha || github.sha }} | |
| SKIP_ALL_TESTS: 1 | |
| concurrency: | |
| group: linux-binary-manywheel-${{ github.event.pull_request.number || github.ref_name }}-${{ github.ref_type == 'branch' && github.sha }}-${{ github.event_name == 'workflow_dispatch' }} | |
| cancel-in-progress: true | |
| jobs: | |
| manywheel-py3_7-cpu-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cpu | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cpu-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cpu-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cpu | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cpu-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cpu-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-cuda11_6-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_6-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_6-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_6-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_6-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_6 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-cuda11_7-with-pypi-cudnn-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-runtime-cu11; platform_system == 'Linux' | nvidia-cudnn-cu11==8.5.0.96; platform_system == 'Linux' | nvidia-cublas-cu11==11.10.3.66; platform_system == 'Linux' | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_7-with-pypi-cudnn-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_7-with-pypi-cudnn-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_7-with-pypi-cudnn-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_7-with-pypi-cudnn-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7-with-pypi-cudnn | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-cuda11_7-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_7-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_7-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_7-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_7-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_7 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-cuda11_8-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_8-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_8-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-cuda11_8-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-cuda11_8-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-cuda11_8 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-rocm5_2-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-rocm5_2 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-rocm5_2-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-rocm5_2-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.7" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_7-rocm5_2 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.2 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_7-rocm5_2-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-rocm5_2-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-rocm5_2 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_7-rocm5_3-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-rocm5_3 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_7-rocm5_3-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-rocm5_3-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.7" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_7-rocm5_3 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.3 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_7-rocm5_3-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_7-rocm5_3-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.7" | |
| build_name: manywheel-py3_7-rocm5_3 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-cpu-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cpu | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cpu-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cpu-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cpu | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cpu-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cpu-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-cuda11_6-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_6-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_6-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_6-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_6-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_6 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-cuda11_7-with-pypi-cudnn-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-runtime-cu11; platform_system == 'Linux' | nvidia-cudnn-cu11==8.5.0.96; platform_system == 'Linux' | nvidia-cublas-cu11==11.10.3.66; platform_system == 'Linux' | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_7-with-pypi-cudnn-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_7-with-pypi-cudnn-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_7-with-pypi-cudnn-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_7-with-pypi-cudnn-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7-with-pypi-cudnn | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-cuda11_7-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_7-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_7-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_7-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_7-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_7 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-cuda11_8-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_8-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_8-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-cuda11_8-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-cuda11_8-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-cuda11_8 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-rocm5_2-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-rocm5_2 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-rocm5_2-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-rocm5_2-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.8" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_8-rocm5_2 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.2 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_8-rocm5_2-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-rocm5_2-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-rocm5_2 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_8-rocm5_3-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-rocm5_3 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_8-rocm5_3-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-rocm5_3-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.8" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_8-rocm5_3 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.3 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_8-rocm5_3-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_8-rocm5_3-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.8" | |
| build_name: manywheel-py3_8-rocm5_3 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-cpu-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cpu | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cpu-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cpu-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cpu | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cpu-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cpu-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-cuda11_6-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_6-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_6-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_6-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_6-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_6 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-cuda11_7-with-pypi-cudnn-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-runtime-cu11; platform_system == 'Linux' | nvidia-cudnn-cu11==8.5.0.96; platform_system == 'Linux' | nvidia-cublas-cu11==11.10.3.66; platform_system == 'Linux' | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_7-with-pypi-cudnn-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_7-with-pypi-cudnn-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_7-with-pypi-cudnn-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_7-with-pypi-cudnn-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7-with-pypi-cudnn | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-cuda11_7-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_7-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_7-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_7-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_7-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_7 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-cuda11_8-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_8-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_8-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-cuda11_8-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-cuda11_8-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-cuda11_8 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-rocm5_2-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-rocm5_2 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-rocm5_2-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-rocm5_2-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.9" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_9-rocm5_2 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.2 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_9-rocm5_2-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-rocm5_2-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-rocm5_2 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_9-rocm5_3-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-rocm5_3 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_9-rocm5_3-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-rocm5_3-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.9" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_9-rocm5_3 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.3 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_9-rocm5_3-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_9-rocm5_3-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.9" | |
| build_name: manywheel-py3_9-rocm5_3 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-cpu-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cpu | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cpu-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cpu-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cpu | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cpu-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cpu-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-cuda11_6-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_6-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_6-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_6-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_6-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_6 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-cuda11_7-with-pypi-cudnn-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-runtime-cu11; platform_system == 'Linux' | nvidia-cudnn-cu11==8.5.0.96; platform_system == 'Linux' | nvidia-cublas-cu11==11.10.3.66; platform_system == 'Linux' | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_7-with-pypi-cudnn-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_7-with-pypi-cudnn-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_7-with-pypi-cudnn-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_7-with-pypi-cudnn-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7-with-pypi-cudnn | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-cuda11_7-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_7-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_7-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_7-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_7-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_7 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-cuda11_8-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_8-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_8-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-cuda11_8-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-cuda11_8-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-cuda11_8 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-rocm5_2-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-rocm5_2 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-rocm5_2-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-rocm5_2-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.10" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_10-rocm5_2 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.2 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_10-rocm5_2-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-rocm5_2-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.2 | |
| GPU_ARCH_VERSION: 5.2 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.2 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-rocm5_2 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_10-rocm5_3-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-rocm5_3 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_10-rocm5_3-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-rocm5_3-build | |
| runs-on: linux.rocm.gpu | |
| timeout-minutes: 240 | |
| env: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| SKIP_ALL_TESTS: 1 | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.10" | |
| steps: | |
| - name: Clean workspace | |
| run: | | |
| rm -rf "${GITHUB_WORKSPACE}" | |
| mkdir "${GITHUB_WORKSPACE}" | |
| - name: Set DOCKER_HOST | |
| run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/docker.sock" >> "${GITHUB_ENV}" | |
| - name: Runner health check system info | |
| if: always() | |
| run: | | |
| cat /etc/os-release || true | |
| cat /etc/apt/sources.list.d/rocm.list || true | |
| cat /opt/rocm/.info/version || true | |
| whoami | |
| - name: Runner health check rocm-smi | |
| if: always() | |
| run: | | |
| rocm-smi | |
| - name: Runner health check rocminfo | |
| if: always() | |
| run: | | |
| rocminfo | |
| - name: Runner health check GPU count | |
| if: always() | |
| run: | | |
| ngpu=$(rocminfo | grep -c -E 'Name:.*\sgfx') | |
| if [[ "x$ngpu" != "x2" && "x$ngpu" != "x4" ]]; then | |
| if [[ $ngpu -eq 0 ]]; then | |
| echo "Error: Failed to detect any GPUs on the runner" | |
| else | |
| echo "Error: Detected $ngpu GPUs on the runner, when only 2 or 4 were expected" | |
| fi | |
| echo "Please file an issue on pytorch/pytorch reporting the faulty runner. Include a link to the runner logs so the runner can be identified" | |
| exit 1 | |
| fi | |
| - name: Runner health check disconnect on failure | |
| if: ${{ failure() }} | |
| run: | | |
| killall runsvc.sh | |
| - name: Preserve github env variables for use in docker | |
| run: | | |
| env | grep '^GITHUB' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| env | grep '^CI' >> "/tmp/github_env_${GITHUB_RUN_ID}" | |
| - uses: actions/download-artifact@v3 | |
| name: Download Build Artifacts | |
| with: | |
| name: manywheel-py3_10-rocm5_3 | |
| path: "${{ runner.temp }}/artifacts/" | |
| - name: Checkout PyTorch | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| submodules: recursive | |
| path: pytorch | |
| quiet-checkout: true | |
| - name: Clean PyTorch checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: pytorch | |
| - name: Checkout pytorch/builder | |
| uses: malfet/checkout@silent-checkout | |
| with: | |
| ref: main | |
| submodules: recursive | |
| repository: pytorch/builder | |
| path: builder | |
| quiet-checkout: true | |
| - name: Clean pytorch/builder checkout | |
| run: | | |
| # Remove any artifacts from the previous checkouts | |
| git clean -fxd | |
| working-directory: builder | |
| - name: ROCm set GPU_FLAG | |
| run: | | |
| echo "GPU_FLAG=--device=/dev/mem --device=/dev/kfd --device=/dev/dri --group-add video --group-add daemon" >> "${GITHUB_ENV}" | |
| - name: Pull Docker image | |
| uses: pytorch/test-infra/.github/actions/pull-docker-image@main | |
| with: | |
| docker-image: pytorch/manylinux-builder:rocm5.3 | |
| - name: Test Pytorch binary | |
| uses: ./pytorch/.github/actions/test-pytorch-binary | |
| - name: Kill containers, clean up images | |
| if: always() | |
| run: | | |
| # ignore expansion of "docker ps -q" since it could be empty | |
| # shellcheck disable=SC2046 | |
| docker stop $(docker ps -q) || true | |
| # Prune all of the docker images | |
| docker system prune -af | |
| manywheel-py3_10-rocm5_3-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_10-rocm5_3-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: rocm5.3 | |
| GPU_ARCH_VERSION: 5.3 | |
| GPU_ARCH_TYPE: rocm | |
| DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.3 | |
| DESIRED_PYTHON: "3.10" | |
| build_name: manywheel-py3_10-rocm5_3 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_11-cpu-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cpu | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cpu-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cpu-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cpu | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cpu-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cpu-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cpu | |
| GPU_ARCH_TYPE: cpu | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cpu | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_11-cuda11_6-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_6-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_6-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_6 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_6-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_6-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu116 | |
| GPU_ARCH_VERSION: 11.6 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.6 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_6 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_11-cuda11_7-with-pypi-cudnn-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| PYTORCH_EXTRA_INSTALL_REQUIREMENTS: nvidia-cuda-runtime-cu11; platform_system == 'Linux' | nvidia-cudnn-cu11==8.5.0.96; platform_system == 'Linux' | nvidia-cublas-cu11==11.10.3.66; platform_system == 'Linux' | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_7-with-pypi-cudnn-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_7-with-pypi-cudnn-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7-with-pypi-cudnn | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_7-with-pypi-cudnn-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_7-with-pypi-cudnn-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7-with-pypi-cudnn | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_11-cuda11_7-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_7-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_7-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_7-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_7-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu117 | |
| GPU_ARCH_VERSION: 11.7 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.7 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_7 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml | |
| manywheel-py3_11-cuda11_8-build: | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| uses: ./.github/workflows/_binary-build-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_8-test: # Testing | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_8-build | |
| uses: ./.github/workflows/_binary-test-linux.yml | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_8 | |
| build_environment: linux-binary-manywheel | |
| runs_on: linux.4xlarge.nvidia.gpu | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| manywheel-py3_11-cuda11_8-upload: # Uploading | |
| if: ${{ github.repository_owner == 'pytorch' }} | |
| needs: manywheel-py3_11-cuda11_8-test | |
| with: | |
| PYTORCH_ROOT: /pytorch | |
| BUILDER_ROOT: /builder | |
| PACKAGE_TYPE: manywheel | |
| # TODO: This is a legacy variable that we eventually want to get rid of in | |
| # favor of GPU_ARCH_VERSION | |
| DESIRED_CUDA: cu118 | |
| GPU_ARCH_VERSION: 11.8 | |
| GPU_ARCH_TYPE: cuda | |
| DOCKER_IMAGE: pytorch/manylinux-builder:cuda11.8 | |
| DESIRED_PYTHON: "3.11" | |
| build_name: manywheel-py3_11-cuda11_8 | |
| secrets: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| aws-access-key-id: ${{ secrets.AWS_PYTORCH_UPLOADER_ACCESS_KEY_ID }} | |
| aws-pytorch-uploader-secret-access-key: ${{ secrets.AWS_PYTORCH_UPLOADER_SECRET_ACCESS_KEY }} | |
| conda-pytorchbot-token: ${{ secrets.CONDA_PYTORCHBOT_TOKEN }} | |
| uses: ./.github/workflows/_binary-upload.yml |