Process finished with exit code -1073740791 (0xC0000409)
程序员文章站
2024-02-12 13:18:40
...
在使用pycharm run一个机器学习demo时,出现这个错误。
failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
failed to create cublas handle: CUBLAS_STATUS_ALLOC_FAILED
could not create cudnn handle: CUDNN_STATUS_ALLOC_FAILED
could not destroy cudnn handle: CUDNN_STATUS_BAD_PARAM
Check failed: stream->parent()->GetConvolveAlgorithms( conv_parameters.ShouldIncludeWinogradNonfusedAlgo<T>(), &algorithms)
Process finished with exit code -1073740791 (0xC0000409)
在网上查找解决方法,大多数说的是 显存不足 。
最后,通过在main()中添加:os.environ[“CUDA_VISIBLE_DEVICES”] = "-1"解决了这个问题。
os.environ[“CUDA_VISIBLE_DEVICES”] = “0” 使用第0个gpu
os.environ[“CUDA_VISIBLE_DEVICES”] = “1” 使用第1个gpu
大胆猜想,os.environ[“CUDA_VISIBLE_DEVICES”] = “-1”,大概是不使用gpu了吧。
电脑内存是16g,显存也是16g,怎么使用cpu就可以,gpu就不行了呢?
推荐阅读
-
启动就结束 报错:Process finished with exit code 0
-
Process finished with exit code -1073740791 (0xC0000409)
-
Process finished with exit code 0
-
Process finished with exit code 0
-
SpringBoot Process finished with exit code 0
-
SpringBoot: Process finished with exit code 0
-
Process finished with exit code -1073741571 (0xC00000FD)的解决方案
-
SpringBoot - Process finished with exit code 0
-
Tensorflow中Process finished with exit code -1073741819 (0xC0000005)的一种解决方案
-
#Process finished with exit code -1 问题处理