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

implement copy_to_peer #109

Open
smedegaard opened this issue Nov 26, 2024 · 0 comments
Open

implement copy_to_peer #109

smedegaard opened this issue Nov 26, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@smedegaard
Copy link
Owner

The problem

hipMemcpy docs states the below about multi-gpu and peer-to-peer copy.

types::memory::copy_to_peer()

It supports memory from

  • host to device
  • device to host
  • device to device
  • host to host

The src and dst must not overlap.

For hipMemcpy:
the copy is always performed by the current device (set by hipSetDevice).

For multi-gpu or peer-to-peer configurations:

  • it is recommended to set the current device to the device where the src data is physically located.
  • For optimal peer-to-peer copies, the copy device must be able to access the src and dst pointers (by calling
  • hipDeviceEnablePeerAccess with copy agent as the current device and src/dest as the peerDevice argument.
    if this is not done, the hipMemcpy will still work, but will perform the copy using a staging buffer on the host. Calling hipMemcpy with dst and src pointers that do not match the hipMemcpyKind results in undefined behavior.
@smedegaard smedegaard added the enhancement New feature or request label Nov 26, 2024
@smedegaard smedegaard added this to the peer-to-peer milestone Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant