Skip to content

Commit

Permalink
Use shared libcudart patch
Browse files Browse the repository at this point in the history
Make sure that `libcudart` is a shared library dependency.
  • Loading branch information
jakirkham committed Oct 1, 2019
1 parent 81431a0 commit 5597622
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/nccl/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package:
source:
url: https://github.com/NVIDIA/nccl/archive/v{{ version }}-{{ revision }}.tar.gz
sha256: ea4421061a7b9c454f2e088f68bfdbbcefab80ce81cafc70ee6c7742b1439591
patches:
- use_shared_libcudart.patch

build:
number: 0
Expand Down
22 changes: 22 additions & 0 deletions recipes/nccl/use_shared_libcudart.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
From 4182db73f9e38930027a6766c7ab649783510ac0 Mon Sep 17 00:00:00 2001
From: John Kirkham <[email protected]>
Date: Tue, 7 May 2019 03:54:54 -0400
Subject: [PATCH] Link `libcudart` dynamically

---
src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/Makefile src/Makefile
index 2d32dca78..b6022124a 100644
--- src/Makefile
+++ src/Makefile
@@ -29,7 +29,7 @@ LIBTARGET := $(LIBNAME:%=%.$(NCCL_MAJOR).$(NCCL_MINOR).$(NCCL_PATCH))
STATICLIBTARGET := $(STATICLIBNAME)
LIBOBJ := $(LIBSRCFILES:%.cc=$(OBJDIR)/%.o)
DEPFILES := $(LIBOBJ:%.o=%.d)
-LDFLAGS += -L${CUDA_LIB} -lcudart_static -lpthread -lrt -ldl
+LDFLAGS += -L${CUDA_LIB} -lcudart -lpthread -lrt -ldl

DEVICELIB := $(BUILDDIR)/obj/collectives/device/colldevice.a

0 comments on commit 5597622

Please sign in to comment.