From b02fd0416596d9e507e898fd0377255bbc0e0397 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Mon, 20 Mar 2023 15:34:09 -0700 Subject: [PATCH] Fix unit test HIP graph error (#712) --- src/enqueue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/enqueue.cc b/src/enqueue.cc index 33502ef928..d01817a0e9 100644 --- a/src/enqueue.cc +++ b/src/enqueue.cc @@ -938,7 +938,7 @@ ncclResult_t ncclLaunchPrepare(struct ncclComm* comm) { NCCLCHECKGOTO(ncclStrongStreamWaitStream(tasks->capturingGraph, &comm->deviceStream, l->stream), result, failure); } NCCLCHECKGOTO(ncclStrongStreamWaitStream(tasks->capturingGraph, launchStream, &comm->deviceStream), result, failure); - } else if (tasks->streams->stream != comm->lastStream) { + } else if (tasks->streams->stream != comm->lastStream && comm->lastStream != nullptr) { // Stream changed from last call, create dependency against last NCCL kernel launch CUDACHECK(hipStreamWaitEvent(tasks->streams->stream, comm->doneEvent, 0)); }