diff --git a/.github/scripts/generate_binary_build_matrix.py b/.github/scripts/generate_binary_build_matrix.py index 54949ff27bb1bb7..c1a4b26d13ffa41 100644 --- a/.github/scripts/generate_binary_build_matrix.py +++ b/.github/scripts/generate_binary_build_matrix.py @@ -147,25 +147,45 @@ def generate_libtorch_matrix(os: str, abi_version: str, # ROCm builds without-deps failed even in ROCm runners; skip for now if gpu_arch_type == "rocm" and "without-deps" in libtorch_variant: continue - ret.append( - { - "gpu_arch_type": gpu_arch_type, - "gpu_arch_version": gpu_arch_version, - "desired_cuda": translate_desired_cuda( - gpu_arch_type, gpu_arch_version - ), - "libtorch_variant": libtorch_variant, - "libtorch_config": abi_version if os == "windows" else "", - "devtoolset": abi_version if os != "windows" else "", - "container_image": LIBTORCH_CONTAINER_IMAGES[ - (arch_version, abi_version) - ] if os != "windows" else "", - "package_type": "libtorch", - "build_name": f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-{abi_version}".replace( - ".", "_" - ), - } - ) + desired_cuda = translate_desired_cuda(gpu_arch_type, gpu_arch_version) + + if desired_cuda == "rocm5.1.1" and abi_version == PRE_CXX11_ABI: + ret.append( + { + "gpu_arch_type": gpu_arch_type, + "gpu_arch_version": gpu_arch_version, + "desired_cuda": desired_cuda, + "libtorch_variant": libtorch_variant, + "libtorch_config": abi_version if os == "windows" else "", + "devtoolset": abi_version if os != "windows" else "", + "container_image": ( + "pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5" + if os != "windows" else "" + ), + "package_type": "libtorch", + "build_name": f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-{abi_version}".replace( + ".", "_" + ), + } + ) + else: + ret.append( + { + "gpu_arch_type": gpu_arch_type, + "gpu_arch_version": gpu_arch_version, + "desired_cuda": desired_cuda, + "libtorch_variant": libtorch_variant, + "libtorch_config": abi_version if os == "windows" else "", + "devtoolset": abi_version if os != "windows" else "", + "container_image": LIBTORCH_CONTAINER_IMAGES[ + (arch_version, abi_version) + ] if os != "windows" else "", + "package_type": "libtorch", + "build_name": f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-{abi_version}".replace( + ".", "_" + ), + } + ) return ret @@ -205,6 +225,7 @@ def generate_wheels_matrix(os: str, if python_version == "3.11" and gpu_arch_type == "rocm": continue + desired_cuda = translate_desired_cuda(gpu_arch_type, gpu_arch_version) # special 11.7 wheels package without dependencies # dependency downloaded via pip install if arch_version == "11.7" and os == "linux": @@ -213,9 +234,7 @@ def generate_wheels_matrix(os: str, "python_version": python_version, "gpu_arch_type": gpu_arch_type, "gpu_arch_version": gpu_arch_version, - "desired_cuda": translate_desired_cuda( - gpu_arch_type, gpu_arch_version - ), + "desired_cuda": desired_cuda, "container_image": WHEEL_CONTAINER_IMAGES[arch_version], "package_type": package_type, "pytorch_extra_install_requirements": @@ -229,20 +248,32 @@ def generate_wheels_matrix(os: str, ), } ) - - ret.append( - { - "python_version": python_version, - "gpu_arch_type": gpu_arch_type, - "gpu_arch_version": gpu_arch_version, - "desired_cuda": translate_desired_cuda( - gpu_arch_type, gpu_arch_version - ), - "container_image": WHEEL_CONTAINER_IMAGES[arch_version], - "package_type": package_type, - "build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace( - ".", "_" - ), - } - ) + if desired_cuda == "rocm5.1.1": + ret.append( + { + "python_version": python_version, + "gpu_arch_type": gpu_arch_type, + "gpu_arch_version": gpu_arch_version, + "desired_cuda": desired_cuda, + "container_image": "pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5", + "package_type": package_type, + "build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace( + ".", "_" + ), + } + ) + else: + ret.append( + { + "python_version": python_version, + "gpu_arch_type": gpu_arch_type, + "gpu_arch_version": gpu_arch_version, + "desired_cuda": desired_cuda, + "container_image": WHEEL_CONTAINER_IMAGES[arch_version], + "package_type": package_type, + "build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace( + ".", "_" + ), + } + ) return ret diff --git a/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-nightly.yml b/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-nightly.yml index 58fd14dee66b561..620f36220398b73 100644 --- a/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-nightly.yml +++ b/.github/workflows/generated-linux-binary-libtorch-pre-cxx11-nightly.yml @@ -792,7 +792,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: shared-with-deps DESIRED_DEVTOOLSET: pre-cxx11 build_name: libtorch-rocm5_1_1-shared-with-deps-pre-cxx11 @@ -815,7 +815,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: shared-with-deps DESIRED_DEVTOOLSET: pre-cxx11 steps: @@ -889,7 +889,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -912,7 +912,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: shared-with-deps DESIRED_DEVTOOLSET: pre-cxx11 build_name: libtorch-rocm5_1_1-shared-with-deps-pre-cxx11 @@ -934,7 +934,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: static-with-deps DESIRED_DEVTOOLSET: pre-cxx11 build_name: libtorch-rocm5_1_1-static-with-deps-pre-cxx11 @@ -957,7 +957,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: static-with-deps DESIRED_DEVTOOLSET: pre-cxx11 steps: @@ -1031,7 +1031,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -1054,7 +1054,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 LIBTORCH_VARIANT: static-with-deps DESIRED_DEVTOOLSET: pre-cxx11 build_name: libtorch-rocm5_1_1-static-with-deps-pre-cxx11 diff --git a/.github/workflows/generated-linux-binary-manywheel-nightly.yml b/.github/workflows/generated-linux-binary-manywheel-nightly.yml index 928ad3e0ca13eaa..85bf2bd38b650ff 100644 --- a/.github/workflows/generated-linux-binary-manywheel-nightly.yml +++ b/.github/workflows/generated-linux-binary-manywheel-nightly.yml @@ -286,7 +286,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.7" build_name: manywheel-py3_7-rocm5_1_1 build_environment: linux-binary-manywheel @@ -308,7 +308,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.7" steps: - name: Clean workspace @@ -381,7 +381,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -404,7 +404,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.7" build_name: manywheel-py3_7-rocm5_1_1 secrets: @@ -802,7 +802,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.8" build_name: manywheel-py3_8-rocm5_1_1 build_environment: linux-binary-manywheel @@ -824,7 +824,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.8" steps: - name: Clean workspace @@ -897,7 +897,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -920,7 +920,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.8" build_name: manywheel-py3_8-rocm5_1_1 secrets: @@ -1318,7 +1318,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.9" build_name: manywheel-py3_9-rocm5_1_1 build_environment: linux-binary-manywheel @@ -1340,7 +1340,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.9" steps: - name: Clean workspace @@ -1413,7 +1413,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -1436,7 +1436,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.9" build_name: manywheel-py3_9-rocm5_1_1 secrets: @@ -1834,7 +1834,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.10" build_name: manywheel-py3_10-rocm5_1_1 build_environment: linux-binary-manywheel @@ -1856,7 +1856,7 @@ jobs: GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm SKIP_ALL_TESTS: 1 - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.10" steps: - name: Clean workspace @@ -1929,7 +1929,7 @@ jobs: - name: Pull Docker image uses: pytorch/test-infra/.github/actions/pull-docker-image@main with: - docker-image: pytorch/manylinux-builder:rocm5.1.1 + docker-image: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 - name: Test Pytorch binary uses: ./pytorch/.github/actions/test-pytorch-binary - name: Kill containers, clean up images @@ -1952,7 +1952,7 @@ jobs: DESIRED_CUDA: rocm5.1.1 GPU_ARCH_VERSION: 5.1.1 GPU_ARCH_TYPE: rocm - DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1 + DOCKER_IMAGE: pytorch/manylinux-builder:rocm5.1.1-cd2573d54f9bd9b8f32b4dd7f182923a846597d5 DESIRED_PYTHON: "3.10" build_name: manywheel-py3_10-rocm5_1_1 secrets: