[c10d] Move the include of header file of TraceUtils.h into NCCLUtil.cpp instead of keeping in hpp (#156909)

We have seen complaint about compilation failure of `NCCLSymmetricMemory.cu` and the reason is because we include <torch/csrc/distributed/c10d/TraceUtils.h> inside NCCLUtil.hpp this is not necessary so we want to move the include to cpp.

Differential Revision: [D77346675](https://our.internmc.facebook.com/intern/diff/D77346675)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156909
Approved by: https://github.com/kwen2501
This commit is contained in:
fduwjj
2025-06-26 10:04:28 -07:00
committed by PyTorch MergeBot
parent 21b5dc7a6a
commit d0cfa3e5bf
2 changed files with 1 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#include <torch/csrc/distributed/c10d/NCCLUtils.hpp>
#include <torch/csrc/distributed/c10d/TraceUtils.h>
#include <c10/util/env.h>

View File

@ -14,7 +14,6 @@
#include <c10/util/Exception.h>
#include <nccl.h>
#include <torch/csrc/cuda/nccl.h>
#include <torch/csrc/distributed/c10d/TraceUtils.h>
#include <optional>
constexpr int64_t kCommInitBusyWaitMillis = 2;