-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Make torch/csrc/utils.h to be device-agnostic #152521
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/152521
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 1 New Failure, 1 Unrelated FailureAs of commit 2d843b5 with merge base 59a8aa1 ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@pytorchbot label "topic: not user facing" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a major difference between "no breakage" and "the impact is very small". We should be careful to aim for "no breakage" in general. And treat everything else as BC-breaking.
From the github search, I see no use outside of pytorch codebase or clones. So sounds good!
Thank you a lot. |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 1 checks: rocm / linux-focal-rocm-py3.10 / test (default, 2, 6, linux.rocm.gpu.2) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
Starting merge as part of PR stack under #152522 |
As the title stated. **Question:** I have carefully looked through all the .h files in Tensor.cpp and from my perspective this file does not make sense. Does anyone know what the background is for doing this? Pull Request resolved: #152522 Approved by: https://github.com/Skylion007, https://github.com/albanD, https://github.com/eqy ghstack dependencies: #152512, #152513, #152521
Stack from ghstack (oldest at bottom):
torch/csrc/utils.hshould be device-independent. Currently, it contains CUDA-related implementations, which indirectly causes the failure of ROCm testing (The reason is that the ROCm test environment shouldn`t expose HIP-related header files, which causes the JIT compilation to fail during testing)Therefore, move CUDA-related implementations to
torch/csrc/cuda/utils.h.Question:
This change may introduce BC-breack.
I searched for this function globally on github and I think the impact is very small.