SINGA-100 Implement layers using CUDNN for GPU training Fixs include path problems on cudnn. A reminder: Users should configure their library path(LD_LIBRARY_PATH & LIBRARY_PATH) after they install cudnn libs.
Project: http://git-wip-us.apache.org/repos/asf/incubator-singa/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-singa/commit/6f81adba Tree: http://git-wip-us.apache.org/repos/asf/incubator-singa/tree/6f81adba Diff: http://git-wip-us.apache.org/repos/asf/incubator-singa/diff/6f81adba Branch: refs/heads/master Commit: 6f81adba402bcd217dd020faa4188968b3200bb7 Parents: 05680dd Author: xiezl <[email protected]> Authored: Sat Dec 12 10:40:36 2015 +0800 Committer: xiezl <[email protected]> Committed: Sat Dec 12 10:44:21 2015 +0800 ---------------------------------------------------------------------- Makefile.am | 8 +++++++- configure.ac | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/6f81adba/Makefile.am ---------------------------------------------------------------------- diff --git a/Makefile.am b/Makefile.am index 1959fb6..90807be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -181,7 +181,7 @@ py_LTLIBRARIES = $(PY_PROGS) #lib_LTLIBRARIES = libsinga.la libsinga_la_SOURCES = $(PROTO_SRCS) $(SINGA_SRCS) libsinga_la_CXXFLAGS = $(DEFAULT_FLAGS) -msse3 -fpermissive -I$(top_srcdir)/include -libsinga_la_LDFLAGS = +libsinga_la_LDFLAGS = if LMDB libsinga_la_CXXFLAGS += -DUSE_LMDB endif @@ -191,6 +191,7 @@ libsinga_la_SOURCES += $(CUDA_SRCS) $(CUDA_HDRS) libsinga_la_CXXFLAGS += $(CUDA_CFLAGS) libsinga_la_LDFLAGS += $(CUDA_LDFLAGS) $(CUDA_LIBS) endif + if DCUDNN libsinga_la_SOURCES += $(CUDNN_SRCS) libsinga_la_CXXFLAGS += $(CUDNN_CFLAGS) @@ -218,6 +219,7 @@ singa_SOURCES += $(CUDA_SRCS) $(CUDA_HDRS) singa_CXXFLAGS += $(CUDA_CFLAGS) singa_LDFLAGS += $(CUDA_LDFLAGS) $(CUDA_LIBS) endif + if DCUDNN singa_SOURCES += $(CUDNN_SRCS) singa_CXXFLAGS += $(CUDNN_CFLAGS) @@ -232,11 +234,13 @@ singatool_LDFLAGS = -lsinga \ -lglog \ -lprotobuf \ -lzookeeper_mt + if DCUDA singatool_SOURCES += $(CUDA_SRCS) $(CUDA_HDRS) singatool_CXXFLAGS += $(CUDA_CFLAGS) singatool_LDFLAGS += $(CUDA_LDFLAGS) $(CUDA_LIBS) endif + if DCUDNN singatool_SOURCES += $(CUDNN_SRCS) singatool_CXXFLAGS += $(CUDNN_CFLAGS) @@ -268,11 +272,13 @@ singatest_LDFLAGS = -lsinga \ if LMDB singatest_LDFLAGS += -llmdb endif + if DCUDA singatest_SOURCES += $(CUDA_SRCS) $(CUDA_HDRS) singatest_CXXFLAGS += $(CUDA_CFLAGS) singatest_LDFLAGS += $(CUDA_LDFLAGS) $(CUDA_LIBS) endif + if DCUDNN singatest_SOURCES += $(CUDNN_SRCS) singatest_CXXFLAGS += $(CUDNN_CFLAGS) http://git-wip-us.apache.org/repos/asf/incubator-singa/blob/6f81adba/configure.ac ---------------------------------------------------------------------- diff --git a/configure.ac b/configure.ac index 85cc5fb..1127994 100644 --- a/configure.ac +++ b/configure.ac @@ -100,9 +100,9 @@ AM_CONDITIONAL(DCUDNN, [test "$enable_cudnn" = "yes"]) AC_ARG_WITH([cudnn], [AS_HELP_STRING([--with-cudnn=PATH], [prefix where CUDNN is installed])], - [cudnn_prefix=$cudnnwithval], [cudnn_prefix="/usr/local/cuda"]) + [cudnn_prefix=$withval], [cudnn_prefix="/usr/local/cuda"]) if test "$cudnn_prefix" == "yes"; then - if test "$cudnnwithval" == "yes"; then + if test "$withval" == "yes"; then cudnn_prefix="/usr/local/cuda" fi fi
