From 2b57751abbac0ce2cce589786a285d37addb5189 Mon Sep 17 00:00:00 2001 From: Min Si Date: Wed, 7 Sep 2022 08:56:05 -0700 Subject: [PATCH] Fix compilation issues with buck (#610) * Fix compilation warning with -Wmisleading-indentation When compile with -Wmisleading-indentation, it reports warning: misleading indentation; statement is not part of the previous 'if' This patch fixes it * Avoid relative include file path We don't need relative include file paths for src/graph/*.h since src/ is already in CMake include_directories --- src/collectives/device/common.h | 4 ++-- src/transport/net.cc | 2 +- src/transport/p2p.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/collectives/device/common.h b/src/collectives/device/common.h index 689a91576c..343c4010d6 100644 --- a/src/collectives/device/common.h +++ b/src/collectives/device/common.h @@ -292,8 +292,8 @@ class ncclFunction { #endif __device__ inline bool barrierReduceAny(int bit, uint32_t* abortCount) { - if (bit) atomicAdd(abortCount, 1); \ - __syncthreads(); \ + if (bit) atomicAdd(abortCount, 1); + __syncthreads(); return atomicAdd(abortCount, 0) != 0; } diff --git a/src/transport/net.cc b/src/transport/net.cc index c04db5aa28..10572d3af4 100644 --- a/src/transport/net.cc +++ b/src/transport/net.cc @@ -18,7 +18,7 @@ #include "npkit/npkit.h" #endif #include "graph.h" -#include "../graph/topo.h" +#include "graph/topo.h" static_assert(sizeof(ncclNetHandle_t) <= CONNECT_SIZE, "NET Connect info is too large"); diff --git a/src/transport/p2p.cc b/src/transport/p2p.cc index 38e7bb4b98..5101eae3bc 100644 --- a/src/transport/p2p.cc +++ b/src/transport/p2p.cc @@ -9,7 +9,7 @@ #include "graph.h" #include "utils.h" #include "graph.h" -#include "../graph/topo.h" +#include "graph/topo.h" struct ncclP2pBuff { void* directPtr;