Skip to content

Commit

Permalink
[Fix] USE_NCCL -> ORT_USE_NCCL (microsoft#21136)
Browse files Browse the repository at this point in the history
### Description
Correct the macro used when NCCL enabled.
  • Loading branch information
mindest authored Jun 24, 2024
1 parent 3a917e4 commit adaf0e8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace onnxruntime {
namespace cuda {
namespace collective {

#if defined(USE_MPI) || defined(USE_NCCL)
#if defined(USE_MPI) || defined(ORT_USE_NCCL)

using namespace onnxruntime;
using namespace onnxruntime::cuda;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace onnxruntime {
namespace cuda {
namespace collective {

#if defined(USE_MPI) || defined(USE_NCCL)
#if defined(USE_MPI) || defined(ORT_USE_NCCL)

constexpr size_t WARP_SIZE = 32;
constexpr size_t MAX_ALL_REDUCE_BLOCKS = 24;
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/cuda/collective/ipc_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace onnxruntime {
namespace cuda {
namespace collective {

#if defined(USE_MPI) || defined(USE_NCCL)
#if defined(USE_MPI) || defined(ORT_USE_NCCL)

using namespace onnxruntime;

Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/contrib_ops/cuda/collective/ipc_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace onnxruntime {
namespace cuda {
namespace collective {

#if defined(USE_MPI) || defined(USE_NCCL)
#if defined(USE_MPI) || defined(ORT_USE_NCCL)

struct CudaDeleter {
void operator()(void* ptr) const noexcept {
Expand Down Expand Up @@ -86,4 +86,4 @@ GetCustomAllReduceWorkspace(int rank, int world_size, size_t input_size, IPCMemo

} // namespace collective
} // namespace cuda
} // namespace onnxruntime
} // namespace onnxruntime
2 changes: 1 addition & 1 deletion onnxruntime/contrib_ops/cuda/collective/nccl_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "core/providers/cuda/cuda_kernel.h"

#if defined(ORT_USE_NCCL) || defined(ORT_USE_MPI)
#if defined(ORT_USE_NCCL) || defined(USE_MPI)
#ifndef USE_ROCM
#include "custom_reduce_impl.h"
#include "ipc_utils.h"
Expand Down

0 comments on commit adaf0e8

Please sign in to comment.