[GH-ISSUE #60] [Question] Custom criteria for select_devices #37

Closed
opened 2026-05-05 03:22:55 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ioslide on GitHub (Mar 17, 2023).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/60

Originally assigned to: @XuehaiPan on GitHub.

Required prerequisites

  • I have searched the Issue Tracker that this hasn't already been reported. (comment there if it has.)
  • I have tried the latest version of nvitop in a new isolated virtual environment.

Motivation

Can "select_devices" be updated to specify a GPU and policy? If the policy is set to "queue", the specified GPU can be held until it meets the requirements.

Solution

No response

Alternatives

No response

Additional context

No response

Originally created by @ioslide on GitHub (Mar 17, 2023). Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/60 Originally assigned to: @XuehaiPan on GitHub. ### Required prerequisites - [X] I have searched the [Issue Tracker](https://github.com/XuehaiPan/nvitop/issues) that this hasn't already been reported. (comment there if it has.) - [X] I have tried the latest version of nvitop in a new isolated virtual environment. ### Motivation Can "select_devices" be updated to specify a GPU and policy? If the policy is set to "queue", the specified GPU can be held until it meets the requirements. ### Solution _No response_ ### Alternatives _No response_ ### Additional context _No response_
gitea-mirror 2026-05-05 03:22:55 -06:00
Author
Owner

@XuehaiPan commented on GitHub (Mar 17, 2023):

Can "select_devices" be updated to specify a GPU and policy?

You can pass devices argument to select_devices. Maybe also add sort=False.

devices = select_devices(devices, <criteria args>, sort=False)

For nvisel CLI, use CUDA_VIRIBLE_DEVICES and --no-sort (-S):

$ nvisel -i "GPU-18ef14e9,GPU-849d5a8d" -S [<criteria options>]
5,6

If the policy is set to "queue", the specified GPU can be held until it meets the requirements.

You can write your own logic about that. It may be too complex to add in nvitop.select natively.

<!-- gh-comment-id:1473235241 --> @XuehaiPan commented on GitHub (Mar 17, 2023): > Can "select_devices" be updated to specify a GPU and policy? You can pass `devices` argument to `select_devices`. Maybe also add `sort=False`. ```python devices = select_devices(devices, <criteria args>, sort=False) ``` For `nvisel` CLI, use `CUDA_VIRIBLE_DEVICES` and `--no-sort` (`-S`): ```console $ nvisel -i "GPU-18ef14e9,GPU-849d5a8d" -S [<criteria options>] 5,6 ``` ------ > If the policy is set to "queue", the specified GPU can be held until it meets the requirements. You can write your own logic about that. It may be too complex to add in `nvitop.select` natively.
Author
Owner

@XuehaiPan commented on GitHub (Mar 17, 2023):

Closing for it is a specific usage and really depends on the hardware setup. Workload management is kind of out of topic. You can always write your own logic for device selection or use specialized software like slurm.

<!-- gh-comment-id:1473439406 --> @XuehaiPan commented on GitHub (Mar 17, 2023): Closing for it is a specific usage and really depends on the hardware setup. Workload management is kind of out of topic. You can always write your own logic for device selection or use specialized software like `slurm`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/nvitop#37
No description provided.