Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
move rpath to top
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhliu committed Aug 26, 2019
1 parent ab31df2 commit b885179
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ else
endif
CFLAGS += -I$(TPARTYDIR)/mshadow/ -I$(TPARTYDIR)/dmlc-core/include -fPIC -I$(NNVM_PATH)/include -I$(DLPACK_PATH)/include -I$(TPARTYDIR)/tvm/include -Iinclude $(MSHADOW_CFLAGS)
LDFLAGS = -pthread -ldl $(MSHADOW_LDFLAGS) $(DMLC_LDFLAGS)
LDFLAGS += -Wl,-rpath,'$${ORIGIN}'

ifeq ($(ENABLE_TESTCOVERAGE), 1)
CFLAGS += --coverage
Expand Down Expand Up @@ -154,7 +155,7 @@ ifeq ($(USE_MKLDNN), 1)
LDFLAGS += -L$(MKLROOT)/lib
endif
CFLAGS += -I$(MKLDNNROOT)/include
LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}'
LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn
endif

# setup opencv
Expand Down Expand Up @@ -601,7 +602,7 @@ DMLCCORE:
ifeq ($(USE_TVM_OP), 1)
LIB_DEP += lib/libtvm_runtime.so lib/libtvmop.so
CFLAGS += -I$(TVM_PATH)/include -DMXNET_USE_TVM_OP=1
LDFLAGS += -L$(ROOTDIR)/lib -ltvm_runtime -Wl,-rpath,'$${ORIGIN}'
LDFLAGS += -L$(ROOTDIR)/lib -ltvm_runtime

TVM_USE_CUDA := OFF
ifeq ($(USE_CUDA), 1)
Expand All @@ -619,7 +620,7 @@ lib/libtvm_runtime.so:
$(MAKE) VERBOSE=1; \
mkdir -p $(ROOTDIR)/lib; \
cp $(TVM_PATH)/build/libtvm_runtime.so $(ROOTDIR)/lib/libtvm_runtime.so; \
ls $(ROOTDIR); \
ls $(ROOTDIR)/lib; \
cd $(ROOTDIR)

lib/libtvmop.so: lib/libtvm_runtime.so $(wildcard contrib/tvmop/*/*.py contrib/tvmop/*.py)
Expand Down
2 changes: 2 additions & 0 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,8 @@ sanity_check() {
}

unittest_ubuntu_python2_cpu_cython() {
ls ./lib/
ldd ./lib/libmxnet.so
set -ex
export PYTHONPATH=./python/
export MXNET_MKLDNN_DEBUG=1
Expand Down

0 comments on commit b885179

Please sign in to comment.