Skip to content

Commit c27b81c

Browse files
committed
Fix minor issues
1 parent 8c388b3 commit c27b81c

4 files changed

Lines changed: 37 additions & 3 deletions

File tree

flagcx/adaptor/ccl/nccl_adaptor.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,18 @@ flagcxResult_t ncclAdaptorDevCommCreate(flagcxInnerComm_t comm,
420420
ncclReqs.ginContextCount = reqs->interContextCount;
421421
ncclReqs.ginCounterCount = reqs->interCounterCount;
422422

423+
#if NCCL_VERSION_CODE >= NCCL_VERSION(2, 29, 7)
424+
// GIN resources require an explicit connection type starting with 2.29.7.
425+
const bool needsFullGin = reqs->interForceEnable ||
426+
reqs->interSignalCount > 0 ||
427+
reqs->interCounterCount > 0;
428+
const bool needsRailGin =
429+
reqs->barrierCount > 0 || reqs->interBarrierCount > 0;
430+
ncclReqs.ginConnectionType = needsFullGin ? NCCL_GIN_CONNECTION_FULL
431+
: needsRailGin ? NCCL_GIN_CONNECTION_RAIL
432+
: NCCL_GIN_CONNECTION_NONE;
433+
#endif
434+
423435
flagcxResult_t ret =
424436
ncclDevCommCreateHelper(comm->base, &ncclReqs, &inner->base);
425437
if (ret != flagcxSuccess) {

flagcx/adaptor/include/device_api/nccl_comm_traits.h

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#ifndef FLAGCX_NCCL_COMM_TRAITS_H_
1212
#define FLAGCX_NCCL_COMM_TRAITS_H_
1313

14+
#include <stdio.h>
15+
1416
#include "nccl.h"
1517
#ifndef __CUDACC__
1618
#include "flagcx.h"
@@ -461,10 +463,28 @@ struct CommTraits<NcclBackend> {
461463
return flagcxInternalError;
462464
}
463465

464-
// --- get stub (fallback-only, vendor has no RDMA READ) ---
466+
// --- One-sided: get ---
465467
template <typename Coop>
466-
FLAGCX_DEVICE_INLINE_DECORATOR void get(Team, int, Window, size_t, Window,
467-
size_t, size_t, Coop) const {}
468+
FLAGCX_DEVICE_INLINE_DECORATOR void
469+
get(Team team, int peer, Window src, size_t srcOff, Window dst,
470+
size_t dstOff, size_t bytes, Coop coop) const {
471+
#if NCCL_VERSION_CODE >= NCCL_VERSION(2, 30, 7)
472+
_gin.get((ncclTeam_t)team, peer, src._impl, srcOff, dst._impl, dstOff,
473+
bytes, coop._impl);
474+
#else
475+
if (coop.threadRank() == 0) {
476+
printf("FLAGCX WARN: NCCL Device Get requires NCCL >= 2.30.7; "
477+
"operation is a no-op\n");
478+
}
479+
(void)team;
480+
(void)peer;
481+
(void)src;
482+
(void)srcOff;
483+
(void)dst;
484+
(void)dstOff;
485+
(void)bytes;
486+
#endif
487+
}
468488
};
469489
#endif // FLAGCX_CHECK_DEVICE_CC
470490
};

test/unittest/device_api/test_device_ir_unified_inter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ int main(int argc, char *argv[]) {
8888
// Inter suite uses 6 combinations (INTER + WORLD) for most tests
8989
// S18 uses 8 signal slots (includes extra BLOCK single-leader patterns)
9090
flagcxDevCommRequirements reqs = FLAGCX_DEV_COMM_REQUIREMENTS_INITIALIZER;
91+
reqs.barrierCount = FLAGCX_DEVICE_CTA_COUNT;
9192
reqs.intraBarrierCount = FLAGCX_DEVICE_CTA_COUNT;
9293
reqs.interBarrierCount = FLAGCX_DEVICE_CTA_COUNT;
9394
reqs.interSignalCount =

test/unittest/device_api/test_device_ir_unified_intra.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ int main(int argc, char *argv[]) {
8484
// Intra suite uses 6 combinations (INTRA + WORLD) for most tests
8585
// S18 uses 8 signal slots (includes extra BLOCK single-leader patterns)
8686
flagcxDevCommRequirements reqs = FLAGCX_DEV_COMM_REQUIREMENTS_INITIALIZER;
87+
reqs.barrierCount = FLAGCX_DEVICE_CTA_COUNT;
8788
reqs.intraBarrierCount = FLAGCX_DEVICE_CTA_COUNT;
8889
reqs.interBarrierCount = FLAGCX_DEVICE_CTA_COUNT;
8990
reqs.interSignalCount =

0 commit comments

Comments
 (0)