mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
chore(core/process): handle gone processes in update_gpu_status
Signed-off-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
This commit is contained in:
parent
b77f85ba45
commit
1bb0002b71
1 changed files with 2 additions and 0 deletions
|
|
@ -666,6 +666,8 @@ class GpuProcess: # pylint: disable=too-many-instance-attributes,too-many-publi
|
|||
def update_gpu_status(self) -> Union[int, NaType]:
|
||||
"""Updates the GPU consumption status from a new NVML query."""
|
||||
|
||||
self.set_gpu_memory(NA)
|
||||
self.set_gpu_utilization(NA, NA, NA, NA)
|
||||
self.device.processes.cache_clear()
|
||||
self.device.processes()
|
||||
return self.gpu_memory()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue