Cover cases where P2P is used for H2D copies, where host is pinned
but not accessible to the copy agent.
Change-Id: I9464b787228b40f93473708c3fde9726e1986365
- Bug fix for peer visibility. Now contexts correctly detect when they can use SDMA for P2P vs staging buffers.
- Interface to new HCC copy_ext function.
- Improve context and peer print /debug options.
- Add comments and usage to hipPeerToPeer_simple test.
- devicereset would lose track of default stream and thus subsequent
synchronization calls might not actually sychronize.
- Also deviceReset now correctly frees streams.
- fix waits in P2P staging copy - first phase (Device0-to-Staging) must
wait for second phase (Staging to Device1) to finish draining the
buffer.
- add P2P staging buffer copy.
- If copy device does not have sufficient access permissions, fall back
to staging buffer.
- improve docs for which copy device is used.
- set USE_PEER_TO_PEER=3 (requires HCC "am_memtracker_update_peers")
- when enabling peer, turn it on for previously allocated memory.
- hipDeviceCanAccessPeer is no longer self-ware (self does not qualify
as a peer)
- device peerlist always includes self, so when we call allow_access
we never remove self access.
- hipDeviceReset() removes old peer mappings.
- Ensure proper device is set before each command.
- Add command line switches:
+bool p_memcpyWithPeer = false; // use the peer device for the P2P copy
+bool p_mirrorPeers = false; // in addition to mapping current to peer
space, map peer to current space.
+int p_peerDevice = -1; // explicly specify which peer to use, else
use p_gpuDevice + 1.