question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support peer access

See original GitHub issue
import cupy as cp


with cp.cuda.Device(0):
    d0 = cp.arange(10)
with cp.cuda.Device(1):
    # Enable dereferencing pointer of device 0 in the current device.
    # otherwise you will get `cudaErrorIllegalAddress: an illegal memory access was encountered`
    cp.cuda.runtime.deviceEnablePeerAccess(0)
    d1 = d0 * 2

print(d1)

Currently, this code fails with the error Array device must be same as the current device: array device = 0 while current = 1, but it should work. Maybe changing the error to the warning?

ref: https://stackoverflow.com/questions/68074985/read-write-a-cupy-array-on-multiple-gpus

Note: deviceEnablePeerAccess may not work with all combinations of GPUs.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
kmaehashicommented, Jul 16, 2021

@MarwanAbdelatti I’m trying to get this into the next v10 release. The PR is not checked into master branch yet, but you can try my branch: https://github.com/cupy/cupy/pull/5496

1reaction
kmaehashicommented, Jul 14, 2021

@MarwanAbdelatti Thanks for sharing the configuration in DGX! I’m thinking of:

  • Check if peer access is available between two devices using cudaDeviceCanAccessPeer
  • Enabling it only when peer access is necessary
Read more comments on GitHub >

github_iconTop Results From Across the Web

Peer Support Workers for those in Recovery - SAMHSA
Peer support workers are people who have been successful in the recovery process who help others experiencing similar situations.
Read more >
Peer Support - AHCCCS
Peer support is a behavioral health service available to AHCCCS members. Peer support services are for members who may need more personalized support...
Read more >
Access Peer Support Resources | Peers For Progress
View selected resources from peer support programs around the world, including training manuals, tip sheets, issue briefs, publications, and presentations.
Read more >
Peer Support - Access to Independence
​Staff and trained volunteers are available to persons with disabilities who are looking for support and assistance. Peer mentors can assist an individual ......
Read more >
Veteran Services - Department of Mental Health
LACDMH is available to connecting veterans and their families with services and support through the Veteran Peer Access Network (VPAN).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found