Skip to content

feat: add explicit GPU identity detector - #59

Merged
ahmadki merged 3 commits into
mainfrom
rhewett/stack-04-gpu-identity
Sep 4, 2026
Merged

feat: add explicit GPU identity detector#59
ahmadki merged 3 commits into
mainfrom
rhewett/stack-04-gpu-identity

Conversation

@rhewett-nv

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds a best-effort NVML detector for worker-local nv.gpu.* resource attributes.

Issues

N/A

Usage

from nemo.lens.resources import detect_gpu

gpu_attributes = detect_gpu(local_rank=local_rank)

# Before your PR is "Ready for review"

Pre checks:

- [x] I read the Contributor guidelines (/NVIDIA-NeMo/lens/blob/main/CONTRIBUTING.md).
- [x] All commits are signed off (git commit -s) per the DCO.
- [x] I added or updated tests under tests/ for any behavior change.
- [x] I ran pytest and pre-commit run --all-files locally; both pass.
- [x] I updated docs/ and README.md where behavior, configuration, or public API changed.
- [x] If this changes a lens public API symbol, I updated the cross-repo _fallbacks.py files in Megatron-LM / RL / Gym.

# Additional information

- GPU detection returns an empty mapping when NVML or a usable device is unavailable.

@rhewett-nv
rhewett-nv requested a review from ahmadki as a code owner September 4, 2026 15:17
@copy-pr-bot

copy-pr-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ahmadki ahmadki changed the title resources: add explicit GPU identity detector feat: add explicit GPU identity detector Sep 4, 2026
@ahmadki

ahmadki commented Sep 4, 2026

Copy link
Copy Markdown
Member

/ok to test 4f5465d

ahmadki
ahmadki previously approved these changes Sep 4, 2026
@ahmadki

ahmadki commented Sep 4, 2026

Copy link
Copy Markdown
Member

/ok to test bbc009e

ahmadki
ahmadki previously approved these changes Sep 4, 2026
@ahmadki
ahmadki force-pushed the rhewett/stack-04-gpu-identity branch from bbc009e to c488d73 Compare September 4, 2026 18:55
@ahmadki
ahmadki dismissed their stale review September 4, 2026 18:59

The merge-base changed after approval.

@ahmadki
ahmadki force-pushed the rhewett/stack-04-gpu-identity branch from c488d73 to c3f3d77 Compare September 4, 2026 18:59
Base automatically changed from rhewett/stack-03-cleanups to main September 4, 2026 18:59
rhewett-nv and others added 3 commits September 4, 2026 22:00
Synchronize the review skill with the composed staging APIs, remove duplicated setup guidance, and retain formatter-compatible provider tests after combining the two upstream changes.

Signed-off-by: Russell Hewett <rhewett@nvidia.com>
Signed-off-by: Russell Hewett <rhewett@nvidia.com>
Signed-off-by: Ahmad Kiswani <kiswani.ahmad@gmail.com>
@ahmadki
ahmadki force-pushed the rhewett/stack-04-gpu-identity branch from c3f3d77 to 4c1dff6 Compare September 4, 2026 19:00
@ahmadki
ahmadki merged commit 6737afd into main Sep 4, 2026
6 checks passed
@ahmadki
ahmadki deleted the rhewett/stack-04-gpu-identity branch September 4, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants