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>2019-12-06 20:55:54 +0300
committerSylvain Jeaugey <sjeaugey@nvidia.com>2019-12-06 20:55:54 +0300
commitaa15dfb29c05adc4f2c895aa72f8873e125560fb (patch)
tree5b10ab4e258dc9069cca0b1fb59851274721aa25
parent8c564e9b57dc0fb913ce31de99c6ad556ae04fa7 (diff)
Fix clang compilation
-rw-r--r--src/graph/tuning.cc2
-rw-r--r--src/init.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/graph/tuning.cc b/src/graph/tuning.cc
index 89a97a3..87afb2f 100644
--- a/src/graph/tuning.cc
+++ b/src/graph/tuning.cc
@@ -192,7 +192,7 @@ ncclResult_t ncclSetThresholds(struct ncclComm* comm, int minCompCap, int maxCom
// Override defaults with user env
char* str = getenv("NCCL_THREAD_THRESHOLDS");
if (str) {
- ssize_t t[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS] = { -2 };
+ ssize_t t[NCCL_NUM_ALGORITHMS][NCCL_NUM_PROTOCOLS] = {{ -2, -2, -2 }, { -2, -2, -2}};
sscanf(str, "%ld %ld %ld %ld %ld %ld", t[0], t[0]+1, t[0]+2, t[1], t[1]+1, t[1]+2);
for (int a=0; a<NCCL_NUM_ALGORITHMS; a++) {
for (int p=0; p<NCCL_NUM_PROTOCOLS; p++) {
diff --git a/src/init.cc b/src/init.cc
index 15a9e7c..9da676a 100644
--- a/src/init.cc
+++ b/src/init.cc
@@ -125,7 +125,7 @@ ncclResult_t ncclGetUniqueId(ncclUniqueId* out) {
// Prevent compiler from optimizing out these operations
#ifdef __clang__
-#define NCCL_NO_OPTIMIZE __attribute__((noopt)))
+#define NCCL_NO_OPTIMIZE __attribute__((noopt))
#else
#define NCCL_NO_OPTIMIZE __attribute__((optimize("O0")))
#endif