8000 [reland][ROCm] remove caffe2 from hipify by jeffdaily · Pull Request #151845 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[reland][ROCm] remove caffe2 from hipify #151845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

jeffdaily
Copy link
Collaborator
@jeffdaily jeffdaily commented Apr 21, 2025

@jeffdaily jeffdaily added module: rocm AMD GPU support for Pytorch release notes: rocm mandatorylabel skip-pr-sanity-checks ciflow/rocm Trigger "default" config CI on ROCm ciflow/inductor-rocm Trigger "inductor" config CI on ROCm labels Apr 21, 2025
Copy link
pytorch-bot bot commented Apr 21, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/151845

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (10 Unrelated Failures)

As of commit 9cd9145 with merge base 4f425a0 (image):

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Copy link
Collaborator
@albanD albanD left a comment

Choose a reason for hiding this comment

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

This is a bit hard to review.
Can you share the codemod commands that were used to generate the diff?

@@ -1 +1 @@
__version__ = '1.0.0'
__version__ = '2.0.0'
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's the impact of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The version has never been updated even as we added new cuda-to-hip mappings. The change is needed now because we're making BC-breaking changes to torch's hipify. We have a related project hipify_torch that C++ projects can use --- it was an attempt years ago to make hipify into a standalone tool that could be a torch thirdparty submodule but we decided it would have negatively impacted developer experience for torch by making it a submodule. So we have both the hipify that's inside torch and the hipify_torch c++ cmake helper project. The hipify_torch project might query the torch.utils.hipify.version so it can conditionally perform the corresponding hipify steps, v1 or v2.

@jeffdaily
Copy link
Collaborator Author
jeffdaily commented Apr 25, 2025

This is a bit hard to review. Can you share the codemod commands that were used to generate the diff?

Same as the last PR, we used a script to rewrite the cuda to hip mappings file. New script is https://gist.github.com/jeffdaily/d0497b33135fb5e476e150e7aaea62c6 .

It's the biggest diff of this PR, but it's automated. The important part is that we dropped the caffe2-specific mappings.

@jeffdaily jeffdaily marked this pull request as ready for review April 26, 2025 00:55
@soulitzer soulitzer added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Apr 28, 2025
@jeffdaily jeffdaily requested a review from malfet May 5, 2025 16:07
jithunnair-amd pushed a commit to ROCm/hipify_torch that referenced this pull request May 6, 2025
These changes correspond to
pytorch/pytorch#151845 (and syncs changes from
pytorch's hipify as part of this PR). torch's hipify version 2
significantly simplifies the the cuda to hip mappings, including a
BC-breaking change of no longer using caffe2 mappings and getting rid of
the Masquerading files. In order to ease the transition, hipify_torch
will contain both versions of the mappings. An attempt is made to check
which version of torch is installed and use the right mappings,
otherwise the v1 mappings are used unless the caller specifies --v2.
@pytorch-bot pytorch-bot bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label May 8, 2025
@facebook-github-bot
Copy link
Contributor

@xw285cornell has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 11, 2025
@jataylo jataylo added the ciflow/inductor-perf-test-nightly-rocm Trigger inductor perf tests on ROCm label May 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-no-td Do not run TD on this PR ciflow/inductor ciflow/inductor-perf-test-nightly-rocm Trigger inductor perf tests on ROCm ciflow/inductor-rocm Trigger "inductor" config CI on ROCm ciflow/rocm Trigger "default" config CI on ROCm ciflow/trunk Trigger trunk jobs on your pull request module: inductor module: rocm AMD GPU support for Pytorch oncall: distributed Add this issue/PR to distributed oncall triage queue open source release notes: rocm mandatorylabel skip-pr-sanity-checks triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0