Skip to content

Commit

Permalink
Build fastsocket plugin from ext-net
Browse files Browse the repository at this point in the history
  • Loading branch information
changlan authored and sjeaugey committed Dec 9, 2021
1 parent c88c9f8 commit c5790b3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ext-net/google-fastsocket/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CUDA_HOME?=/usr/local/cuda
INC:=-I$(CUDA_HOME)/include
PLUGIN_SO:=../../build/libnccl-net.so

default: $(PLUGIN_SO)

$(PLUGIN_SO): nccl-fastsocket/net_fastsocket.cc nccl-fastsocket/compat.cc
$(CC) $(INC) -fPIC -shared -o $@ -Wl,-soname,$(PLUGIN_SO) $^

nccl-fastsocket/%.cc:
git clone https://github.com/google/nccl-fastsocket.git

install: $(BUILDDIR)/lib/$(PLUGIN_SO)

$(BUILDDIR)/lib/$(PLUGIN_SO): $(PLUGIN_SO)
@printf "Grabbing %-35s > %s\n" $< $@
mkdir -p $(BUILDDIR)/lib
install -m 644 $< $@

clean:
rm -f $(PLUGIN_SO)
rm -Rf nccl-fastsocket

0 comments on commit c5790b3

Please sign in to comment.