From e1634ca6cb5ff26ffd0ba6a7dd5a4ea80f6a400e Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Fri, 18 Dec 2015 12:00:30 -0800 Subject: [PATCH 1/4] Use semantic versioning --- Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index db697ba..2096db2 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,9 @@ MPIFLAGS := -I$(MPI_HOME)/include -L$(MPI_HOME)/lib -lmpi INCEXPORTS := nccl.h LIBSRCFILES := libwrap.cu core.cu all_gather.cu all_reduce.cu broadcast.cu reduce.cu reduce_scatter.cu LIBNAME := libnccl.so -APIVER := 0 +VER_MAJOR := 1 +VER_MINOR := 0 +VER_PATCH := 0 TESTS := all_gather_test all_reduce_test broadcast_test reduce_test reduce_scatter_test MPITESTS := mpi_test @@ -66,7 +68,8 @@ TSTDIR := $(BUILDDIR)/test MPITSTDIR := $(BUILDDIR)/mpitest INCTARGETS := $(patsubst %, $(INCDIR)/%, $(INCEXPORTS)) -LIBTARGET := $(patsubst %, $(LIBDIR)/%.$(APIVER), $(LIBNAME)) +LIBSONAME := $(patsubst %,%.$(VER_MAJOR),$(LIBNAME)) +LIBTARGET := $(patsubst %,%.$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH),$(LIBNAME)) LIBLINK := $(patsubst lib%.so, -l%, $(LIBNAME)) LIBOBJ := $(patsubst %.cu, $(OBJDIR)/%.o, $(filter %.cu, $(LIBSRCFILES))) TESTBINS := $(patsubst %, $(TSTDIR)/%, $(TESTS)) @@ -80,8 +83,9 @@ lib : $(INCTARGETS) $(LIBTARGET) $(LIBTARGET) : $(LIBOBJ) @printf "Linking %-25s\n" $@ @mkdir -p $(LIBDIR) - @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBNAME).$(APIVER) -o $@ $(LDFLAGS) $(LIBOBJ) - @ln -sf $(LIBNAME).$(APIVER) $(LIBDIR)/$(LIBNAME) + @$(GPP) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(LIBSONAME) -o $(LIBDIR)/$@ $(LDFLAGS) $(LIBOBJ) + @ln -sf $(LIBSONAME) $(LIBDIR)/$(LIBNAME) + @ln -sf $(LIBTARGET) $(LIBDIR)/$(LIBSONAME) $(INCDIR)/%.h : src/%.h @printf "Grabbing %-25s > %-25s\n" $< $@ From dd0884b7076a4827f99720c8256fec4a9605614f Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Fri, 18 Dec 2015 13:12:09 -0800 Subject: [PATCH 2/4] Build SM 5.0 code --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index db697ba..75c8322 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,7 @@ PREFIX ?= /usr/local VERBOSE ?= 0 CUDACODE := -gencode=arch=compute_35,code=sm_35 \ + -gencode=arch=compute_50,code=sm_50 \ -gencode=arch=compute_52,code=sm_52 BUILDDIR := build From b5400c54dfd519b51cf72240dcc670d5f0b3cd2e Mon Sep 17 00:00:00 2001 From: Boris Fomitchev Date: Fri, 18 Dec 2015 13:26:51 -0800 Subject: [PATCH 3/4] Don't link tests with NVML --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index db697ba..ed8743a 100644 --- a/Makefile +++ b/Makefile @@ -106,8 +106,8 @@ test : lib $(TESTBINS) $(TSTDIR)/% : src/%.cu lib @printf "Building %-25s > %-24s\n" $< $@ @mkdir -p $(TSTDIR) - @$(NVCC) -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt -lnvidia-ml - @$(NVCC) -M -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt -lnvidia-ml > $(@:%=%.d.tmp) + @$(NVCC) -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" -o $@ $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt + @$(NVCC) -M -Ibuild/include $(CPPFLAGS) $(NVCUFLAGS) --compiler-options "$(CXXFLAGS)" $< -Lbuild/lib $(LIBLINK) $(LDFLAGS) -lcuda -lcurand -lnvToolsExt > $(@:%=%.d.tmp) @sed "0,/^.*:/s//$(subst /,\/,$@):/" $(@:%=%.d.tmp) > $(@:%=%.d) @sed -e 's/.*://' -e 's/\\$$//' < $(@:%=%.d.tmp) | fmt -1 | \ sed -e 's/^ *//' -e 's/$$/:/' >> $(@:%=%.d) From d332c41e715cd06f93e5ccb88f597f1e2efc2581 Mon Sep 17 00:00:00 2001 From: Kaiyu Yang Date: Thu, 24 Dec 2015 00:01:02 +0800 Subject: [PATCH 4/4] fix a typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7722ce9..6606b7c 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ Test binaries are located in the subdirectories nccl/build/test and nccl/build/m ```shell $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./build/lib -$ ./build/test/allreduce_test +$ ./build/test/all_reduce_test Error: must specify at least data size in bytes! Tests nccl AllReduce with user supplied arguments.