Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes to this file could be moved to a separate PR. I'd also prefer to keep the Linux and Windows workflows in sync and not add inputs to only one or the other: https://github.com/ROCm/TheRock/blob/main/.github/workflows/multi_arch_build_windows_pytorch_wheels.yml

Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ on:
description: PyTorch ref to checkout. Typically "nightly" or "release/X.Y".
type: string
required: true
pytorch_gitrepo_origin:
description: >-
Optional PyTorch git origin override (for example, a fork URL for
pre-merge testing). Defaults to ROCm/pytorch for stable refs.
type: string
default: ""
rocm_version:
description: ROCm package version to install and build against (e.g. 7.10.0.dev0)
type: string
Expand Down Expand Up @@ -104,6 +110,12 @@ on:
description: PyTorch ref to checkout (for example, "release/2.12").
type: string
default: "release/2.12"
pytorch_gitrepo_origin:
description: >-
Optional PyTorch git origin override (for example, a fork URL for
pre-merge testing). Defaults to ROCm/pytorch for stable refs.
type: string
default: ""
rocm_version:
description: ROCm package version to install and build against (e.g. 7.10.0.dev0)
type: string
Expand Down Expand Up @@ -229,8 +241,12 @@ jobs:
- name: Checkout PyTorch source repos (stable)
if: ${{ inputs.pytorch_git_ref != 'nightly' }}
run: |
pytorch_origin="${{ inputs.pytorch_gitrepo_origin }}"
if [ -z "${pytorch_origin}" ]; then
pytorch_origin="https://github.com/ROCm/pytorch.git"
fi
./external-builds/pytorch/pytorch_torch_repo.py checkout \
--gitrepo-origin https://github.com/ROCm/pytorch.git \
--gitrepo-origin "${pytorch_origin}" \
--repo-hashtag ${{ inputs.pytorch_git_ref }} \
--no-commit-hipify
./external-builds/pytorch/pytorch_audio_repo.py checkout \
Expand Down
11 changes: 4 additions & 7 deletions build_tools/github_actions/configure_pytorch_release_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,10 @@
"release/2.10": {"gfx125X-dcgpu"},
# gfx125x supported for PyTorch 2.11 via https://github.com/ROCm/pytorch/pull/3346.
"release/2.11": {},
# gfx125x not yet upstreamed to pytorch/pytorch. Upstream expected
# 2026-06-26, but the ROCm 7.14 release is cut before that date.
# See https://github.com/ROCm/TheRock/issues/5833.
"release/2.12": {"gfx125X-dcgpu"},
# gfx125x not yet upstreamed to pytorch/pytorch.
# See https://github.com/ROCm/TheRock/issues/5833.
"nightly": {"gfx125X-dcgpu"},
# gfx125x supported for PyTorch 2.12 via https://github.com/ROCm/pytorch/pull/3421.
"release/2.12": {},
# gfx125x supported on upstream pytorch/pytorch nightly via pytorch#188597.
"nightly": {},
},
"windows": {},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,46 @@ def test_filters_exact_unsupported_family(self):
matrix_families = ";".join(row["amdgpu_families"] for row in matrix)
self.assertNotIn("gfx125X", matrix_families)
Comment on lines 94 to 106

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the existing tests were sufficient here. We don't need 40 lines of test code for a 2 line change just checking that config file has some values.


def test_release_2_12_includes_gfx125x(self):
matrix = m.generate_pytorch_matrix_for_release_type(
release_type="dev",
python_versions=["3.12"],
pytorch_git_refs=["release/2.12"],
amdgpu_families="gfx94X-dcgpu;gfx125X-dcgpu",
platform="linux",
)

self.assertEqual(
matrix,
[
{
"python_version": "3.12",
"pytorch_git_ref": "release/2.12",
"amdgpu_families": "gfx94X-dcgpu;gfx125X-dcgpu",
}
],
)

def test_nightly_includes_gfx125x(self):
matrix = m.generate_pytorch_matrix_for_release_type(
release_type="nightly",
python_versions=["3.12"],
pytorch_git_refs=["nightly"],
amdgpu_families="gfx94X-dcgpu;gfx125X-dcgpu",
platform="linux",
)

self.assertEqual(
matrix,
[
{
"python_version": "3.12",
"pytorch_git_ref": "nightly",
"amdgpu_families": "gfx94X-dcgpu;gfx125X-dcgpu",
}
],
)

def test_unknown_explicit_ref_keeps_families(self):
matrix = m.generate_pytorch_matrix_for_release_type(
release_type="dev",
Expand Down
Loading