Skip to content

ci: clarify PyTorch build dispatch inputs and default the ROCm index#6791

Open
ethanwee1 wants to merge 1 commit into
mainfrom
users/ethanwee/clarify-pytorch-build-inputs
Open

ci: clarify PyTorch build dispatch inputs and default the ROCm index#6791
ethanwee1 wants to merge 1 commit into
mainfrom
users/ethanwee/clarify-pytorch-build-inputs

Conversation

@ethanwee1

Copy link
Copy Markdown
Contributor

Closes #6790

What

Manual dispatches of the multi-arch PyTorch build workflows commonly fail in two avoidable ways. This PR makes the inputs self-explanatory and gives the Linux path a sane default.

  1. repository/ref mistaken for the PyTorch source. They select which TheRock checkout the build scripts come from. When set to rocm/pytorch, the outer checkout grabs the wrong repo and every step fails with build_tools/github_actions/*.py: No such file or directory (shown as the misleading "Executing the custom container implementation failed").
  2. No ROCm package source. Leaving both rocm_package_index_url and rocm_package_find_links_url blank makes pip install rocm[libraries,devel]==<nightly> resolve against PyPI, where rocm is only a placeholder 0.1.0, so the pinned nightly can't be found.

Changes

  • Clarify repository/ref descriptions on both build workflows: they refer to TheRock (build scripts/workflow), not the PyTorch source; use pytorch_git_ref to pick the PyTorch branch.
  • Clarify the ROCm index vs. find-links descriptions (use one or the other).
  • Default rocm_package_index_url on the Linux portable workflow_dispatch path to the nightly multi-arch index (https://rocm.nightlies.amd.com/whl-multi-arch) so a bare manual build works.
  • workflow_call defaults are intentionally left unchanged, so programmatic callers (release/CI wrappers, some of which pass find-links) are unaffected.

Windows keeps an empty ROCm-URL default (its packages are not served from the Linux multi-arch index), but its input descriptions get the same clarifications.

Test

  • pre-commit (incl. actionlint) passes on both workflow files.
  • Docs/config-only change to workflow_dispatch metadata; workflow_call behavior is unchanged.

Manual dispatches of the multi-arch PyTorch build workflows commonly
fail in two ways:

  - `repository`/`ref` are mistaken for the PyTorch source, so people
    point them at rocm/pytorch. The outer checkout then grabs the wrong
    repo and every TheRock build script is "No such file or directory".
  - `rocm_package_index_url`/`rocm_package_find_links_url` are left
    blank, so `rocm[libraries,devel]` resolves against PyPI (only a
    placeholder 0.1.0 exists) instead of the ROCm nightlies index.

Clarify the `repository`/`ref` and ROCm index/find-links input
descriptions (which repo, which URL, use one OR the other), and default
`rocm_package_index_url` on the Linux portable workflow_dispatch path to
the nightly multi-arch index so a bare manual build works. The
workflow_call defaults are left untouched so programmatic callers that
pass find-links are unaffected.
@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

✅ All Checks Passed — Ready for Review

Check Status Details
🌿 Branch Name ✅ Pass
📝 PR Title/Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass PR does not contain code files — Unit Test auto-passed
🔎 pre-commit ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled
🤖 therock-pr-bot ✅ Pass

🎉 All checks passed! This PR is ready for review.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

@therock-pr-bot

Copy link
Copy Markdown

🎉 All checks passed! This PR is ready for review.

@ethanwee1
ethanwee1 marked this pull request as ready for review July 22, 2026 21:53
@ethanwee1
ethanwee1 requested a review from ScottTodd July 22, 2026 21:53
Comment on lines 111 to +125
rocm_package_find_links_url:
description: URL for pip --find-links to install ROCm packages (flat page; use this OR rocm_package_index_url)
description: >-
URL for pip --find-links to install ROCm packages (flat page). Use
this OR rocm_package_index_url, not both. If you set this, clear
rocm_package_index_url (otherwise both get passed to pip).
type: string
default: ""
rocm_package_index_url:
description: URL for pip --index-url to install ROCm packages (PEP 503 index, e.g. repo.amd.com; use this OR rocm_package_find_links_url)
description: >-
URL for pip --index-url to install ROCm packages (PEP 503 index).
Defaults to the nightly multi-arch index; override to build against a
different ROCm channel or a specific build's index. Use this OR
rocm_package_find_links_url, not both.
type: string
default: ""
default: "https://rocm.nightlies.amd.com/whl-multi-arch"

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.

"If you set this, clear (some other variable)" doesn't work with inputs that have a default. If you set to empty string then github will revert back to the default.

See here for example:

# For workflow_dispatch, default to a single GPU family to limit CI load for most workflow runs.
# Note: empty string will be converted to the default by github, so we need an explicit "none".
linux_amdgpu_families:
description: 'Comma-separated list of Linux GPU families. "all" = all, "none" = skip platform.'
type: string
default: "gfx94x"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: TODO

Development

Successfully merging this pull request may close these issues.

PyTorch build workflows: clarify dispatch inputs and default the ROCm index

2 participants