Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/sharp_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ static void ncclSharpApplyLibEnvProfile(void) {
/* For allgather overlap (multicast path) */
ncclSharpSetEnv("SHARP_COLL_ENABLE_MCAST", "1");
ncclSharpSetEnv("SHARP_COLL_ENABLE_SAT", "0");
INFO(NCCL_INIT|NCCL_NET|NCCL_ENV, "SHARP: Offloaded Allgather requested");
} else {
/* For reduce-scatter (non-overlap default path) */
ncclSharpSetEnv("SHARP_COLL_ENABLE_MCAST", "0");
ncclSharpSetEnv("SHARP_COLL_ENABLE_SAT", "1");
INFO(NCCL_INIT|NCCL_NET|NCCL_ENV, "SHARP: Streaming Aggregation based Reduction requested");
}
}

Expand Down Expand Up @@ -247,8 +249,6 @@ ncclResult_t ncclSharpInit(void **ctx, uint64_t commId, ncclDebugLogger_t logFun
setenv("SHARP_COLL_LOCK_ON_COMM_INIT", "1", 0);
setenv("SHARP_COLL_LOG_LEVEL", "3", 0);

/* Apply Megatron-driven env profile (only if SHARP_COLLNET_OVERLAP_AG is set) */
ncclSharpApplyLibEnvProfile();

if (ncclParamSharpDisableAG()) {
INFO(NCCL_NET, "Disabled SHARP Allgather");
Expand Down Expand Up @@ -371,6 +371,9 @@ ncclResult_t ncclSharpConnect(void* handles[], int nranks, int rank, void* liste
}
}

/* Apply Megatron-driven env profile (only if SHARP_COLLNET_OVERLAP_AG is set) */
ncclSharpApplyLibEnvProfile();

NCCLCHECK(ncclIbMalloc((void**)&cComm, sizeof(struct ncclSharpCollComm)));
NCCLCHECK(ncclIbMalloc((void**)&cComm->reqs, sizeof(struct ncclSharpRequest)*MAX_REQUESTS));

Expand Down
Loading