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
Add torch.cuda.can_device_access_peer #50446
Conversation
And unrelying torch._C._cuda_canDeviceAccessPeer, which is a wrapper around cudaDeviceCanAccessPeer
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.
@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
💊 CI failures summary and remediationsAs of commit 0e744bc (more details on the Dr. CI page):
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. |
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.
Thank you for adding this so promptly!!
@@ -305,6 +305,18 @@ def get_device_properties(device: _device_t) -> _CudaDeviceProperties: | |||
raise AssertionError("Invalid device id") | |||
return _get_device_properties(device) # type: ignore[name-defined] | |||
|
|||
def can_device_access_peer(device: _device_t, peer_device: _device_t) -> bool: | |||
r"""Checks if peer access between two devices is possible. |
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.
do we need to mention that if device == -1
, it will use the current device?
Codecov Report
@@ Coverage Diff @@
## master #50446 +/- ##
==========================================
- Coverage 80.70% 80.70% -0.01%
==========================================
Files 1904 1904
Lines 206597 206606 +9
==========================================
+ Hits 166742 166746 +4
- Misses 39855 39860 +5 |
And unrelying torch._C._cuda_canDeviceAccessPeer, which is a wrapper around cudaDeviceCanAccessPeer