设置显卡为非独占模式,解决CUDA error: all CUDA-capable devices are busy or unavailable CUDA kernel errors might b

当调用显卡时,报错:CUDA error: all CUDA-capable devices are busy or unavailable CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1

再看nvidia-smi显卡信息,最右边一列,Volatile Uncorr. ECC GPU-Util MIG M.这里,显示的是E.Process Disabled
在这里插入图片描述

原因:这是因为显卡设置了独占模式
解决方案:解除显卡的独占模式:

nvidia-smi -c 0                        #设置所有显卡为独占模式False
user:~$ sudo nvidia-smi -c 0
[sudo] password for speed:
Set compute mode to DEFAULT for GPU 00000000:01:00.0.
Set compute mode to DEFAULT for GPU 00000000:02:00.0.
All done.

非独占模式的显示:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Bean_zx

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值