Skip to content

feat(gpu): in-process NVML sampling path - #113

Merged
reiase merged 4 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:pr/gpu-nvml-inprocess-sampling
Nov 16, 2026
Merged

reiase merged 4 commits into
DeepLink-org:masterfrom
VincentCheungKokomo:pr/gpu-nvml-inprocess-sampling

Conversation

@VincentCheungKokomo

Copy link
Copy Markdown
Contributor

Replace the per-tick nvidia-smi subprocess and the per-device cudarc context churn with in-process NVML reads (one pass per device: utilization, memory, temperature, power — the latter two previously unfilled on CUDA). nvml-wrapper dlopens libnvidia-ml.so by default but datacenter hosts usually ship only libnvidia-ml.so.1, so init falls back through versioned/absolute names; the legacy subprocess path remains as a lazy fallback when NVML cannot initialize. Removes the fork per sample tick (1 Hz debugging mode no longer spawns a subprocess per second; on the PPO workload above, sync_weight overhead halves 3.7%→1.8%). Note: low-frequency polling cost is unchanged — see the sampling-default-off PR for the measurement.

@VincentCheungKokomo
VincentCheungKokomo force-pushed the pr/gpu-nvml-inprocess-sampling branch 2 times, most recently from 580da6d to 362bae4 Compare November 13, 2026 10:36
Replace the per-tick nvidia-smi subprocess and the per-device cudarc
context churn with in-process NVML reads (one pass per device:
utilization, memory, temperature, power — the latter two previously
unfilled on CUDA). nvml-wrapper dlopens libnvidia-ml.so by default but
datacenter hosts usually ship only libnvidia-ml.so.1, so init falls
back through versioned/absolute names; the legacy subprocess path
remains as a lazy fallback when NVML cannot initialize. Removes the
fork per sample tick (1 Hz debugging mode no longer spawns a subprocess
per second; on the PPO workload above, sync_weight overhead halves
3.7%→1.8%). Note: low-frequency polling cost is unchanged — see the
sampling-default-off PR for the measurement.
rustls 0.23.45 -> 0.23.46 (RUSTSEC-2026-0346..0349), rustls-webpki
0.103.15 -> 0.103.16 (RUSTSEC-2026-0382), webpki-roots 1.0.8 -> 1.0.12
(RUSTSEC-2026-0381). Advisory DB entries published after master's
supply-chain fix; cargo deny --workspace check is green again.
make lint-rust builds the workspace with --no-default-features, where
the NVML fast path is compiled out: GpuMemoryModel becomes an unused
import (denied), so move it under #[cfg(feature = "cuda")]. Also bind
nvml-wrapper to the cuda feature (optional dep) so builds without CUDA
no longer warn about an unused dependency; with cuda enabled, tests
still pass (16/16) and in-process sampling compiles.
@VincentCheungKokomo
VincentCheungKokomo force-pushed the pr/gpu-nvml-inprocess-sampling branch from 6f876de to daacc23 Compare November 16, 2026 03:17
Published after the previous triage; fixed in 6.6.1 (upgrade still
tracked with the tornado bump). Gate re-verified: 17 advisories,
0 not allowlisted.
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@reiase
reiase merged commit a3395ec into DeepLink-org:master Nov 16, 2026
15 of 16 checks passed
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