Skip to content

Commit 6a449bb

Browse files
committed
[None][perf] set ncclConfig graphUsageMode=1 on communicator init
Signed-off-by: Ludwig Schneider <lschneider@nvidia.com>
1 parent 5e9b88d commit 6a449bb

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

cpp/tensorrt_llm/common/opUtils.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
* SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
* SPDX-License-Identifier: Apache-2.0
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -161,7 +161,13 @@ std::shared_ptr<ncclComm_t> getComm(std::set<int> const& group)
161161
setenv("NCCL_RUNTIME_CONNECT", "0", 0);
162162
setenv("NCCL_GRAPH_REGISTER", "0", 0);
163163
#endif // _WIN32
164+
#if NCCL_VERSION_CODE >= NCCL_VERSION(2, 29, 0)
165+
ncclConfig_t config = NCCL_CONFIG_INITIALIZER;
166+
config.graphUsageMode = 1;
167+
NCCLCHECK_THROW(ncclCommInitRankConfig(ncclComm.get(), group.size(), id, groupRank, &config));
168+
#else
164169
NCCLCHECK_THROW(ncclCommInitRank(ncclComm.get(), group.size(), id, groupRank));
170+
#endif // NCCL_VERSION_CODE >= NCCL_VERSION(2, 29, 0)
165171
commMap[group] = ncclComm;
166172
TLLM_LOG_TRACE("%s stop for rank %d", __PRETTY_FUNCTION__, rank);
167173
return ncclComm;

0 commit comments

Comments
 (0)