From 00fdb1ef51a52b4805a0a7606d4dadd3fe5fb415 Mon Sep 17 00:00:00 2001 From: BertanDogancay Date: Wed, 31 Jan 2024 17:27:15 -0800 Subject: [PATCH] Clean up --- cmake/Generator.cmake | 4 +--- src/enqueue.cc | 10 +--------- src/init.cc | 1 - 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/cmake/Generator.cmake b/cmake/Generator.cmake index 1dc0a5391f..1c62143047 100644 --- a/cmake/Generator.cmake +++ b/cmake/Generator.cmake @@ -291,9 +291,7 @@ function(gen_msccl_kernels) message(STATUS "Generating ${FILE_NAME}") file(WRITE ${FILE_NAME} "#include \"msccl_kernel_impl.h\" - #include \"primitives.h\" #include \"nccl_common.h\" - #include \"device.h\" MSCCL_IMPL_KERNEL_ENTRY_FUNC_DEVREDOP_TYPE(${REDOP_CURRENT}, ${DATA_TYPE}, false);") list(APPEND HIP_SOURCES ${FILE_NAME}) endforeach() @@ -359,7 +357,7 @@ function(gen_collectives) message(STATUS "Generating ${FILE_PATH}") ## Construct the file - file(WRITE ${FILE_PATH} "#include \"${COLL_LOWER}.h\"\n#include \"common.h\"\n#include \"collectives.h\"\n") + file(WRITE ${FILE_PATH} "#include \"${COLL_LOWER}.h\"\n#include \"common.h\"\n\n") string(FIND "${list_name}" "LL128" IS_LL128) if(NOT IS_LL128 EQUAL -1) file(APPEND ${FILE_PATH} "#if defined(__gfx90a__) && defined(ENABLE_LL128)\n") diff --git a/src/enqueue.cc b/src/enqueue.cc index 2094fd1f7f..f3f97d56bb 100644 --- a/src/enqueue.cc +++ b/src/enqueue.cc @@ -1434,15 +1434,7 @@ static ncclResult_t computeColl(struct ncclInfo* info /* input */, int* workFunc work->redOpArgIsPtr = info->opFull.scalarArgIsPtr; work->opCount = info->comm->opCount; - if (info->comm->nRanks == 1) { - // one-rank reduce index - *workFuncIndex = ncclDevFuncId_P2p() + int(info->datatype); - return ncclSuccess; - } else if (info->coll == ncclFuncAllToAllPivot) { - *workFuncIndex = ncclDevFuncId_AllToAllPivot(); - } else { - *workFuncIndex = ncclDevFuncId(info->coll, info->opFull.op, info->datatype, info->algorithm, info->protocol); - } + *workFuncIndex = ncclDevFuncId(info->coll, info->opFull.op, info->datatype, info->algorithm, info->protocol); work->connIndex = 0; proxyOp->connIndex = 0; diff --git a/src/init.cc b/src/init.cc index eaf1e70a40..be42cc1352 100644 --- a/src/init.cc +++ b/src/init.cc @@ -34,7 +34,6 @@ #include #include #include -#include #include "graph/topo.h" #include "graph/xml.h" #include "archinfo.h"