From 1cd55c5e030d62853d7f85294cc88b8ee702575a Mon Sep 17 00:00:00 2001 From: jiakai Date: Fri, 19 Aug 2016 19:00:14 +0800 Subject: [PATCH] pass devlist as const int* rather than int* in ncclCommInitAll [ROCm/rccl commit: 47b0797fe1f1b00cf2edfe449ac59370eea45032] --- projects/rccl/src/core.cu | 2 +- projects/rccl/src/nccl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/rccl/src/core.cu b/projects/rccl/src/core.cu index f3d1462c20..ac0d65f50b 100644 --- a/projects/rccl/src/core.cu +++ b/projects/rccl/src/core.cu @@ -750,7 +750,7 @@ ncclResult_t ncclCommInitRank(ncclComm_t* newcomm, int ndev, ncclUniqueId commId } extern "C" DSOGLOBAL -ncclResult_t ncclCommInitAll(ncclComm_t* comms, int ndev, int* devlist) { +ncclResult_t ncclCommInitAll(ncclComm_t* comms, int ndev, const int* devlist) { initDebug(); showVersion(); diff --git a/projects/rccl/src/nccl.h b/projects/rccl/src/nccl.h index a0a71fcf77..47bbdd820e 100644 --- a/projects/rccl/src/nccl.h +++ b/projects/rccl/src/nccl.h @@ -85,7 +85,7 @@ ncclResult_t ncclCommInitRank(ncclComm_t* comm, int ndev, ncclUniqueId commId, i * comm should be pre-allocated with size at least ndev*sizeof(ncclComm_t). * If devlist is NULL, the first ndev CUDA devices are used. * Order of devlist defines user-order of processors within the communicator. */ -ncclResult_t ncclCommInitAll(ncclComm_t* comm, int ndev, int* devlist); +ncclResult_t ncclCommInitAll(ncclComm_t* comm, int ndev, const int* devlist); /* Frees resources associated with communicator object. */ void ncclCommDestroy(ncclComm_t comm);