Skip to content
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

align the peer mem access check with API document #1507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

changchengx
Copy link

In API document, it writes below:
cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice )
if device device is capable of directly accessing memory from peerDevice

In API document, it writes below:
  cudaDeviceCanAccessPeer(int* canAccessPeer, int device, int peerDevice )
  "if device device is capable of directly accessing memory from peerDevice"

Signed-off-by: Liu, Changcheng <[email protected]>
@AddyLaddy
Copy link
Collaborator

I can't see the issue with that code? We're checking for access from the local device cudaDev for each peer i

@changchengx
Copy link
Author

changchengx commented Nov 8, 2024

I can't see the issue with that code? We're checking for access from the local device cudaDev for each peer i

Yes. It wants to check whether the i could access to the memory allocated from cudaDev. In the API document, it checks whether the device could access to the memory allocated from peerDevice. So, I think the argument i should be assigned to the parameter device.

@kiskra-nvidia
Copy link
Member

I'm guessing that in practice the order doesn't really matter but I agree with you @changchengx that the order you suggested is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants