-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Make CUDAFuture handle any kind of device type #57051
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
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit c147fa5 (more details on the Dr. CI page):
1 failure not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
@@ -34,13 +34,7 @@ def __init__(self, *, devices: Optional[List[Union[int, str, torch.device]]] = N | |||
""" |
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.
I assume docs for devices
arg will be added in follow PRs?
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.
I mentioned it in the paragraph but didn't add a specific section for it, let me do that.
impl_(c10::impl::getDeviceGuardImpl(c10::kCUDA)), | ||
devices_(sortDevices(std::move(devices))) { | ||
impl_(getImplForDevices(devices)), | ||
devices_(getSortedIndicesOfDevices(impl_, devices)) { |
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.
curious, any reason for not just storing devices instead of device indices in this change??
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.
At this stage I wanted to change as few things as possible to keep the delta small and thus help see that this is not changing behaviors. But, yes, I was thinking the same and I'll probably do a follow-up "polishing" PR.
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. Differential Revision: [D28032711](https://our.internmc.facebook.com/intern/diff/D28032711/) [ghstack-poisoned]
This pull request has been merged in 71c2f88. |
Summary: Pull Request resolved: pytorch#57051 Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR. ghstack-source-id: 127713134 (Note: this ignores all push blocking failures!) Test Plan: CI Reviewed By: mrshenli Differential Revision: D28032711 fbshipit-source-id: 8ba23b1b0d97f61db8693cd5f3c7bae7989a9bcd
Stack from ghstack:
Make CUDAFuture autodetect the devicetype from its arguments (which thus change from DeviceIndices to full Devices). This in fact transforms CUDAFuture into a AnythingFuture, since it's not tied to CUDA in any way anymore. Having made it fully device-agnostic, we'll merge it into ivalue::Future in the next PR.
Differential Revision: D28032711