Skip to content

[ROCm] replace ROCmLoops.cuh with hipified CUDALoops.cuh - #120101

Closed
jeffdaily wants to merge 3 commits into
pytorch:mainfrom
ROCm:rocm_hiploops
Closed

jeffdaily wants to merge 3 commits into
pytorch:mainfrom
ROCm:rocm_hiploops

Conversation

@jeffdaily

@jeffdaily jeffdaily commented Feb 16, 2024 •

Copy link
Copy Markdown
Collaborator

The intent of this change was to minimize code differences between CUDA and ROCm while maintaining or improving performance.

Verified new performance using pytorch/benchmarks/operator_benchmark.

python -u -m pt.unary_test --tag-filter all --device cuda
python -u -m pt.binary_test --tag-filter all --device cuda

On MI200 this improved performance on average 3%.

cc @sunway513 @jithunnair-amd @pruthvistony @ROCmSupport @dllehr-amd @jataylo @hongxiayang

@pytorch-bot

pytorch-bot Bot commented Feb 16, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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 0c9ce4f with merge base faad8ec (image):

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

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@pytorch-bot pytorch-bot Bot added ciflow/rocm module: rocm AMD GPU support for Pytorch labels Feb 16, 2024
@jeffdaily jeffdaily added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 21, 2024
@jeffdaily
jeffdaily marked this pull request as ready for review February 21, 2024 23:16

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Code cleanup 🎉
Thanks!

@albanD albanD added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 22, 2024
@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@pytorchbot rebase

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Successfully rebased rocm_hiploops onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout rocm_hiploops && git pull --rebase)

Comment thread aten/src/ATen/native/cuda/Loops.cuh Resolved
@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@jeffdaily

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

GZGavinZhao added a commit to GZGavinZhao/pytorch that referenced this pull request Jan 20, 2026
The HasSameArgTypes test references
`at::native::modern::detail::has_same_arg_types`, which was defined in
`aten/src/ATen/native/cuda/ROCmLoops.cuh`. This file was deleted in c11bd72
([ROCm] replace ROCmLoops.cuh with hipified CUDALoops.cuh pytorch#120101) when ROCm
switched to using the hipified version of `CUDALoops.cuh` instead.

Removing this test since it's a legacy compile-time check for a code
path that no longer exists.
GZGavinZhao added a commit to GZGavinZhao/pytorch that referenced this pull request Jan 20, 2026
The HasSameArgTypes test references
`at::native::modern::detail::has_same_arg_types`, which was defined in
`aten/src/ATen/native/cuda/ROCmLoops.cuh`. This file was deleted in c11bd72
([ROCm] replace ROCmLoops.cuh with hipified CUDALoops.cuh pytorch#120101) when ROCm
switched to using the hipified version of `CUDALoops.cuh` instead.

Removing this test since it's a legacy compile-time check for a code
path that no longer exists.
GZGavinZhao added a commit to GZGavinZhao/pytorch that referenced this pull request Jan 21, 2026
The HasSameArgTypes test references
`at::native::modern::detail::has_same_arg_types`, which was defined in
`aten/src/ATen/native/cuda/ROCmLoops.cuh`. This file was deleted in c11bd72
([ROCm] replace ROCmLoops.cuh with hipified CUDALoops.cuh pytorch#120101) when ROCm
switched to using the hipified version of `CUDALoops.cuh` instead.

Removing this test since it's a legacy compile-time check for a code
path that no longer exists.
pytorchmergebot pushed a commit that referenced this pull request Jan 22, 2026
…#172799)

The HasSameArgTypes test references `at::native::modern::detail::has_same_arg_types`, which was defined in `aten/src/ATen/native/cuda/ROCmLoops.cuh`. This file was deleted in c11bd72 (#120101) when ROCm switched to using the hipified version of `CUDALoops.cuh` instead.

My understanding is that this test should be removed since it's a legacy compile-time check for a code path that no longer exists.

Causes failure in #172775 in [this run](https://github.com/pytorch/pytorch/actions/runs/21153824053/job/60835278003?pr=172775).

Pull Request resolved: #172799
Approved by: https://github.com/m-gallus, https://github.com/jeffdaily
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: rocm AMD GPU support for Pytorch open source topic: not user facing topic category 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.

5 participants