switch cuda compute mode to default mode

橙三吉。 提交于 2021-02-07 23:12:12

问题


I use nvidia-smi to see the status of each GPU on a computing node but find one of them is E. Thread. Is there any easy way to switch it back to default mode? ------------------------------------------------------+
| NVIDIA-SMI 346.46 Driver Version: 346.46 |
|-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 680 Off | 0000:03:00.0 N/A | N/A | | 30% 30C P8 N/A / N/A | 10MiB / 4095MiB | N/A E. Thread | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX 680 Off | 0000:04:00.0 N/A | N/A | | 30% 29C P8 N/A / N/A | 10MiB / 4095MiB | N/A Default | +-------------------------------+----------------------+----------------------+


回答1:


nvidia-smi -h

will give you command line help, and there is also a man page:

man nvidia-smi

the following command should reset that device to compute mode of 0 (default)

nvidia-smi -i 0 -c 0

should reset that device (0) to compute mode of 0 (default)

You need to have root privilege to modify the device this way, so either be a root user or run the command with sudo




回答2:


In order to know the current Compute Mode, use the following command

nvidia-smi  --query | grep 'Compute Mode'

In order to set the Compute Mode, use the following command

sudo nvidia-smi -c $i

Where $i could be 0, 1, 2 or 3. Meaning of these numbers are given below -

0 Default
1 Exclusive_Thread
2 Prohibited 
3 Exclusive_Process

Answer to your question

sudo nvidia-smi -c 0

This will set all GPUs in default mode. Use -i 0 flag if you want to apply it only to GPU 0.



来源:https://stackoverflow.com/questions/31731535/switch-cuda-compute-mode-to-default-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!