Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ static ncclResult_t ncclGinAllReduceInitOnce(ncclComm* comm) {
reqs.barrierCount = kGinAllReduceLsaCtas;
reqs.ginSignalCount = kGinAllReduceLsaCtas;
reqs.ginConnectionType = NCCL_GIN_CONNECTION_FULL;
NCCLCHECK(ncclDevrCommCreateInternal(comm, &reqs, &state->devComm, /*isInternal=*/true));
NCCLCHECK(ncclDevrCommCreateInternal(comm, &reqs, &state->devComm, /*isInternal=*/true,
/*deviceCodeVersion=*/NCCL_VERSION_CODE));
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
state->initialized = true;
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved

// Two words (arrived, sense) for ginIntraGpuCtaBarrier. ncclCudaCalloc is capture-safe
Expand Down Expand Up @@ -231,7 +232,9 @@ static bool ginAllReduceBaseEligible(ncclComm* comm, const void* sendbuff, void*
if (comm->nNodes != 1) return false;
if (comm->nRanks > kGinAllReduceMaxRanks) return false;
if (comm->sharedRes == nullptr) return false;
if (comm->sharedRes->ginState.ginType != (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA) return false;
ncclGinType_t ginType = NCCL_GIN_TYPE_NONE;
if (ncclGetGinType(comm, &ginType) != ncclSuccess) return false;
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
if (ginType != (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA) return false;
// After cheaper ginType: ncclTeamLsa() can initialize the device runtime.
if (ncclTeamLsa(comm).nRanks != comm->nRanks) return false;
return true;
Expand Down
7 changes: 5 additions & 2 deletions projects/rccl/src/algorithms/gin/sdma/gin_alltoall_sdma.cu
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ ncclResult_t ncclGinA2AInitOnce(ncclComm* comm) {
reqs.ginSignalCount = kGinA2AMaxCtas;
reqs.barrierCount = kGinA2ASdmaCtas;
reqs.ginConnectionType = NCCL_GIN_CONNECTION_FULL;
NCCLCHECK(ncclDevrCommCreateInternal(comm, &reqs, &state->devComm, /*isInternal=*/true));
NCCLCHECK(ncclDevrCommCreateInternal(comm, &reqs, &state->devComm, /*isInternal=*/true,
/*deviceCodeVersion=*/NCCL_VERSION_CODE));
state->initialized = true;
}
return ncclSuccess;
Expand All @@ -181,7 +182,9 @@ bool ncclAllToAllGinSdmaEligible(ncclComm* comm, const void* sendbuff, void* rec
if (comm->globalGinSupport != NCCL_GIN_CONNECTION_FULL) return false;

// This path runs on the comm's shared GIN backend, so it has to be SDMA.
if (comm->sharedRes->ginState.ginType != (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA) return false;
ncclGinType_t ginType = NCCL_GIN_TYPE_NONE;
if (ncclGetGinType(comm, &ginType) != ncclSuccess) return false;
if (ginType != (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA) return false;
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved

// Every rank must be reachable over LSA.
if (ncclTeamLsa(comm).nRanks != comm->nRanks) return false;
Expand Down
9 changes: 5 additions & 4 deletions projects/rccl/test/GinAlltoAllEligibilityTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ struct GinAlltoAllMockComm
comm.devrState.lsaSize = comm.nRanks;
comm.devrState.lsaSelf = comm.rank;

sharedRes.ginState.ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA;
comm.sharedRes = &sharedRes;
sharedRes.ginState.numActiveBackends = 1;
sharedRes.ginState.backends[0].ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_ANVIL_SDMA;
comm.sharedRes = &sharedRes;
}

ncclComm* get() { return &comm; }
Expand Down Expand Up @@ -146,10 +147,10 @@ TEST_F(GinAlltoAllEligibilityTest, LsaTeamSmallerThanComm)
// other backend must not be claimed.
TEST_F(GinAlltoAllEligibilityTest, WrongGinBackend)
{
mockComm_.sharedRes.ginState.ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_ROCSHMEM_GDA;
mockComm_.sharedRes.ginState.backends[0].ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_ROCSHMEM_GDA;
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
EXPECT_FALSE(eligible(kCount));

mockComm_.sharedRes.ginState.ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_PROXY;
mockComm_.sharedRes.ginState.backends[0].ginType = (ncclGinType_t)NCCL_NET_DEVICE_GIN_PROXY;
EXPECT_FALSE(eligible(kCount));
}

Expand Down
13 changes: 10 additions & 3 deletions projects/rccl/tools/ci/lib/gin-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"name": "rccl-gin-rocshmem-sdma-bcast-d3",
"kind": "rccl-tests",
"bin": "broadcast_perf",
"env": ["NCCL_CUMEM_ENABLE=1", "RCCL_ENABLE_INTRANET=1", "NCCL_DMABUF_ENABLE=1", "HSA_NO_SCRATCH_RECLAIM=1", "NCCL_MSCCL_ENABLE=0", "NCCL_GIN_ENABLE=1", "NCCL_GIN_TYPE=6"],
"env": ["NCCL_CUMEM_ENABLE=1", "RCCL_ENABLE_INTRANET=1", "NCCL_DMABUF_ENABLE=1", "HSA_NO_SCRATCH_RECLAIM=1", "NCCL_MSCCL_ENABLE=0", "NCCL_GIN_ENABLE=1", "NCCL_GIN_TYPE=7"],
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
"args": "-b 128 -e {E} -f 2 -g 1 -R 2 -D 3 -A 1"
},
{
Expand All @@ -69,11 +69,18 @@
"args": "--gtest_filter=GinRocshmemGdaTemplateTest.*:GinAnvilSdmaTemplateTest.*:GinAnvilIpcDeviceTest.*"
},
{
"name": "rccl-gin-rocshmem-sdma-internal",
"name": "rccl-gin-rocshmem-sdma-alltoall-internal",
"kind": "rccl-tests",
"bin": "alltoall_perf",
"env": ["NCCL_CUMEM_ENABLE=1", "NCCL_DMABUF_ENABLE=1", "HSA_NO_SCRATCH_RECLAIM=1", "NCCL_GIN_ENABLE=1", "NCCL_GIN_TYPE=6"],
"env": ["NCCL_CUMEM_ENABLE=1", "NCCL_DMABUF_ENABLE=1", "HSA_NO_SCRATCH_RECLAIM=1", "NCCL_GIN_ENABLE=1", "NCCL_GIN_TYPE=7"],
"args": "-b 128 -e {E} -f 2 -g 1 -R 2"
},
{
"name": "rccl-gin-rocshmem-sdma-allreduce-internal",
"kind": "rccl-tests",
"bin": "all_reduce_perf",
Comment thread
Kapil-Shyam-Pawar marked this conversation as resolved.
Resolved
"env": ["NCCL_CUMEM_ENABLE=1", "NCCL_DMABUF_ENABLE=1", "HSA_NO_SCRATCH_RECLAIM=1", "NCCL_GIN_ENABLE=1", "NCCL_GIN_TYPE=7"],
"args": "-b 256M -e 1G -f 2 -g 1 -R 2 -A 1"
}
]
}
4 changes: 2 additions & 2 deletions projects/rccl/tools/ci/run-gin-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# GIN_PYTEST_TIMEOUT Wall-clock cap for pytest matrix entries (default: 1800s)
# GIN_PYTEST_HW_CASES mpirun cases under -k GinSdma (default: 9). Offline
# parser/tier guards do not launch and are not counted.
# RCCL_TESTS_BCAST_GIN_TYPE NCCL_GIN_TYPE for Broadcast pytest (default: 6)
# RCCL_TESTS_BCAST_GIN_TYPE NCCL_GIN_TYPE for Broadcast pytest (default: 7)
# RCCL_TESTS_BCAST_TIMEOUT_S / RCCL_TESTS_BCAST_CONN_RETRIES
# Inner pytest launch budget. Unset → derived so
# HW_CASES * retries * TIMEOUT_S is strictly under
Expand Down Expand Up @@ -245,7 +245,7 @@ run_test() {
RCCL_TESTS_GIN_SDMA_BCAST=1 \
RCCL_TESTS_BCAST_EXE="${bcast_exe}" \
RCCL_TESTS_BCAST_NP="${NP}" \
RCCL_TESTS_BCAST_GIN_TYPE="${RCCL_TESTS_BCAST_GIN_TYPE:-6}" \
RCCL_TESTS_BCAST_GIN_TYPE="${RCCL_TESTS_BCAST_GIN_TYPE:-7}" \
RCCL_TESTS_BCAST_TIMEOUT_S="${RCCL_TESTS_BCAST_TIMEOUT_S}" \
RCCL_TESTS_BCAST_CONN_RETRIES="${RCCL_TESTS_BCAST_CONN_RETRIES}" \
RCCL_TESTS_BCAST_XENV="${bcast_xenv}" \
Expand Down
Loading