Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/nccl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakirkham <conv.ivlc8fxjd7ur5d@fleep.io>2019-05-08 03:35:14 +0300
committerSylvain Jeaugey <sjeaugey@nvidia.com>2019-05-08 03:35:14 +0300
commit60a586ded9312c201cf3ed59818b23514d4a9888 (patch)
tree46264fdd6139dec3bf5905b19007f699d0f0d374
parent9db4b1d801624a00591b7aafd426d6dd23547443 (diff)
Allow CUDA runtime library selection (#220)
Makes a change to allow the user to select between the static CUDA runtime library (default) and the dynamic CUDA runtime library. Does this by allowing `CUDARTLIB` to be overridden.
-rw-r--r--src/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile
index b5baa29..452adf5 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -26,6 +26,7 @@ LIBDIR := $(BUILDDIR)/lib
OBJDIR := $(BUILDDIR)/obj
PKGDIR := $(BUILDDIR)/lib/pkgconfig
##### target files
+CUDARTLIB ?= cudart_static
INCTARGETS := $(INCEXPORTS:%=$(INCDIR)/%)
LIBSONAME := $(LIBNAME:%=%.$(NCCL_MAJOR))
LIBTARGET := $(LIBNAME:%=%.$(NCCL_MAJOR).$(NCCL_MINOR).$(NCCL_PATCH))
@@ -33,7 +34,7 @@ STATICLIBTARGET := $(STATICLIBNAME)
PKGTARGET := $(PKGCONFIGFILE)
LIBOBJ := $(LIBSRCFILES:%.cc=$(OBJDIR)/%.o)
DEPFILES := $(LIBOBJ:%.o=%.d)
-LDFLAGS += -L${CUDA_LIB} -lcudart_static -lpthread -lrt -ldl
+LDFLAGS += -L${CUDA_LIB} -l$(CUDARTLIB) -lpthread -lrt -ldl
DEVICELIB := $(BUILDDIR)/obj/collectives/device/colldevice.a