我使用Google Colab上的Blender来渲染我的Blender文件,直到上周它都工作得很好。我没有改变我的脚本,驱动程序和CUDA版本没有改变,但现在当我试图获得设备时,我得到以下错误。任何其他获取设备的命令也会给出相同的错误。
>>> bpy.context.preferences.addons["cycles"].preferences.refresh_devices()
CUDA cuInit: Unknown CUDA error value
这个命令是在blender python控制台执行的:
/content# sudo ./blender-3.0.1-linux-x64/blender -b --python-console
Blender 3.0.1 (hash dc2d18018171 built 2022-01-26 00:40:57)
Python 3.9.7 (default, Oct 11 2021, 10:06:01)
[GCC 9.3.1 20200408 (Red Hat 9.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>>
我已经使用Colab渲染blender文件几个月了,每次使用不同的gpu,它曾经工作得很好。我要重申,自上次成功渲染以来,我没有对脚本进行任何更改。
下面是一些可能有帮助的命令的输出:
/content# nvidia-smi
Fri Jun 3 10:38:24 2022
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03 Driver Version: 460.32.03 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 Tesla P100-PCIE... Off | 00000000:00:04.0 Off | 0 |
| N/A 39C P0 26W / 250W | 0MiB / 16280MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
我已经检查了日志,可以确认上面给出的Driver Version
和CUDA Version
自上次工作执行以来没有改变。
/content# nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Oct_12_20:09:46_PDT_2020
Cuda compilation tools, release 11.1, V11.1.105
Build cuda_11.1.TC455_06.29190527_0
/content# cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 460.32.03 Sun Dec 27 19:00:34 UTC 2020
GCC version: Selected multilib: .;@m64
似乎驾驶员之间存在一些差异。我设法解决了这个问题。删除所有Nvidia驱动程序,然后重新安装:
sudo apt-get --purge remove "*nvidia*"
sudo apt-get autoremove
sudo apt install nvidia-driver-460
记得使用sudo
和OPTIX运行搅拌机命令不再工作,只有CUDA。