Skip to content

frontend: Probe the GPUs for the GPU status on a thread at launch - #1178

Merged
zackees merged 2 commits into
masterfrom
fix/gpu-status-prefetch
Oct 17, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/gpu-status-prefetch

Conversation

@zackees

@zackees zackees commented Oct 17, 2026

Copy link
Copy Markdown
Member

Fixes #1172

RED: device_cache.rs (Tier 1) against a todo!() DeviceCache: both tests fail. GREEN: 2/2, obs-gpu-status 52/52.

OBSApp::AppInit calls obs_gpu_status_prefetch(); the report joins a running prefetch instead of probing again. Report contents unchanged. Measured: window median of 8 interleaved runs 0.996 s → 0.933 s. Tiers 2-4 do not apply (no C original, no protocol).

…(RED, Refs #1172)

DeviceCache in rust/obs-gpu-status is a todo!() core. device_cache.rs:
devices_are_probed_once, and a report made while a prefetch is probing waits
for it instead of probing again. Both fail (todo).
…EEN, Fixes #1172)

The first obs_gpu_status_report probed the system's GPUs (sysfs and a
nvidia-smi subprocess, ~40 ms) on the startup path, after graphics init.
OBSApp::AppInit now starts that probe on a thread
(obs_gpu_status_prefetch); DeviceCache keeps one probe per process, and a
report made while the prefetch is still probing joins it instead of probing
again. Report contents do not change.

Launch to main window, median of 8 interleaved runs (2x NVIDIA): 0.996 s ->
0.933 s. device_cache: 2/2; obs-gpu-status: 52/52.
@zackees
zackees added this pull request to the merge queue Oct 17, 2026
@zackees
zackees removed this pull request from the merge queue due to a manual request Oct 17, 2026
@zackees
zackees merged commit acbcf2b into master Oct 17, 2026
28 of 29 checks passed
@zackees
zackees deleted the fix/gpu-status-prefetch branch October 26, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

frontend: GPU status runs nvidia-smi (~40 ms) on the startup path

1 participant