Skip to content

Commit

Permalink
[ncclx] Rename NCCL-EXP to NCCLX
Browse files Browse the repository at this point in the history
Reviewed By: kryanchun

Differential Revision: D56534548
  • Loading branch information
wesbland authored and facebook-github-bot committed Apr 30, 2024
1 parent ab80a59 commit 3d95831
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/cpp/c10d/ProcessGroupNCCLTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ TEST_F(ProcessGroupNCCLTest, testSplittingCommunicator) {
multiThreadRun(testSplittingCommunicator);
}

#ifdef IS_NCCL_EXP
#ifdef IS_NCCLX
TEST_F(ProcessGroupNCCLTest, testSparseAllreduce) {
if (skipTest()) {
return;
Expand Down
2 changes: 1 addition & 1 deletion torch/csrc/distributed/c10d/NCCLUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class NCCLComm {
}
#endif

#if defined(IS_NCCL_EXP) && defined(NCCL_COMM_DUMP)
#if defined(IS_NCCLX) && defined(NCCL_COMM_DUMP)
std::unordered_map<std::string, std::string> ncclCommDump() {
std::unordered_map<std::string, std::string> dump;
if (isAborted()) {
Expand Down
4 changes: 2 additions & 2 deletions torch/csrc/distributed/c10d/ProcessGroupNCCL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ void cacheAllocatorDeregisterHook(
}
}

#if defined(IS_NCCL_EXP) && defined(NCCL_COMM_DUMP)
#if defined(IS_NCCLX) && defined(NCCL_COMM_DUMP)
std::string dump_nccl_trace() {
std::unordered_map<
std::string /* ncclUniqueID */,
Expand Down Expand Up @@ -2999,7 +2999,7 @@ c10::intrusive_ptr<Work> ProcessGroupNCCL::allreduce_sparse(
const AllreduceOptions& opts) {
TORCH_CHECK(tensors.size() == 1, MULTI_DEVICE_ERROR_MSG);
auto tensor = tensors.back();
#ifdef IS_NCCL_EXP
#ifdef IS_NCCLX
tensor = tensor.coalesce();
at::Tensor outputTensor =
torch::zeros(tensor.sizes(), tensor.options().layout(torch::kStrided));
Expand Down
2 changes: 1 addition & 1 deletion torch/csrc/distributed/c10d/default_comm_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ c10::intrusive_ptr<c10::ivalue::Future> FP16CompressCommHook::runHook(
c10::intrusive_ptr<c10::ivalue::Future> _AllReduceBySumCommHook::runHook(
GradBucket& bucket) {
std::vector<at::Tensor> tensors = {bucket.getBufferRef()};
#ifdef IS_NCCL_EXP
#ifdef IS_NCCLX
// case with sparse_metadata_ set and using indices from there
if (bucket.getSparseGradIndices().has_value()) {
AllreduceOptions opts = AllreduceOptions();
Expand Down

0 comments on commit 3d95831

Please sign in to comment.