Skip to content

Patch torch wheel naming#438

Closed
puneetmatharu wants to merge 1 commit intoARM-software:mainfrom
puneetmatharu:patch-torch-wheel-naming
Closed

Patch torch wheel naming#438
puneetmatharu wants to merge 1 commit intoARM-software:mainfrom
puneetmatharu:patch-torch-wheel-naming

Conversation

@puneetmatharu
Copy link
Copy Markdown
Contributor

@puneetmatharu puneetmatharu commented Feb 10, 2026

Previously we got the date of the last patch in the PyTorch repo (and thus the version number for the torch wheel) from the date of the last commit in the repo. This worked fine when we left applied patches unstaged. However, after we updated apply-github-patch to actually make commits from each patch, we can't rely on this logic anymore. I've updated the implementation to rely on the date of the first commit on that branch (since we do a shallow clone of the repo) which will match the commit we did a shallow clone on.

I've also updated CHANGELOG.md accordingly.

Important

This PR is superseded by #439. Only one of these two PRs should be merged in.

# pytorch/.ci/aarch64_linux/aarch64_wheel_ci_build.py for this logic.
build_date=$(cd "$PYTORCH_LOCAL_DIR" && git log --pretty=format:%cs -1 | tr -d '-')
# NOTE: This relies on the fact that we only ever perform a shallow clone of the
# PyTorch repo so the first commit is the latest commit on the branch we clone,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This fix is fine for a docker build, but if you're using TS as a local dev environment, you're at risk of some unexpected version suffixes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's a tricky one! Perhaps we could cheat and override the date when we apply the patches instead?

Copy link
Copy Markdown
Contributor Author

@puneetmatharu puneetmatharu Feb 10, 2026

Choose a reason for hiding this comment

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

I think we need to consider moving these hash values into a separate e.g. versions.sh and source that file in any shell script that needs it. It's better than forcing scripts to pass values between each other

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See optional replacement PR here. Requires more changes but handles things in a cleaner way. Have been meaning to make this change for a while...

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants