Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tvm-install-problem #758

Closed
limin2021 opened this issue Jan 7, 2018 · 3 comments
Closed

tvm-install-problem #758

limin2021 opened this issue Jan 7, 2018 · 3 comments

Comments

@limin2021
Copy link

limin2021 commented Jan 7, 2018

I install tvm on Ubuntu 16.04 with llvm. After getting libsvm.so(also adding its path to ~/.bashrc) and installing python bindings(python 2.7), I "import tvm" in python command line to test if I install successfully. But it outputs:

import tvm
Traceback (most recent call last):
File "", line 1, in
File "tvm/init.py", line 5, in
from . import tensor
File "tvm/tensor.py", line 4, in
from ._ffi.node import NodeBase, NodeGeneric, register_node, convert_to_node
File "tvm/_ffi/node.py", line 8, in
from .node_generic import NodeGeneric, convert_to_node, const
File "tvm/_ffi/node_generic.py", line 7, in
from .base import string_types
File "tvm/_ffi/base.py", line 43, in
_LIB, _LIB_NAME = _load_lib()
File "tvm/_ffi/base.py", line 35, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/init.py", line 362, in init
self._handle = _dlopen(self._name, mode)
OSError: /**/tvm/lib/libtvm.so: undefined symbol: ZN4llvm14TargetRegistry12lookupTargetERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6

What's wrong with my installation?? Thanks.

@tqchen
Copy link
Member

tqchen commented Jan 7, 2018

Likely due to same ABI problem as #521

@limin2021
Copy link
Author

OK. Thanks, It is solved. And then I have another problem: I execute the example in tutorial/get_started.py, the following problem occurs:

python get_started.py
<class 'tvm.tensor.Tensor'>
Traceback (most recent call last):
File "get_started.py", line 111, in
fadd_cuda = tvm.build(s, [A, B, C], "cuda", target_host="llvm", name="myadd")
File "/home/vminl/tvm/python/tvm/build_module.py", line 364, in build
mdev = codegen.build_module(fdevice, str(target_device))
File "/home/vminl/tvm/python/tvm/codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "/home/vminl/tvm/python/tvm/_ffi/function.py", line 255, in my_api_func
return flocal(*args)
File "/home/vminl/tvm/python/tvm/_ffi/_ctypes/function.py", line 183, in call
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "/home/vminl/tvm/python/tvm/_ffi/base.py", line 62, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: [17:31:22] src/codegen/codegen.cc:27: Check failed: bf != nullptr Target cuda is not enabled

Stack trace returned 10 entries:
[bt] (0) //tvm/lib/libtvm.so(_ZN4dmlc10StackTraceB5cxx11Ev+0x5a) [0x7fd16580254a]
[bt] (1) /
/tvm/lib/libtvm.so(_ZN3tvm7codegen5BuildERKNS_5ArrayINS_11LoweredFuncEvEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE+0xdac) [0x7fd1659d3b0c]
[bt] (2) //tvm/lib/libtvm.so(+0x8eafa1) [0x7fd165986fa1]
[bt] (3) /
/tvm/lib/libtvm.so(TVMFuncCall+0x5e) [0x7fd165bc365e]
[bt] (4) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call_unix64+0x4c) [0x7fd1921f2e40]
[bt] (5) /usr/lib/x86_64-linux-gnu/libffi.so.6(ffi_call+0x2eb) [0x7fd1921f28ab]
[bt] (6) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(_ctypes_callproc+0x48f) [0x7fd1924023df]
[bt] (7) /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so(+0x11d82) [0x7fd192406d82]
[bt] (8) python(PyObject_Call+0x43) [0x4b0c93]
[bt] (9) python(PyEval_EvalFrameEx+0x602f) [0x4c9f9f]

Can you help me? Thanks a lot.

@tqchen
Copy link
Member

tqchen commented Jan 8, 2018

this is because you did not build with cuda enabled, update config.mk to enable cuda. Next time, please always close resolved issue and open another one for a new question

@tqchen tqchen closed this as completed Jan 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants