From 1a5ae86706ff19a30931dd58b54042b3f5872706 Mon Sep 17 00:00:00 2001 From: Yizhi Liu Date: Tue, 3 Sep 2019 10:15:15 -0700 Subject: [PATCH] add LD_LIBRARY_PATH into cmake tvm op --- CMakeLists.txt | 2 +- ci/docker/runtime_functions.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04b8f2dcbe5a..b6faf639a70e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -761,7 +761,7 @@ if(USE_TVM_OP) add_custom_command(TARGET mxnet POST_BUILD COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH="${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/python:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/tvm/topi/python:${CMAKE_CURRENT_SOURCE_DIR}/contrib" - LD_LIBRARY_PATH="${CMAKE_CURRENT_BINARY_DIR}/3rdparty/tvm:/usr/local/cuda/lib64:/usr/local/cuda/targets/x86_64-linux/lib/stubs:/usr/lib/x86_64-linux-gnu:/usr/local/cuda-10.1/compat" + LD_LIBRARY_PATH=${CMAKE_CURRENT_BINARY_DIR}:${CMAKE_CURRENT_BINARY_DIR}/3rdparty/tvm:$ENV{LD_LIBRARY_PATH} ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/contrib/tvmop/compile.py -o${CMAKE_CURRENT_BINARY_DIR}/libtvmop.so ) endif() diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index c24ff2d03f03..ca59e6390402 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -715,6 +715,7 @@ build_ubuntu_gpu_cmake_mkldnn() { set -ex cd /work/build build_ccache_wrappers + export LD_LIBRARY_PATH=/usr/local/cuda/compat:$LD_LIBRARY_PATH cmake \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ @@ -742,10 +743,10 @@ build_ubuntu_gpu_cmake() { cd /work/build build_ccache_wrappers echo "ls cuda path" - ls /usr/local/cuda/lib64 - ls /usr/local/cuda/targets/x86_64-linux/lib/stubs ls -l /usr/lib/x86_64-linux-gnu/ + ls -l /usr/local/cuda find /usr/ -name libcuda.so.1 + export LD_LIBRARY_PATH=/usr/local/cuda/compat:$LD_LIBRARY_PATH cmake \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \