Skip to content

failed to load the Compile library  #599

@Arthur-Shi

Description

@Arthur-Shi

I tried to save the Compile library from f3 in tvm/topi/tests/python/test_topi_depthwise_conv2d.py

base_path="/home/aries/tvm/apps/test/lib"
dylib_path = os.path.join(base_path, "test_relu.so")
f3.export_library(dylib_path)
syslib_path = os.path.join (base_path, "test_relu.o")
f3.save (syslib_path)

And it works well.

But when I want to try ./run_example.sh to prove the saved .so files work well.
I edited the makefile:
#The code library built by TVM
#lib/test_addone_sys.o: prepare_test_libs.py
#python prepare_test_libs.py

Because I want to use the .so and .o files outputted by f3.

And actually, My Cuda is enabled. Why? [17:47:14] /home/aries/tvm/dmlc-core/include/dmlc/./logging.h:308: [17:47:14] ../../src/runtime/module_util.cc:31: Check failed: f != nullptr Loader of cuda(module.loadbinary_cuda) is not presented.

~/tvm/apps/test$ ./run_example.sh
Build the libraries..
g++ -std=c++11 -O2 -fPIC -I/home/aries/tvm/include -I/home/aries/tvm/dmlc-core/include -I/home/aries/tvm/dlpack/include -o lib/cpp_deploy_pack cpp_deploy.cc lib/test_addone_sys.o lib/libtvm_runtime_pack.o -L/home/aries/tvm/lib -ldl -lpthread
g++ -std=c++11 -O2 -fPIC -I/home/aries/tvm/include -I/home/aries/tvm/dmlc-core/include -I/home/aries/tvm/dlpack/include -o lib/cpp_deploy_normal cpp_deploy.cc lib/test_addone_sys.o -L/home/aries/tvm/lib -ldl -lpthread -ltvm_runtime
Run the example
Run the deployment with all in one packed library...
[17:47:14] /home/aries/tvm/dmlc-core/include/dmlc/./logging.h:308: [17:47:14] ../../src/runtime/module_util.cc:31: Check failed: f != nullptr Loader of cuda(module.loadbinary_cuda) is not presented.

Stack trace returned 7 entries:
[bt] (0) lib/cpp_deploy_pack() [0x4076d9]
[bt] (1) lib/cpp_deploy_pack() [0x418780]
[bt] (2) lib/cpp_deploy_pack() [0x418bdc]
[bt] (3) lib/cpp_deploy_pack() [0x4172e6]
[bt] (4) lib/cpp_deploy_pack() [0x404612]
[bt] (5) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fc7afb70830]
[bt] (6) lib/cpp_deploy_pack() [0x405929]

terminate called after throwing an instance of 'dmlc::Error'
what(): [17:47:14] ../../src/runtime/module_util.cc:31: Check failed: f != nullptr Loader of cuda(module.loadbinary_cuda) is not presented.

Stack trace returned 7 entries:
[bt] (0) lib/cpp_deploy_pack() [0x4076d9]
[bt] (1) lib/cpp_deploy_pack() [0x418780]
[bt] (2) lib/cpp_deploy_pack() [0x418bdc]
[bt] (3) lib/cpp_deploy_pack() [0x4172e6]
[bt] (4) lib/cpp_deploy_pack() [0x404612]
[bt] (5) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fc7afb70830]
[bt] (6) lib/cpp_deploy_pack() [0x405929]

./run_example.sh: line 10: 16001 Aborted (core dumped) lib/cpp_deploy_pack
Run the deployment with all in normal library...
[17:47:14] cpp_deploy.cc:58: Verify dynamic loading from test_addone_dll.so
[17:47:14] /home/aries/tvm/dmlc-core/include/dmlc/./logging.h:308: [17:47:14] cpp_deploy.cc:14: Check failed: f != nullptr

Stack trace returned 4 entries:
[bt] (0) lib/cpp_deploy_normal() [0x403751]
[bt] (1) lib/cpp_deploy_normal() [0x402095]
[bt] (2) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f90d6ce0830]
[bt] (3) lib/cpp_deploy_normal() [0x4024a9]

terminate called after throwing an instance of 'dmlc::Error'
what(): [17:47:14] cpp_deploy.cc:14: Check failed: f != nullptr

Stack trace returned 4 entries:
[bt] (0) lib/cpp_deploy_normal() [0x403751]
[bt] (1) lib/cpp_deploy_normal() [0x402095]
[bt] (2) /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f90d6ce0830]
[bt] (3) lib/cpp_deploy_normal() [0x4024a9]

./run_example.sh: line 13: 16003 Aborted (core dumped) lib/cpp_deploy_normal

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions