Skip to content

ci(pytorch): add optional PyTorch git origin override to wheel builds - #6782

Merged
ethanwee1 merged 1 commit into
mainfrom
users/ethanwee/pytorch-gitrepo-origin
Aug 4, 2026
Merged

ci(pytorch): add optional PyTorch git origin override to wheel builds#6782
ethanwee1 merged 1 commit into
mainfrom
users/ethanwee/pytorch-gitrepo-origin

Conversation

@ethanwee1

@ethanwee1 ethanwee1 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

ISSUE ID : #6735

Summary

Add an optional pytorch_gitrepo_origin workflow input to the portable Linux and Windows PyTorch wheel build workflows so CI can checkout PyTorch from a fork URL (for pre-merge validation) while defaulting to ROCm/pytorch when unset.

Changes

  • multi_arch_build_portable_linux_pytorch_wheels.yml: new pytorch_gitrepo_origin input; pass through to pytorch_torch_repo.py checkout --gitrepo-origin.
  • multi_arch_build_windows_pytorch_wheels.yml: same input and wiring for the Windows wheel pipeline.

Testing

  • Default behavior unchanged when pytorch_gitrepo_origin is empty (still uses https://github.com/ROCm/pytorch.git).
  • Used to validate upstream PyTorch packaging fixes against TheRock Windows wheel builds before merge.

Add an optional `pytorch_gitrepo_origin` input to the multi-arch PyTorch
wheel build workflows (Linux and Windows, kept in sync). When set, the
stable checkout uses it as the `--gitrepo-origin` (for example, a fork URL
for pre-merge testing); it defaults to https://github.com/ROCm/pytorch.git
so existing behavior is unchanged.
@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 therock-pr-bot Bot added the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 22, 2026
@therock-pr-bot

therock-pr-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Comment on lines +244 to +249
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}" \

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 have a slight preference for this style of providing workflow inputs and default values where you load the input into an environment variable and provide a default if the input is empty:

env:
AWS_SHARED_CREDENTIALS_FILE: /home/awsconfig/credentials.ini
ARTIFACT_RUN_ID: "${{ inputs.artifact_run_id != '' && inputs.artifact_run_id || github.run_id }}"

For the approach I linked:

  • multiple steps throughout the workflow can use the value like ${{ env.ARTIFACT_RUN_ID }}
  • The default close to where the input is

For the approach currently on this PR:

- ccache
default: sccache

run-name: Build Multi-Arch Windows PyTorch Wheels (${{ inputs.release_type }}, ${{ inputs.python_version }}, ${{ inputs.pytorch_git_ref }})

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.

We could also include the gitrepo_origin in the run-name if one is provided, but I think just the ref should be sufficient. What do you think? Would you want it included in the run name? We might be short on character count since repository URLs are pretty long...

If we did make that sort of change, we'd want a multiline string so optional values can be checked, like this:

run-name: >-
Multi-Arch Release (${{ inputs.release_type }})
| Linux: ${{ inputs.linux_amdgpu_families || 'none' }}
| Windows: ${{ inputs.windows_amdgpu_families || 'none' }}

@ethanwee1
ethanwee1 marked this pull request as ready for review July 29, 2026 16:27
@therock-pr-bot therock-pr-bot Bot removed the Not ready to Review PR has unresolved policy failures — reviews blocked label Jul 30, 2026
@ethanwee1

Copy link
Copy Markdown
Contributor Author

All therock-pr-bot checks green (approved). Expanded PR description with summary/changes/testing. Ready for maintainer merge.

@ethanwee1
ethanwee1 merged commit 9e1ae25 into main Aug 4, 2026
47 of 57 checks passed
@ethanwee1
ethanwee1 deleted the users/ethanwee/pytorch-gitrepo-origin branch August 4, 2026 15:14
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants