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.
This commit is contained in:
parent
9db4b1d801
commit
60a586ded9
@ -26,6 +26,7 @@ LIBDIR := $(BUILDDIR)/lib
|
|||||||
OBJDIR := $(BUILDDIR)/obj
|
OBJDIR := $(BUILDDIR)/obj
|
||||||
PKGDIR := $(BUILDDIR)/lib/pkgconfig
|
PKGDIR := $(BUILDDIR)/lib/pkgconfig
|
||||||
##### target files
|
##### target files
|
||||||
|
CUDARTLIB ?= cudart_static
|
||||||
INCTARGETS := $(INCEXPORTS:%=$(INCDIR)/%)
|
INCTARGETS := $(INCEXPORTS:%=$(INCDIR)/%)
|
||||||
LIBSONAME := $(LIBNAME:%=%.$(NCCL_MAJOR))
|
LIBSONAME := $(LIBNAME:%=%.$(NCCL_MAJOR))
|
||||||
LIBTARGET := $(LIBNAME:%=%.$(NCCL_MAJOR).$(NCCL_MINOR).$(NCCL_PATCH))
|
LIBTARGET := $(LIBNAME:%=%.$(NCCL_MAJOR).$(NCCL_MINOR).$(NCCL_PATCH))
|
||||||
@ -33,7 +34,7 @@ STATICLIBTARGET := $(STATICLIBNAME)
|
|||||||
PKGTARGET := $(PKGCONFIGFILE)
|
PKGTARGET := $(PKGCONFIGFILE)
|
||||||
LIBOBJ := $(LIBSRCFILES:%.cc=$(OBJDIR)/%.o)
|
LIBOBJ := $(LIBSRCFILES:%.cc=$(OBJDIR)/%.o)
|
||||||
DEPFILES := $(LIBOBJ:%.o=%.d)
|
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
|
DEVICELIB := $(BUILDDIR)/obj/collectives/device/colldevice.a
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user