From dcad0ef7cbd5cd90613ffce88fa256a366356a45 Mon Sep 17 00:00:00 2001 From: Wenkai Du <43822138+wenkaidu@users.noreply.github.com> Date: Mon, 19 Oct 2020 13:27:09 -0700 Subject: [PATCH] Fix incorrect pointer checking for scatter and gather (#285) --- src/misc/argcheck.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/argcheck.cc b/src/misc/argcheck.cc index 6977c2d6ac..70a3dc341c 100644 --- a/src/misc/argcheck.cc +++ b/src/misc/argcheck.cc @@ -73,10 +73,10 @@ ncclResult_t ArgsCheck(struct ncclInfo* info) { } } else { // Check CUDA device pointers - if (info->coll != ncclCollBroadcast || info->comm->rank == info->root) { + if ((info->coll != ncclCollBroadcast && info->coll != ncclCollScatter) || info->comm->rank == info->root) { NCCLCHECK(CudaPtrCheck(info->sendbuff, info->comm, "sendbuff", info->opName)); } - if (info->coll != ncclCollReduce || info->comm->rank == info->root) { + if ((info->coll != ncclCollReduce && info->coll != ncclCollGather) || info->comm->rank == info->root) { NCCLCHECK(CudaPtrCheck(info->recvbuff, info->comm, "recvbuff", info->opName)); } }