mirror of
https://github.com/autoscriptlabs/nccl-mesh-plugin.git
synced 2026-01-11 11:34:06 +00:00
Initial release: NCCL Mesh Plugin for direct-connect RDMA topologies
- Enables NCCL over multi-subnet mesh topologies - 8+ GB/s bandwidth over 100Gbps RDMA - Successfully tested with distributed LLM inference (Mistral-7B) - Custom subnet-aware NIC selection - Background handshake thread for deadlock-free connection setup
This commit is contained in:
commit
031bc48953
13 changed files with 3074 additions and 0 deletions
56
Makefile
Normal file
56
Makefile
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
# NCCL Mesh Plugin Makefile
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -Wall -Wextra -O2 -fPIC -g
|
||||
CFLAGS += -I. -I./include
|
||||
LDFLAGS = -shared -libverbs -lpthread
|
||||
|
||||
# Target
|
||||
TARGET = libnccl-net.so
|
||||
TARGET_MESH = libnccl-net-mesh.so
|
||||
|
||||
# Sources
|
||||
SRCS = src/mesh_plugin.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
# Default target
|
||||
all: $(TARGET) $(TARGET_MESH)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
$(CC) $(OBJS) -o $@ $(LDFLAGS)
|
||||
|
||||
$(TARGET_MESH): $(TARGET)
|
||||
ln -sf $(TARGET) $(TARGET_MESH)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
# Install to a standard location
|
||||
PREFIX ?= /usr/local
|
||||
install: all
|
||||
install -d $(PREFIX)/lib
|
||||
install -m 755 $(TARGET) $(PREFIX)/lib/
|
||||
ln -sf $(TARGET) $(PREFIX)/lib/$(TARGET_MESH)
|
||||
|
||||
# Clean
|
||||
clean:
|
||||
rm -f $(OBJS) $(TARGET) $(TARGET_MESH)
|
||||
|
||||
# Test build (requires libibverbs-dev)
|
||||
test-deps:
|
||||
@echo "Checking dependencies..."
|
||||
@pkg-config --exists libibverbs || (echo "ERROR: libibverbs-dev not found" && exit 1)
|
||||
@echo "All dependencies found."
|
||||
|
||||
# Debug build
|
||||
debug: CFLAGS += -DDEBUG -g3 -O0
|
||||
debug: clean all
|
||||
|
||||
# Print configuration
|
||||
info:
|
||||
@echo "CC = $(CC)"
|
||||
@echo "CFLAGS = $(CFLAGS)"
|
||||
@echo "LDFLAGS = $(LDFLAGS)"
|
||||
@echo "TARGET = $(TARGET)"
|
||||
|
||||
.PHONY: all clean install test-deps debug info
|
||||
Loading…
Add table
Add a link
Reference in a new issue