I'm using tvm on Mac OSX.
It builds successfully with the latest tvm source code for libtvm_runtime.dylib.
But when running with the executable binary, the binary aborted abnormally, which says
tvm/src/runtime/registry.cc:57: Check failed: override Global PackedFunc __tvm_set_device is already registered
Stack trace returned 10 entries:
[bt] (0) 0 libtvm.dylib 0x00000001162da176 dmlc::StackTrace() + 246
[bt] (1) 1 libtvm.dylib 0x00000001162d9ffe dmlc::LogMessageFatal::~LogMessageFatal() + 46
[bt] (2) 2 libtvm.dylib 0x00000001167e6bca tvm::runtime::Registry::Register(std::__1::basic_string
[bt] (3) 3 libtvm.dylib 0x00000001167daf09 _GLOBAL__sub_I_c_runtime_api.cc + 89
[bt] (4) 4 ??? 0x0000000100164cc8 0x0 + 4296428744
[bt] (5) 5 ??? 0x0000000100164ec6 0x0 + 4296429254
[bt] (6) 6 ??? 0x00000001001600da 0x0 + 4296409306
[bt] (7) 7 ??? 0x000000010016006d 0x0 + 4296409197
[bt] (8) 8 ??? 0x000000010016006d 0x0 + 4296409197
[bt] (9) 9 ??? 0x000000010016006d 0x0 + 4296409197
I've no idea why this kind of error occurs, is there anything wrong when using the tvm shared libraries?
Would you please move to https://discuss.tvm.ai/ and provide the script you were trying to run, as well as how you created the binary?
@sunstarchan hi, i meet same error, have you solved it ?
When trying to run c++ api deploy(jni) on android with audio studio3, I am seeing three errors as listed below:
--------- beginning of crash
2019-06-25 19:54:56.505 13683-13683/com.xxxx A/libc: /usr/local/google/buildbot/src/android/ndk-r15-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char , ...): assertion "terminating with uncaught exception of type dmlc::Error: [19:54:56] /workspace/src/runtime/registry.cc:79: Check failed: override: Global PackedFunc __tvm_set_device is already registered" failed
2019-06-25 19:54:56.505 13683-13683/com.xxxx A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 13683 (com.xxxx)
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: *
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: Build fingerprint: 'Android/rk3288/rk3288:7.1.2/NHG47K/eric03211536:userdebug/test-keys'
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: Revision: '0'
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: ABI: 'arm'
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: pid: 13683, tid: 13683, name: com.xxxx >>> com.xxxx <<<
2019-06-25 19:54:56.569 13703-13703/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
2019-06-25 19:54:56.573 13703-13703/? A/DEBUG: Abort message: '/usr/local/google/buildbot/src/android/ndk-r15-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type dmlc::Error: [19:54:56] /workspace/src/runtime/registry.cc:79: Check failed: override: Global PackedFunc __tvm_set_device is already registered" failed'
2019-06-25 19:54:56.574 13703-13703/? A/DEBUG: r0 00000000 r1 00003573 r2 00000006 r3 00000008
2019-06-25 19:54:56.574 13703-13703/? A/DEBUG: r4 ab0f658c r5 00000006 r6 ab0f6534 r7 0000010c
2019-06-25 19:54:56.574 13703-13703/? A/DEBUG: r8 8efc0c19 r9 ab0f35f0 sl ab0e3a7b fp bea28950
2019-06-25 19:54:56.574 13703-13703/? A/DEBUG: ip 00000058 sp bea28440 lr aaa15857 pc aaa180c0 cpsr 60030010
@sunstarchan @yzhliu @xizi hi, have you solved it ?
As I remember, this kind of issue is caused by linking libtvm_runtime twice in the project. So please check the configuration for the project to make sure libtvm_runtime is only linked once in a place.
@dragonview @xizi
Thanks @sunstarchan . We have the similar issue when linking the libtvm_runtime in our dynamic library and try to import tvm which occurs the errors. It can be fixed by not linking libtvm_runtime when compiling our projects.
This my set TVM_LIBS = "-ltvm_topi -ltvm_runtime -ltvm -ltvm_topi -lvta_fsim -lvta_tsim"
Then I changed it to "-ltvm_topi -ltvm -ltvm_topi -lvta_fsim -lvta_tsim"
Remove "libtvm_runtime" then I can compile.
Most helpful comment
As I remember, this kind of issue is caused by linking libtvm_runtime twice in the project. So please check the configuration for the project to make sure libtvm_runtime is only linked once in a place.
@dragonview @xizi