Skip to content

Commit a40ef90

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

5 files changed

Lines changed: 38 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: 18 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,23 @@ struct CommTraits<NcclBackend> {
461463
return flagcxInternalError;
462464
}
463465

464-
// --- get stub (fallback-only, vendor has no RDMA READ) ---
466+
// --- One-sided: get (unsupported by the NCCL backend) ---
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 (coop.threadRank() == 0) {
472+
printf("FLAGCX WARN: NCCL Device Get is unsupported; operation is a "
473+
"no-op\n");
474+
}
475+
(void)team;
476+
(void)peer;
477+
(void)src;
478+
(void)srcOff;
479+
(void)dst;
480+
(void)dstOff;
481+
(void)bytes;
482+
}
468483
};
469484
#endif // FLAGCX_CHECK_DEVICE_CC
470485
};

test/kernel/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,14 @@ all:
1616
USE_SHMEM=$(USE_SHMEM) SHMEM_HOME=$(SHMEM_HOME) \
1717
FORCE_DEFAULT_PATH=$(FORCE_DEFAULT_PATH)
1818

19+
ifeq ($(strip $(KERNEL_PLATFORM)),)
20+
clean:
21+
@$(MAKE) -C $(CURDIR)/nvidia clean
22+
@$(MAKE) -C $(CURDIR)/du clean
23+
else
1924
clean:
2025
@$(MAKE) -C $(KERNEL_PLATFORM_DIR) clean
26+
endif
2127

2228
$(FORWARD_TARGETS):
2329
@$(MAKE) -C $(KERNEL_PLATFORM_DIR) $@ \

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)