Skip to content

Commit

Permalink
Add USE_C10D_NCCL around NCCL trace utils (pytorch#114597)
Browse files Browse the repository at this point in the history
Fixes pytorch#114575

Pull Request resolved: pytorch#114597
Approved by: https://github.com/malfet
  • Loading branch information
kwen2501 authored and pytorchmergebot committed Nov 27, 2023
1 parent 6902488 commit 800cf5f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions torch/csrc/distributed/c10d/TraceUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ inline std::string retrieveDesyncReport(
/* Note: this is only used by PGNCCL (could be generalized in an ideal world but
* wasn't done that way, so isn't expected to be fully general at the moment) */

#ifdef USE_C10D_NCCL

DebugInfoWriter::DebugInfoWriter(int rank) {
std::string fileName = getCvarString(
{"TORCH_NCCL_DEBUG_INFO_TEMP_FILE"}, "/tmp/nccl_trace_rank_");
Expand Down Expand Up @@ -516,4 +518,5 @@ struct NCCLTraceBuffer {
}
};

#endif
} // namespace c10d

0 comments on commit 800cf5f

Please sign in to comment.