Skip to content

Commit e7fcd53

Browse files
authored
Refine P2P code: remove unused variable (#104)
1 parent 7975461 commit e7fcd53

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/utils.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> pointToPoint(
683683
attr_t attr = ccl::create_operation_attr<attr_t>();
684684
const auto devices = get_device_list(inputs);
685685
std::string key;
686-
int p2pRank = 0, p2pTargetRank = 0;
686+
int p2pRank = 0;
687687
bool isSendRecvSelf = false;
688688

689689
int rank_ = pg_ccl.getRank();
@@ -696,14 +696,12 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> pointToPoint(
696696
// rank and my peer
697697
key = get_key_from_devs(devices);
698698
p2pRank = rank_;
699-
p2pTargetRank = peer;
700699
} else {
701700
// TODO: single P2P
702701
// For single P2P, preserve the old two-rank behavior (to avoid perf diff)
703702
key = get_key_send_recv(rank_, peer);
704703
p2pRank = rank_ <= peer ? 0 : 1;
705704
isSendRecvSelf = rank_ == peer;
706-
p2pTargetRank = isSendRecvSelf ? 0 : 1 - p2pRank;
707705
}
708706

709707
auto& comms = get_ccl_fn(pg_ccl, key, devices, op_type, p2pRank, isSendRecvSelf);

0 commit comments

Comments
 (0)