[Solved]Error when running the quick start tutorial


#1

Hi,

I’m trying the tvm tutorial https://docs.tvm.ai/tutorials/relay_quick_start.html#
and I met the following error.

Traceback (most recent call last):
  File "relay_quick_start.py", line 101, in <module>
    graph, lib, params = relay.build_module.build(net, target, params=params)
  File "/home/feiga/tvm/python/tvm/relay/build_module.py", line 307, in build
    lowered_funcs, target=target, target_host=target_host)
  File "/home/feiga/tvm/python/tvm/build_module.py", line 617, in build
    fhost, mdev = _build_for_device(flist, tar, target_host)
  File "/home/feiga/tvm/python/tvm/build_module.py", line 484, in _build_for_device
    mdev = codegen.build_module(fdevice, str(target)) if fdevice else None
  File "/home/feiga/tvm/python/tvm/codegen.py", line 36, in build_module
    return _Build(lowered_func, target)
  File "/home/feiga/tvm/python/tvm/_ffi/_ctypes/function.py", line 209, in __call__
    raise get_last_ffi_error()
tvm._ffi.base.TVMError: Traceback (most recent call last):
  [bt] (5) /data/home/feiga/tvm/build/libtvm.so(TVMFuncCall+0x61) [0x7f80f1ba0391]
  [bt] (4) /data/home/feiga/tvm/build/libtvm.so(+0x85ac7e) [0x7f80f13c8c7e]
  [bt] (3) /data/home/feiga/tvm/build/libtvm.so(+0x96cd7e) [0x7f80f14dad7e]
  [bt] (2) /data/home/feiga/tvm/build/libtvm.so(+0x956eef) [0x7f80f14c4eef]
  [bt] (1) /data/home/feiga/tvm/build/libtvm.so(+0xfcd494) [0x7f80f1b3b494]
  [bt] (0) /data/home/feiga/tvm/build/libtvm.so(+0x102ef0b) [0x7f80f1b9cf0b]
  File "/home/feiga/tvm/python/tvm/_ffi/_ctypes/function.py", line 71, in cfun
    rv = local_pyfunc(*pyargs)
  File "/home/feiga/tvm/python/tvm/autotvm/measure/measure_methods.py", line 574, in tvm_callback_cuda_compile
    ptx = nvcc.compile_cuda(code, target="ptx", arch=AutotvmGlobalScope.current.cuda_target_arch)
  File "/home/feiga/tvm/python/tvm/contrib/nvcc.py", line 98, in compile_cuda
    raise RuntimeError(msg)
RuntimeError: Compilation error:
nvcc fatal   : Value 'sm_60' is not defined for option 'gpu-architecture'

How to fix this?
Thanks


#2

Problem solved by setting the nvcc path of right version cuda