Skip to content

fix(dash): launcher shows live serving instances; amd-smi detection off critical path (eai-8190) - #295

Open
r0x0r wants to merge 2 commits into
mainfrom
fix-number-instances
Open

fix(dash): launcher shows live serving instances; amd-smi detection off critical path (eai-8190)#295
r0x0r wants to merge 2 commits into
mainfrom
fix-number-instances

Conversation

@r0x0r

@r0x0r r0x0r commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two related fixes so the dashboard's model/instance count reflects reality promptly:

  1. Launcher front door always showed "Idle", even with a model actively serving. run_launcher built an empty AppState; it now reads the managed-service registry (the same authority rocm services reads) once per hub-loop pass and seeds the front door's instances from it. Also normalizes "serving" everywhere in the dash UI to is_serving() (Ready + Running), since a served model reports Ready, not Running — the running-instance counts previously undercounted.
  2. ~15-20s dashboard startup lag: amd-smi detection (amd-smi version + first system_info()) ran inline before the telemetry run loop's first tick, blocking managed-service discovery and the first snapshot broadcast behind it. Detection is now spawned in the background and adopted via a oneshot channel the moment it lands, so serving instances surface within one discovery tick instead of waiting on GPU detection.

Commits

  • fix(dash): seed launcher front door with live serving instances
  • fix(dash-daemon): run amd-smi detection off the run loop's critical path

Testing

  • cargo test -p rocm-dash-daemon -p rocm-dash-tui -p rocm --lib --tests — all passing, including two new unit regression tests (launcher_state_seeds_serving_from_registry_instances, serving_detail_counts_ready_instances_as_running) and one new daemon-level regression test (slow_gpu_detection_does_not_delay_service_discovery, which asserts on snapshot ordering rather than wall-clock timing to avoid flakiness under subscriber starvation).
  • cargo clippy -p rocm -p rocm-dash-tui -p rocm-dash-daemon --all-targets -- -D warnings — clean.
  • Local pre-commit/pre-push hooks (signing, DCO sign-off, fmt, clippy, cargo test) all passed.

Cucumber e2e coverage gap: no existing scenario in tests/e2e-cucumber/features/dash.feature covers the bare-rocm launcher front door or GPU-detection timing, and none were added here — the fixes are covered at the unit/integration level (above) instead. Flagging per repo convention rather than silently relying on existing coverage; happy to add a scenario if maintainers want dedicated e2e coverage for the launcher hub screen.

GPU hardware testing

Not run against real GPU hardware in this environment (no /dev/kfd available); the amd-smi-detection fix is validated via the fake-binary regression test described above, which exercises the real detection/adoption code path.

r0x0r added 2 commits August 21, 2026 07:45
The launcher front door built an empty AppState, so it always rendered
the idle variant even when a model was actively serving. Read the
managed-service registry (the same authority `rocm services` reads)
once per hub-loop pass and seed the AppState's instances from it.

Also treat `Ready` as serving everywhere the dashboard counts running
instances (`is_serving()`), matching the `Running`+`Ready` treatment
already used elsewhere (e.g. home.rs) -- a served model reports
`Ready`, not `Running`, so the count previously undercounted actual
serving models.

Adds apps/rocm's direct dependency on rocm-dash-core (previously only a
transitive dep) so the launcher can build `Instance`s from the
registry's `DiscoveredService` records.

Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
Detecting amd-smi (`amd-smi version` plus the first `system_info()`)
can take up to ~15s on real hardware. Running it inline before the run
loop's first tick blocked managed-service discovery and the first
snapshot broadcast behind it, so an already-running model did not
surface in the dashboard until GPU detection finished -- a visible
~15-20s "0 models running" lag while `rocm services` already reported
it live.

Spawn detection in the background and adopt the result via a oneshot
channel the moment it lands, without ever blocking the loop while it
is in flight. The loop now starts ticking immediately, so serving
instances appear within one discovery tick; GPU metrics fill in once
detection completes.

Adds a regression test asserting on ordering (the instance must
surface in a snapshot whose gpu_system_info is still None) rather than
wall-clock timing, since a pure "arrived within Ns" check would be
flaky under subscriber starvation.

Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
@r0x0r
r0x0r requested a review from a team as a code owner August 21, 2026 07:50
@r0x0r
r0x0r requested a review from volen-silo August 21, 2026 07:50
@r0x0r r0x0r changed the title fix(dash): launcher shows live serving instances; amd-smi detection off critical path fix(dash): launcher shows live serving instances; amd-smi detection off critical path (eai-8190) Aug 21, 2026
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.

1 participant