Fix cudaMemcpyAsync bug

We are trying to use the copy result of first cudaMemcpyAsync in the
second cudaMemcpyAsync without sync in between. This patch fixes it
by allocating a CPU side array to cache device side addr so that we
can avoid this consecutive cuda mem copy.

Fixes #957
This commit is contained in:
Kaiming Ouyang
2023-09-20 05:51:14 -07:00
committed by Sylvain Jeaugey
parent 559b70f86c
commit 4365458757
5 changed files with 21 additions and 13 deletions
+2
View File
@@ -124,6 +124,8 @@ struct ncclSharedResources {
struct ncclChannel {
struct ncclChannelPeer** peers;
struct ncclDevChannelPeer** devPeers;
/* devPeer pointer array used for host side access */
struct ncclDevChannelPeer** devPeersHostPtr;
struct ncclRing ring;
int* devRingUserRanks;
struct ncclTree tree;