mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-21 06:45:24 -06:00
chore(select): sort device index in descending to keep <GPU 0> free
Signed-off-by: Xuehai Pan <XuehaiPan@pku.edu.cn>
This commit is contained in:
parent
4834569d9b
commit
02c73f8faf
1 changed files with 1 additions and 0 deletions
|
|
@ -209,6 +209,7 @@ def select_devices(
|
|||
(not math.isnan(device.memory_used), -device.memory_used), # descending
|
||||
(not math.isnan(device.gpu_utilization), device.gpu_utilization), # ascending
|
||||
(not math.isnan(device.memory_utilization), device.memory_utilization), # ascending
|
||||
-device.physical_index, # descending to keep <GPU 0> free
|
||||
),
|
||||
) # type: List[DeviceSnapshot]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue