Any interest in static library libtvm_runtime.a?

I’m wondering if there is any interest in being able to build a static version of the TVM runtime library.

I’m working on some utility that would use the TVM runtime, but cannot link directly with a shared object (some local limitation), so I can either load libtvm_runtime.so via dlsym, which is painful, because all functions need to be accessed through pointers, or I can link with a static version.

It seems like adding an option to CMakeLists.txt to allow libtvm_runtime to be a static library is easy, and I’m wondering if anyone else would be interested in having this possibility.

2 Likes

I think it certainly make sense. However, we need to note that in order to link we will need a whole archive option to the use of registration mechanism.

i’d support this, i believe we already build something like this for unit testing.

We could also use the static library instead of manually packing the runtime files in apps/.

1 Like

PR: Add flag to build static version of TVM runtime by kparzysz-quic · Pull Request #8059 · apache/tvm · GitHub

Hi @tqchen @areusch @kparzysz ,

When I link the static library in my project, I got a lot undefined reference. Could you please help me with it?

I use the following set in the cmake file: target_link_libraries(tvm_try -WL, —whole-archive libtvm_runtime.a -WL, —no-whole-archive)

Everything works with dynamic library.

Could you send some more specifics (terminal log) so we can see if we can reproduce?

Sure.

I set set(BUILD_STATIC_RUNTIME ON) in the config.cmake file. Then use make runtime to get the static library libtvm_runtime.a.

Then I copy libtvm_runtime.a to my project, and set the cmake file

cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(tvm_cpp)


add_executable(tvm_try tvm_try.cpp)

include_directories(include/)

target_link_libraries(tvm_try "-Wl,--whole-archive" ${PROJECT_SOURCE_DIR}/lib/libtvm_runtime.a "-Wl,--no-whole-archive")

set_property(TARGET tvm_try PROPERTY CXX_STANDARD 14)

When I make the file, I get following eror:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/tc/agx_tvm_cpp/build
[ 50%] Building CXX object CMakeFiles/tvm_try.dir/tvm_try.cpp.o
[100%] Linking CXX executable tvm_try
../lib/libtvm_runtime.a(logging.cc.o): In function `tvm::runtime::Backtrace[abi:cxx11]()':
logging.cc:(.text+0xf9c): undefined reference to `backtrace_full'
../lib/libtvm_runtime.a(logging.cc.o): In function `tvm::runtime::(anonymous namespace)::BacktraceFullCallback(void*, unsigned long, char const*, int, char const*)':
logging.cc:(.text+0x2268): undefined reference to `backtrace_syminfo'
../lib/libtvm_runtime.a(logging.cc.o): In function `_GLOBAL__sub_I_logging.cc':
logging.cc:(.text.startup+0x4c): undefined reference to `backtrace_create_state'
../lib/libtvm_runtime.a(threading_backend.cc.o): In function `tvm::runtime::threading::ThreadGroup::ThreadGroup(int, std::function<void (int)>, bool)':
threading_backend.cc:(.text+0x7f0): undefined reference to `pthread_create'
threading_backend.cc:(.text+0x7fc): undefined reference to `pthread_create'
../lib/libtvm_runtime.a(threading_backend.cc.o): In function `void std::vector<std::thread, std::allocator<std::thread> >::_M_realloc_insert<tvm::runtime::threading::ThreadGroup::Impl::Impl(int, std::function<void (int)>, bool)::{lambda()#1}>(__gnu_cxx::__normal_iterator<std::thread*, std::vector<std::thread, std::allocator<std::thread> > >, tvm::runtime::threading::ThreadGroup::Impl::Impl(int, std::function<void (int)>, bool)::{lambda()#1}&&)':
threading_backend.cc:(.text._ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJZN3tvm7runtime9threading11ThreadGroup4ImplC4EiSt8functionIFviEEbEUlvE_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJZN3tvm7runtime9threading11ThreadGroup4ImplC4EiSt8functionIFviEEbEUlvE_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0xb8): undefined reference to `pthread_create'
threading_backend.cc:(.text._ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJZN3tvm7runtime9threading11ThreadGroup4ImplC4EiSt8functionIFviEEbEUlvE_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_[_ZNSt6vectorISt6threadSaIS0_EE17_M_realloc_insertIJZN3tvm7runtime9threading11ThreadGroup4ImplC4EiSt8functionIFviEEbEUlvE_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_]+0xe8): undefined reference to `pthread_create'
../lib/libtvm_runtime.a(threading_backend.cc.o): In function `tvm::runtime::threading::ThreadGroup::Impl::SetAffinity(bool, tvm::runtime::threading::ThreadGroup::AffinityMode)':
threading_backend.cc:(.text._ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE[_ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE]+0x1d8): undefined reference to `pthread_setaffinity_np'
threading_backend.cc:(.text._ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE[_ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE]+0x368): undefined reference to `pthread_setaffinity_np'
threading_backend.cc:(.text._ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE[_ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE]+0x574): undefined reference to `pthread_setaffinity_np'
threading_backend.cc:(.text._ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE[_ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE]+0x8cc): undefined reference to `pthread_setaffinity_np'
threading_backend.cc:(.text._ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE[_ZN3tvm7runtime9threading11ThreadGroup4Impl11SetAffinityEbNS2_12AffinityModeE]+0x9fc): undefined reference to `pthread_setaffinity_np'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GetCudaFreeMemory()':
cuda_device_api.cc:(.text+0xf48): undefined reference to `cudaMemGetInfo'
cuda_device_api.cc:(.text+0x14e0): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Timer (DLDevice)>::AssignTypedLambda<tvm::runtime::{lambda(DLDevice)#3}>(tvm::runtime::{lambda(DLDevice)#3}, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, tvm::runtime::TVMRetValue)':
cuda_device_api.cc:(.text+0x1774): undefined reference to `cudaEventCreate'
cuda_device_api.cc:(.text+0x1788): undefined reference to `cudaEventCreate'
cuda_device_api.cc:(.text+0x1d5c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text+0x1df4): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::SyncStreamFromTo(DLDevice, void*, void*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x30): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x44): undefined reference to `cudaEventCreate'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x5c): undefined reference to `cudaEventRecord'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x78): undefined reference to `cudaStreamWaitEvent'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x8c): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x140): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x1dc): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x26c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x2fc): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_[_ZN3tvm7runtime13CUDADeviceAPI16SyncStreamFromToE8DLDevicePvS3_]+0x38c): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::StreamSync(DLDevice, void*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv]+0x2c): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv]+0x40): undefined reference to `cudaStreamSynchronize'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv]+0xf4): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10StreamSyncE8DLDevicePv]+0x190): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::FreeStream(DLDevice, void*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv]+0x2c): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv]+0x40): undefined reference to `cudaStreamDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv]+0xf4): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI10FreeStreamE8DLDevicePv]+0x190): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::CreateStream(DLDevice)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice]+0x24): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice]+0x38): undefined reference to `cudaStreamCreate'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice]+0xec): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI12CreateStreamE8DLDevice]+0x188): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::FreeDataSpace(DLDevice, void*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x34): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x48): undefined reference to `cudaFree'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x80): undefined reference to `cudaFreeHost'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x10c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x1a8): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv[_ZN3tvm7runtime13CUDADeviceAPI13FreeDataSpaceE8DLDevicePv]+0x238): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::SetDevice(DLDevice)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI9SetDeviceE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI9SetDeviceE8DLDevice]+0x24): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI9SetDeviceE8DLDevice[_ZN3tvm7runtime13CUDADeviceAPI9SetDeviceE8DLDevice]+0xd0): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GPUTimerNode::~GPUTimerNode()':
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD2Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0x38): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD2Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0x48): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD2Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0xf8): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GPUTimerNode::SyncAndGetElapsedNanos()':
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv[_ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv]+0x2c): undefined reference to `cudaEventSynchronize'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv[_ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv]+0x44): undefined reference to `cudaEventElapsedTime'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv[_ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv]+0x110): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv[_ZN3tvm7runtime12GPUTimerNode22SyncAndGetElapsedNanosEv]+0x1ac): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GPUTimerNode::Stop()':
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode4StopEv[_ZN3tvm7runtime12GPUTimerNode4StopEv]+0x30): undefined reference to `cudaEventRecord'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode4StopEv[_ZN3tvm7runtime12GPUTimerNode4StopEv]+0xd8): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GPUTimerNode::Start()':
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode5StartEv[_ZN3tvm7runtime12GPUTimerNode5StartEv]+0x30): undefined reference to `cudaEventRecord'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNode5StartEv[_ZN3tvm7runtime12GPUTimerNode5StartEv]+0xd8): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::GetAttr(DLDevice, tvm::runtime::DeviceAttrKind, tvm::runtime::TVMRetValue*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x74): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xf8): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x114): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x130): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x53c): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x5c8): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x6ac): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x6e4): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x8e0): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x96c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x98c): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xa18): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xa38): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xa78): undefined reference to `cuDeviceGetName'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xbc8): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xc54): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xc88): undefined reference to `cudaDeviceGetAttribute'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0xd14): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x1448): undefined reference to `cuGetErrorName'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x1534): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x161c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x16ac): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x1754): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x1828): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o):cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE[_ZN3tvm7runtime13CUDADeviceAPI7GetAttrE8DLDeviceNS0_14DeviceAttrKindEPNS0_11TVMRetValueE]+0x18c0): more undefined references to `cudaGetErrorString' follow
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::GPUTimerNode::~GPUTimerNode()':
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD0Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0x38): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD0Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0x4c): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime12GPUTimerNodeD0Ev[_ZN3tvm7runtime12GPUTimerNodeD5Ev]+0x108): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::SimpleObjAllocator::Handler<tvm::runtime::GPUTimerNode>::Deleter_(tvm::runtime::Object*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE[_ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE]+0x44): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE[_ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE]+0x58): undefined reference to `cudaEventDestroy'
cuda_device_api.cc:(.text._ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE[_ZN3tvm7runtime18SimpleObjAllocator7HandlerINS0_12GPUTimerNodeEE8Deleter_EPNS0_6ObjectE]+0x124): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::CopyDataFromTo(void const*, unsigned long, void*, unsigned long, unsigned long, DLDevice, DLDevice, DLDataType, void*)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0xb0): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0xd8): undefined reference to `cudaMemcpyAsync'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x164): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x194): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x1bc): undefined reference to `cudaMemcpyAsync'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x208): undefined reference to `cudaMemcpy'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x294): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x2ac): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x2dc): undefined reference to `cudaMemcpyPeerAsync'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x340): undefined reference to `cudaMemcpyAsync'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x3cc): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x3f0): undefined reference to `cudaMemcpy'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x47c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x4a0): undefined reference to `cudaMemcpy'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x52c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x5c0): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x650): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x6f8): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_[_ZN3tvm7runtime13CUDADeviceAPI14CopyDataFromToEPKvmPvmm8DLDeviceS5_10DLDataTypeS4_]+0x788): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_device_api.cc.o): In function `tvm::runtime::CUDADeviceAPI::AllocDataSpace(DLDevice, unsigned long, unsigned long, DLDataType)':
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x50): undefined reference to `cudaSetDevice'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x68): undefined reference to `cudaMemGetInfo'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x80): undefined reference to `cudaMalloc'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0xc0): undefined reference to `cudaMallocHost'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x14c): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x2c8): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x358): undefined reference to `cudaGetErrorString'
cuda_device_api.cc:(.text._ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType[_ZN3tvm7runtime13CUDADeviceAPI14AllocDataSpaceE8DLDevicemm10DLDataType]+0x3e8): undefined reference to `cudaGetErrorString'
../lib/libtvm_runtime.a(cuda_module.cc.o): In function `tvm::runtime::CUDAWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*, void**) const':
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x44): undefined reference to `cudaGetDevice'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x11c): undefined reference to `cuLaunchKernel'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x164): undefined reference to `cuGetErrorName'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x400): undefined reference to `cuModuleGetFunction'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x454): undefined reference to `cuFuncSetAttribute'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x514): undefined reference to `cuModuleLoadData'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x5d8): undefined reference to `cudaGetErrorString'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x644): undefined reference to `cuGetErrorName'
cuda_module.cc:(.text._ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv[_ZNK3tvm7runtime15CUDAWrappedFuncclENS0_7TVMArgsEPNS0_11TVMRetValueEPPv]+0x6bc): undefined reference to `cuGetErrorName'
../lib/libtvm_runtime.a(cuda_module.cc.o): In function `tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::CUDAPrepGlobalBarrier> >::Call(tvm::runtime::PackedFuncObj const*, tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)':
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x38): undefined reference to `cudaGetDevice'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0xc8): undefined reference to `cuModuleGetGlobal_v2'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x138): undefined reference to `cuMemsetD32_v2'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x184): undefined reference to `cuModuleLoadData'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x2ec): undefined reference to `cudaGetErrorString'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x310): undefined reference to `cuGetErrorName'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x354): undefined reference to `cuGetErrorName'
cuda_module.cc:(.text._ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE[_ZN3tvm7runtime13PackedFuncObj9ExtractorINS0_16PackedFuncSubObjINS0_21CUDAPrepGlobalBarrierEEEE4CallEPKS1_NS0_7TVMArgsEPNS0_11TVMRetValueE]+0x3d0): undefined reference to `cuGetErrorName'
../lib/libtvm_runtime.a(cuda_module.cc.o): In function `tvm::runtime::CUDAModuleNode::~CUDAModuleNode()':
cuda_module.cc:(.text._ZN3tvm7runtime14CUDAModuleNodeD2Ev[_ZN3tvm7runtime14CUDAModuleNodeD5Ev]+0x54): undefined reference to `cudaSetDevice'
cuda_module.cc:(.text._ZN3tvm7runtime14CUDAModuleNodeD2Ev[_ZN3tvm7runtime14CUDAModuleNodeD5Ev]+0x68): undefined reference to `cuModuleUnload'
cuda_module.cc:(.text._ZN3tvm7runtime14CUDAModuleNodeD2Ev[_ZN3tvm7runtime14CUDAModuleNodeD5Ev]+0x1e8): undefined reference to `cudaGetErrorString'
cuda_module.cc:(.text._ZN3tvm7runtime14CUDAModuleNodeD2Ev[_ZN3tvm7runtime14CUDAModuleNodeD5Ev]+0x208): undefined reference to `cuGetErrorName'
../lib/libtvm_runtime.a(dso_library.cc.o): In function `tvm::runtime::DSOLibrary::GetSymbol_(char const*)':
dso_library.cc:(.text+0xec): undefined reference to `dlsym'
../lib/libtvm_runtime.a(dso_library.cc.o): In function `tvm::runtime::DSOLibrary::Unload()':
dso_library.cc:(.text+0x10c): undefined reference to `dlclose'
../lib/libtvm_runtime.a(dso_library.cc.o): In function `tvm::runtime::DSOLibrary::Load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
dso_library.cc:(.text+0x19c): undefined reference to `dlopen'
dso_library.cc:(.text+0x264): undefined reference to `dlerror'
collect2: error: ld returned 1 exit status
CMakeFiles/tvm_try.dir/build.make:95: recipe for target 'tvm_try' failed
make[2]: *** [tvm_try] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/tvm_try.dir/all' failed
make[1]: *** [CMakeFiles/tvm_try.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

I got it. I need to add some extra command.

we need to link cuda pthread…manually.

Thanks for your help.

glad you were able to solve this @chongt123 and thanks for posting up the resolution!