Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Jeaugey <sjeaugey@nvidia.com>2018-12-14 02:22:17 +0300
committerSylvain Jeaugey <sjeaugey@nvidia.com>2018-12-14 02:22:17 +0300
commitc244b51ae7fc0de0cb7df20653f9ff3455106286 (patch)
tree19c1c68635f532086c7f8903ebec514d603c2fec
parent3e6afef473687670c4176b658f5769176ffbd1e9 (diff)
Replace CUDA_VERSION by CUDART_VERSION
-rw-r--r--src/include/common_coll.h2
-rw-r--r--src/include/core.h2
-rw-r--r--src/init.cu6
-rw-r--r--src/misc/enqueue.cu2
4 files changed, 6 insertions, 6 deletions
diff --git a/src/include/common_coll.h b/src/include/common_coll.h
index 3f3bffe..3ec7354 100644
--- a/src/include/common_coll.h
+++ b/src/include/common_coll.h
@@ -18,7 +18,7 @@ static ncclResult_t PointerCheck(const void* pointer, struct ncclComm* comm, con
WARN("%s : %s is not a valid pointer", opname, ptrname);
return ncclInvalidArgument;
}
-#if CUDA_VERSION >= 10000
+#if CUDART_VERSION >= 10000
if (attr.type == cudaMemoryTypeDevice && attr.device != comm->cudaDev) {
#else
if (attr.memoryType == cudaMemoryTypeDevice && attr.device != comm->cudaDev) {
diff --git a/src/include/core.h b/src/include/core.h
index 9fd5e0e..8285df5 100644
--- a/src/include/core.h
+++ b/src/include/core.h
@@ -18,7 +18,7 @@
#include <stdlib.h>
#include <cuda_runtime.h>
-#if CUDA_VERSION < 9000
+#if CUDART_VERSION < 9000
struct cudaLaunchParams {
void *func;
dim3 gridDim;
diff --git a/src/init.cu b/src/init.cu
index 5f92de4..9d0188e 100644
--- a/src/init.cu
+++ b/src/init.cu
@@ -42,7 +42,7 @@ FILE *ncclDebugFile = stdout;
std::chrono::high_resolution_clock::time_point ncclEpoch;
#endif
-#if CUDA_VERSION >= 9200
+#if CUDART_VERSION >= 9200
#define NCCL_GROUP_CUDA_STREAM 0 // CGMD: CUDA 9.2,10.X Don't need to use an internal CUDA stream
#else
#define NCCL_GROUP_CUDA_STREAM 1 // CGMD: CUDA 9.0,9.1 Need to use an internal CUDA stream
@@ -229,7 +229,7 @@ static ncclResult_t commAlloc(ncclComm_t* comret, int ndev, int rank) {
comm->doneEvent = doneEvent;
comm->llThreshold = ncclParamLlThreshold();
comm->checkPointers = ncclParamCheckPointers() == 1 ? true : false;
-#if CUDA_VERSION >= 9200
+#if CUDART_VERSION >= 9200
comm->groupCudaStream = ncclParamGroupCudaStream();
#else
// Don't allow the user to overload the default setting in older CUDA builds
@@ -473,7 +473,7 @@ ncclResult_t ncclCommSetIntra(struct ncclComm* comm, int rank, int ranks, struct
}
if (comm->launchMode == ncclComm::GROUP) {
CUDACHECK(cudaStreamCreateWithFlags(&comm->groupStream, cudaStreamNonBlocking));
-#if CUDA_VERSION >= 9000
+#if CUDART_VERSION >= 9000
if (*comm->intraCC && (ncclCudaFullCompCap() == *comm->intraCC)) {
// Check whether the GPU supports Cooperative Group Multi Device Launch
(void) cudaDeviceGetAttribute(&cgMdLaunch, cudaDevAttrCooperativeMultiDeviceLaunch, comm->cudaDev);
diff --git a/src/misc/enqueue.cu b/src/misc/enqueue.cu
index 3335fa0..80846dd 100644
--- a/src/misc/enqueue.cu
+++ b/src/misc/enqueue.cu
@@ -58,7 +58,7 @@ static void* const ncclKerns[ncclCollCount*ncclNumOps*ncclNumTypes*2] = {
};
ncclResult_t ncclLaunchCooperativeKernelMultiDevice(struct cudaLaunchParams *paramsList, int* cudaDevs, int numDevices, int cgMode) {
-#if CUDA_VERSION >= 9000
+#if CUDART_VERSION >= 9000
if (cgMode & 0x01) {
CUDACHECK(cudaLaunchCooperativeKernelMultiDevice(paramsList, numDevices,
// These flags are to reduce the latency of using this API