Multi device bugfix - #206
Conversation
|
This is a draft PR for now because I'm making these changes based on pytorch documentation and recommendations for multi device. I need to get access to multi device machines in order to test properly. The lack of AMD machine availability for testing is very annoying. I don't have any access through work (currently). And AMD didn't respond to my application for developer grants for this project. |
|
@vbharadwaj-bk I tested this on a multi device host and verified the problems the branch is trying to address exist in main and verified that using the device guard works as intended. There are a few aspects to this change.
I have not tested this on a AMD machine. I cannot get access. I need help testing this aspect of the change. |
vbharadwaj-bk
left a comment
There was a problem hiding this comment.
This rolls in a few different changes. Some comments:
-
Prefer the stream_ordering_test.py bio e in a separate PR (and would like a few more details about the failure mode you are trying to catch here).
-
The multi device changes are good.
-
[No action needed] Regarding the BLAS handle - there's a tricky problem with the existing codebase. cuBLAS is not ABI-stable across major versions, so if the user has a CUDAToolkit that's not the same as PyTorch's version (which could well be the case, as PyTorch installs just the NVIDIA libraries it needs from a Python distribution channel), then we have a mismatch and may not be able to find certain symbols at link time. So far, it has worked because we load torch first and the symbols it loads are consistent with the ones we have compiled against.
Switching to PyTorch's BLAS handle is a step in the right direction; there's no good way to solve this problem without distributing multiple package versions.
Can run some of the testing in a bit.
|
Thanks for the review.
Whatever the solution, it would be nice to have a strategy that we can port for other accelerators. |
This is a PR to harden multi device behavior.
device, which device to use.