Want Know Reason!!//Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found

Want Know Reason!!//Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found

为什么在tensorflow没有gpu的情况下会出现这个错误,但是模型还是可以运行正常

W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found
W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)

错误:-

2022-02-26 10:47:12.726011: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library invcuda.dll'; dlerror: nvcuda.dll not found
2022-02-26 10:47:12.727262: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)

Why does this error occur when Tensorflow has no GPU, but the model can still be run normally.

根据https://wikidll.com/nvidia-corporation/nvcuda-dll

"Nvcuda.dll a DLL (Dynamic Link Library) file, developed by NVIDIA Corporation, which is referred to essential system files of the Windows OS. It usually contains a set of procedures and driver functions, which may be applied by Windows."

既然你没有GPU,估计是没有安装NVIDIA驱动,也没有Nvcuda.dll。据推测,Tensorflow 代码能够回退到模型在 CPU.

上的模式 运行

您必须安装了 Tensorflow for GPU 版本。如果您想摆脱(嘈杂的)警告消息,请强制安装仅 CPU 版本,或修改日志记录级别。更多详情:参见 Tensorflow not working: Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found