Error:
[...] /.../cpp_deploy.cc:63: Verify dynamic loading from test_addone.so
terminate called after throwing an instance of 'dmlc::Error'
what(): [...] /dl/mxnet/3rdparty/tvm/src/runtime/module_util.cc:53: Check failed: ret == 0 (-1 vs. 0)
[...] /dl/mxnet/3rdparty/tvm/src/runtime/opencl/opencl_module.cc:63: Check failed: e == CL_SUCCESS OpenCL Error, code=-38: CL_INVALID_MEM_OBJECT
Stack trace returned 10 entries:
[bt] (0) /.../_builds/cpp_deploy(dmlc::StackTrace[abi:cxx11]()+0x54) [0x55d5ccb0c274]
[bt] (1) /.../_builds/cpp_deploy(dmlc::LogMessageFatal::~LogMessageFatal()+0x40) [0x55d5ccb0c570]
[bt] (2) /dl/mxnet/3rdparty/tvm/_builds/libtvm_runtime.so(tvm::runtime::OpenCLWrappedFunc::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*, void**) const+0x5b0) [0x7f3c9c6a6a40]
[bt] (3) /dl/mxnet/3rdparty/tvm/_builds/libtvm_runtime.so(std::_Function_handler<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*), tvm::runtime::detail::PackFuncVoidAddr_<4, tvm::runtime::OpenCLWrappedFunc>(tvm::runtime::OpenCLWrappedFunc, std::vector<tvm::runtime::detail::ArgConvertCode, std::allocator<tvm::runtime::detail::ArgConvertCode> > const&)::{lambda(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)#1}>::_M_invoke(std::_Any_data const&, tvm::runtime::TVMArgs&&, tvm::runtime::TVMRetValue*&&)+0xb6) [0x7f3c9c6a6ca6]
[bt] (4) /dl/mxnet/3rdparty/tvm/_builds/libtvm_runtime.so(TVMFuncCall+0x5e) [0x7f3c9c5fe8ce]
[bt] (5) /.../lib/test_addone.so(+0xa30) [0x7f3c998b2a30]
[bt] (6) /.../lib/test_addone.so(addone+0x19a) [0x7f3c998b289a]
[bt] (7) /dl/mxnet/3rdparty/tvm/_builds/libtvm_runtime.so(+0x51550) [0x7f3c9c625550]
[bt] (8) /.../_builds/cpp_deploy(std::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const+0x5a) [0x55d5ccb0cf2e]
[bt] (9) /.../_builds/cpp_deploy(tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<DLTensor*&, DLTensor*&>(DLTensor*&, DLTensor*&) const+0xc4) [0x55d5ccb0d1aa]
Stack trace returned 8 entries:
[bt] (0) /.../_builds/cpp_deploy(dmlc::StackTrace[abi:cxx11]()+0x54) [0x55d5ccb0c274]
[bt] (1) /dl/mxnet/3rdparty/tvm/_builds/libtvm_runtime.so(+0x51ca7) [0x7f3c9c625ca7]
[bt] (2) /.../_builds/cpp_deploy(std::function<void (tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*)>::operator()(tvm::runtime::TVMArgs, tvm::runtime::TVMRetValue*) const+0x5a) [0x55d5ccb0cf2e]
[bt] (3) /.../_builds/cpp_deploy(tvm::runtime::TVMRetValue tvm::runtime::PackedFunc::operator()<DLTensor*&, DLTensor*&>(DLTensor*&, DLTensor*&) const+0xc4) [0x55d5ccb0d1aa]
[bt] (4) /.../_builds/cpp_deploy(Verify(tvm::runtime::Module, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)+0x1f8) [0x55d5ccb0b603]
[bt] (5) /.../_builds/cpp_deploy(main+0x13f) [0x55d5ccb0b93f]
[bt] (6) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f3c9bc63b97]
[bt] (7) /.../_builds/cpp_deploy(_start+0x2a) [0x55d5ccb0b20a]
Used prepare_test_libs.py
: https://gist.github.com/ruslo/4fa15e70910abd371515a5c4890950af
Used cpp_deploy.cc
: https://gist.github.com/ruslo/eaee9838b9eeb0af342c1fb3061ffc55