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/src/codegen/codegen.cc:27: Check failed: bf != nullptr Target llvm is not enabled #1341

Closed
abner2015 opened this issue Jun 27, 2018 · 2 comments

Comments

@abner2015
Copy link

when i run Deploy Single Shot Multibox Detector(SSD) model follow TVM tutorials, get the error :
/tvm/src/codegen/codegen.cc:27: Check failed: bf != nullptr Target llvm is not enabled

`[16:03:28] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[16:03:28] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
[16:03:28] src/nnvm/legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade...
[16:03:28] src/nnvm/legacy_json_util.cc:217: Symbol successfully upgraded!
Traceback (most recent call last):
File "/home/abner/new/project/mxnet/tvm-project/demo.py", line 52, in
graph, lib, params = compiler.build(net, target, {"data": dshape}, params=params)
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py", line 279, in build
graph, params = precompute_prune(graph, params)
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py", line 396, in precompute_prune
out_arrs = _run_graph(pre_graph, params)
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py", line 345, in _run_graph
graph, libmod, _ = build(graph, target, shape, dtype)
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py", line 294, in build
graph = graph.apply("GraphFusePartition").apply("GraphFuseCompile")
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/graph.py", line 234, in apply
check_call(_LIB.NNGraphApplyPasses(self.handle, npass, cpass, ctypes.byref(ghandle)))
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/_base.py", line 75, in check_call
raise NNVMError(py_str(_LIB.NNGetLastError()))
nnvm._base.NNVMError: TVMCall CFunc Error:
Traceback (most recent call last):
File "tvm/_ffi/_cython/./function.pxi", line 38, in tvm._ffi._cy2.core.tvm_callback
File "/home/abner/.local/lib/python2.7/site-packages/nnvm-0.8.0-py2.7.egg/nnvm/compiler/build_module.py", line 123, in _build
return tvm.build(funcs, target=target, target_host=target_host)
File "/home/abner/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/build_module.py", line 501, in build
mhost = codegen.build_module(fhost, str(target_host))
File "/home/abner/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "/home/abner/.local/lib/python2.7/site-packages/tvm-0.4.0-py2.7-linux-x86_64.egg/tvm/_ffi/function.py", line 280, in my_api_func
return flocal(*args)
File "tvm/_ffi/_cython/./function.pxi", line 264, in tvm._ffi._cy2.core.FunctionBase.call
File "tvm/_ffi/_cython/./function.pxi", line 213, in tvm._ffi._cy2.core.FuncCall
File "tvm/_ffi/_cython/./function.pxi", line 205, in tvm._ffi._cy2.core.FuncCall3
File "tvm/_ffi/_cython/./base.pxi", line 131, in tvm._ffi._cy2.core.CALL
TVMError: [16:03:29] /home/user/new/software/tvm/src/codegen/codegen.cc:27: Check failed: bf != nullptr Target llvm is not enabled

system: ubuntu 16.04
config.cmake:
set(USE_LLVM ON)

I had install LLVM

cmake ..
abner@user:~/new/software/tvm/build$ cmake .. -- Build with RPC support... -- Build with Graph runtime support... -- Build with LLVM 6.0.1 -- Set TVM_LLVM_VERSION=60 -- Configuring done -- Generating done -- Build files have been written to: /home/abner/new/software/tvm/build

The issus cannot run tutorial files well. #495
who can tell me how can i slolve it.
What should I do to make the file work?

@abner2015
Copy link
Author

solve:
compile python use the commend:
python setup.py install --user

if use the commend :
python setup.py install
you will get the error .

i don't know the reason

@PariksheetPinjari909
Copy link
Contributor

cmake automatically identify LLVM path. In your case you can set the llvm-config path manually in config.cmake as below:
set(USE_LLVM /usr/lib/llvm-6.0/bin/llvm-config)

You can check the llvm-config is present at this location or not.

@tqchen tqchen closed this as completed Jun 27, 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

3 participants