Reinstall and ValueError: arch(sm_xy) is not passed, and we cannot detect it from env

I just remove ~/home/tvm and reclone tvm in github,

USE_CUDA ON, USE_LLVM ON and build.

But after run https://docs.tvm.ai/tutorials/frontend/from_keras.html#sphx-glr-tutorials-frontend-from-keras-py, next error occur

File "/home/cass1/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 78, in cfun
rv = local_pyfunc(*pyargs)
File "/home/cass1/tvm/python/tvm/autotvm/measure/measure_methods.py", line 593, in tvm_callback_cuda_compile
ptx = nvcc.compile_cuda(code, target=target, arch=AutotvmGlobalScope.current.cuda_target_arch)
File "/home/cass1/tvm/python/tvm/contrib/nvcc.py", line 73, in compile_cuda
raise ValueError("arch(sm_xy) is not passed, and we cannot detect it from env")
ValueError: arch(sm_xy) is not passed, and we cannot detect it from env

Thanks for your help in advance

1 Like

I just met this problem today … I can’t work it out too.

I found that nvidia driver was somehow uninstalled.

So reinstall nvidia driver and tvm works fine.

If you run in ubuntu, command nvidia-smi, check driver installed correctly.

1 Like