成功解决torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35) [ WARN:0

成功解决torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35)
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback


解决问题

[INFO] Initializing front camera...
Traceback (most recent call last):
  File ".\image_animation.py", line 76, in <module>
    kp_driving_initial = kp_detector(source1)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\modules\module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\data_parallel.py", line 139, in forward
    inputs, kwargs = self.scatter(inputs, kwargs, self.device_ids)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\data_parallel.py", line 150, in scatter
    return scatter_kwargs(inputs, kwargs, device_ids, dim=self.dim)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\scatter_gather.py", line 35, in scatter_kwargs
    inputs = scatter(inputs, target_gpus, dim) if inputs else []
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\scatter_gather.py", line 28, in scatter
    return scatter_map(inputs)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\scatter_gather.py", line 15, in scatter_map
    return list(zip(*map(scatter_map, obj)))
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\scatter_gather.py", line 13, in scatter_map
    return Scatter.apply(target_gpus, None, dim, obj)
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\nn\parallel\_functions.py", line 95, in forward
    main_stream.wait_stream(streams[i])
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\cuda\streams.py", line 55, in wait_stream
    self.wait_event(stream.record_event())
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\cuda\streams.py", line 68, in record_event
    event = Event()
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\cuda\streams.py", line 162, in __init__
    check_error(self._cudart.cudaEventCreateWithFlags(ctypes.byref(ptr), ctypes.c_uint(flags)))
  File "F:\File_Anaconda\CV2020_RealTimeImageAnimation\envs\lib\site-packages\torch\cuda\__init__.py", line 208, in check_error
    raise CudaError(res)
torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35)
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback

解决思路

torch.cuda.CudaError: CUDA driver version is insufficient for CUDA runtime version (35)
[ WARN:0] global C:\projects\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (674) SourceReaderCB::~SourceReaderCB terminating async callback
torch.cuda.Cuda错误:Cuda驱动版本是不够的Cuda运行时版本SourceReaderCB::~SourceReaderCB终止异步回调

解决方法

相关文章:Pytorch:深度学习中pytorch/torchvision版本和CUDA版本最正确版本匹配、对应版本安装之详细攻略

查看torch,以及torch所适合的cuda版本,此问题,大多数都是版本不匹配造成的!

(0)

相关推荐