Skip to content

Commit 773f900

Browse files
committed
simplify some notes
1 parent f4423c5 commit 773f900

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

plugin/torch/_build_config.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,6 @@ def get_device_config(adaptor_flag):
201201
library_dirs += ["/opt/tops/lib", pytorch_library_path]
202202
libs += ["topsrt", "torch_gcu"]
203203
elif adaptor_flag == "-DUSE_SUNRISE_ADAPTOR":
204-
# All torchpt:: symbols (PTPUStream/PTPUEvent/PTPUDeviceGuardImpl)
205-
# live only in torch_ptpu/_C.cpython-*.so. The torch_ptpu/lib/ folder
206-
# holds kernel libs with zero torchpt:: symbols, and TorchPTPUConfig.cmake
207-
# itself targets _C*.so, so we must link against _C*.so by exact name.
208204
import torch_ptpu
209205
torch_ptpu_dir = os.path.dirname(os.path.abspath(torch_ptpu.__file__))
210206
c_so_basename = os.path.basename(torch_ptpu._C.__file__)

plugin/torch/flagcx/src/backend_flagcx.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,10 @@ c10::intrusive_ptr<Work> flagcxBackend::endCoalescing() {
488488
"endCoalescing called without a matching startCoalescing on "
489489
"the PTPU backend");
490490

491-
// Sort by peer asc so every rank touches pair sub-comms in canonical
492-
// (min,max) order. getOrInitPtpuPairComm blocks on a peer handshake;
493-
// canonical ordering turns that into a total order on pair keys and
494-
// eliminates the ring-of-pairs deadlock for >=3 ranks.
495-
496-
// No flagcxGroupStart/End: PCCL group brackets are process-global and
497-
// pair-comm send/recv are already async per-stream, so serial issue
498-
// still satisfies batch_isend_irecv's "enqueue-then-wait" semantics
499-
// and avoids the comm mismatch that caused the SIGSEGV.
491+
// Sort by peer asc to issue pair sub-comms in canonical (min,max) order,
492+
// avoiding the ring-of-pairs deadlock from getOrInitPtpuPairComm handshake.
493+
// No flagcxGroupStart/End: pair-comm send/recv are already async per-stream,
494+
// so serial issue still meets batch_isend_irecv's enqueue-then-wait semantics.
500495
std::stable_sort(
501496
ptpuCoalesce_.pendingOps.begin(), ptpuCoalesce_.pendingOps.end(),
502497
[](const auto &a, const auto &b) { return a.first < b.first; });

0 commit comments

Comments
 (0)