Hi, I want to run tutorial/get_stared.py with llvm/cuda.
but I got a problem, the following error:
Check failed: bf != nullptr Target cuda is not enabled
When I was googling, it means that cuda is not enabled.
But I’m sure cuda is installed and cmake is also set.
nvidia-smi, nvidia-settings are doing well and cuda sample is also working.
/usr/local/cuda-10.0/samples/1_Utilities/deviceQuery ()$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
.......
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 10.0, CUDA Runtime Version = 10.0, NumDevs = 1
Result = PASS
This is my build/config.cmake,
set(USE_CUDA ON)
...
set(USE_LLVM /home/jenny/llvm/clang+llvm/bin/llvm-config)
and result of “cmake …” (before the build, make clean was also performed)
$ cmake ..
-- Build with RPC support...
-- Build with Graph runtime support...
-- Build VTA runtime with target: sim
-- Found CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda
-- Found CUDA_CUDA_LIBRARY=/usr/local/cuda/targets/x86_64-linux/lib/stubs/libcuda.so
-- Found CUDA_CUDART_LIBRARY=/usr/local/cuda/lib64/libcudart.so
-- Found CUDA_NVRTC_LIBRARY=/usr/local/cuda/lib64/libnvrtc.so
-- Found CUDA_CUDNN_LIBRARY=/home/jenny/Downloads/yes/lib/libcudnn.so
-- Found CUDA_CUBLAS_LIBRARY=/usr/local/cuda/lib64/libcublas.so
-- Build with CUDA support
-- Use llvm-config=/home/jenny/llvm/clang+llvm/bin/llvm-config
-- /home/jenny/llvm/clang+llvm/include
-- Found LLVM_INCLUDE_DIRS=/home/jenny/llvm/clang+llvm/include
-- Found LLVM_DEFINITIONS= -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-- Found TVM_LLVM_VERSION=60
-- Build with LLVM
-- Set TVM_LLVM_VERSION=60
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jenny/tvm/tvm/build
The following is the error message.
<class 'tvm.tensor.Tensor'>
Traceback (most recent call last):
File "get_started.py", line 118, in <module>
fadd = tvm.build(s, [A, B, C], tgt, target_host=tgt_host, name="myadd")
File "/home/jenny/.local/lib/python2.7/site-packages/tvm-0.5.dev0-py2.7-linux-x86_64.egg/tvm/build_module.py", line 584, in build
fhost, mdev = _build_for_device(flist, tar, target_host)
File "/home/jenny/.local/lib/python2.7/site-packages/tvm-0.5.dev0-py2.7-linux-x86_64.egg/tvm/build_module.py", line 451, in _build_for_device
mdev = codegen.build_module(fdevice, str(target)) if fdevice else None
File "/home/jenny/.local/lib/python2.7/site-packages/tvm-0.5.dev0-py2.7-linux-x86_64.egg/tvm/codegen.py", line 20, in build_module
return _Build(lowered_func, target)
File "/home/jenny/.local/lib/python2.7/site-packages/tvm-0.5.dev0-py2.7-linux-x86_64.egg/tvm/_ffi/_ctypes/function.py", line 185, in __call__
ctypes.byref(ret_val), ctypes.byref(ret_tcode)))
File "/home/jenny/.local/lib/python2.7/site-packages/tvm-0.5.dev0-py2.7-linux-x86_64.egg/tvm/_ffi/base.py", line 72, in check_call
raise TVMError(py_str(_LIB.TVMGetLastError()))
tvm._ffi.base.TVMError: [10:40:20] /home/jenny/tvm/src/codegen/codegen.cc:27: Check failed: bf != nullptr Target cuda is not enabled
Can you help me?