我按照此 [网站][1] 中的一些说明操作,在 ubuntu 18.04 LTS 上安装 cuda 版本 10.0 并尝试代码后,出现以下错误。我尝试按照 [此网站][2] 重新安装 cuda 和驱动程序,但错误没有改变。由于对 gpu/nvidia/cuda 还不熟悉,我不确定解决方案是什么。请帮忙。问候
错误:
func2(a)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/dispatcher.py", line 42, in __call__
return self.compiled(*args, **kws)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/compiler.py", line 799, in __call__
kernel = self.specialize(*args)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/compiler.py", line 810, in specialize
kernel = self.compile(argtypes)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/compiler.py", line 820, in compile
cc = get_current_device().compute_capability
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/api.py", line 316, in get_current_device
return current_context().device
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/devices.py", line 213, in get_context
return _runtime.get_or_create_context(devnum)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/devices.py", line 139, in get_or_create_context
return self._get_or_create_context_uncached(devnum)
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/devices.py", line 152, in _get_or_create_context_uncached
with driver.get_active_context() as ac:
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/driver.py", line 387, in __enter__
driver.cuCtxGetCurrent(byref(hctx))
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/driver.py", line 274, in __getattr__
self.initialize()
File "/usr/local/lib/python3.6/dist-packages/numba/cuda/cudadrv/driver.py", line 234, in initialize
raise CudaSupportError("Error at driver init: \n%s:" % e)
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init:
[100] Call to cuInit results in CUDA_ERROR_NO_DEVICE:
[1]: https://www.geeksforgeeks.org/running-python-script-on-gpu/
[2]: https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1804&target_type=deblocal