Skip to content
Merged
Show file tree
Hide file tree
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: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ USE_AMD ?= 0
USE_DU ?= 0
USE_MPI ?= 0
USE_UCX ?= 0
USE_IBUC ?= 0

# set to empty if not provided
DEVICE_HOME ?=
Expand Down Expand Up @@ -224,6 +225,11 @@ else
NET_ADAPTOR_FLAG =
endif

# IBUC network adaptor configuration
ifeq ($(USE_IBUC), 1)
NET_ADAPTOR_FLAG += -DUSE_IBUC
endif

LIBDIR := $(BUILDDIR)/lib
OBJDIR := $(BUILDDIR)/obj

Expand Down Expand Up @@ -276,6 +282,7 @@ print_var:
@echo "UCX_HOME: $(UCX_HOME)"
@echo "UCX_LIB: $(UCX_LIB)"
@echo "UCX_INCLUDE: $(UCX_INCLUDE)"
@echo "USE_IBUC: $(USE_IBUC)"
@echo "NET_ADAPTOR_FLAG: $(NET_ADAPTOR_FLAG)"

$(LIBDIR)/$(TARGET): $(LIBOBJ)
Expand Down
7 changes: 7 additions & 0 deletions flagcx/adaptor/adaptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ struct flagcxDeviceAdaptor *deviceAdaptor = &hipAdaptor;
extern struct flagcxNetAdaptor flagcxNetSocket;
extern struct flagcxNetAdaptor flagcxNetIb;

#ifdef USE_IBUC
extern struct flagcxNetAdaptor flagcxNetIbuc;
#endif

#ifdef USE_UCX
extern struct flagcxNetAdaptor flagcxNetUcx;
#endif
Expand All @@ -135,6 +139,9 @@ struct flagcxNetAdaptor *getUnifiedNetAdaptor(int netType) {
#ifdef USE_UCX
// When UCX is enabled, use UCX instead of IBRC
return &flagcxNetUcx;
#elif USE_IBUC
// When IBUC is enabled, use IBUC instead of IBRC
return &flagcxNetIbuc;
#else
return &flagcxNetIb;
#endif
Expand Down
7 changes: 5 additions & 2 deletions flagcx/adaptor/include/adaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ extern struct flagcxNetAdaptor *netAdaptor;

// Network type enumeration
enum NetType {
IBRC = 1, // InfiniBand RC (or UCX when USE_UCX=1)
SOCKET = 2 // Socket
IBRC = 1, // InfiniBand RC (or UCX when USE_UCX=1)
SOCKET = 2, // Socket
#ifdef USE_IBUC
IBUC = 3 // InfiniBand UC
#endif
};

// Unified network adaptor function declarations
Expand Down
Loading