Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/rocm-dash-collectors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ reqwest = { version = "0.12", default-features = false }
[dev-dependencies]
# Test-only: `write_fake_executable` plants the fake `amd-smi` the timeout tests
# run without the intermittent "Text file busy" failure that `std::fs::write`
# followed by a chmod hits. Dev-dependencies are exempt from the layering
# allowlist, so the collectors keep no normal dependency on `rocm-core`.
# followed by a chmod hits. `rocm-core` is also a normal dependency above
# (`amd_smi.rs` uses `device_readable_bounded`), so this entry only restates it.
rocm-core = { path = "../rocm-core" }
tokio = { version = "1", features = ["full"] }
tempfile = "3"
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-collectors/src/amd_smi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! amd-smi subprocess + JSON parse.
//!
//! Field paths and the GPU-device pre-flight are vendored from the TypeScript
//! `AmdSmiProvider` in instinct-dash. See `../wiki/entities/amd-smi.md`.
//! `AmdSmiProvider` in instinct-dash.

use std::ffi::OsString;
use std::io;
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-collectors/src/docker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//!
//! Field-extraction logic is vendored from instinct-dash `DockerService.ts`
//! (HIP_VISIBLE_DEVICES → gpu_ids, `--tensor-parallel-size`/`-tp`, etc.).
//! See `../../wiki/entities/dockerode.md`.
//!
//! The async inherent methods are the public API. The `ServiceDiscovery` trait
//! impl is sync-only and returns `Unsupported`: bollard requires a tokio
Expand Down
7 changes: 3 additions & 4 deletions crates/rocm-dash-collectors/src/parallel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@

//! Shared primitives for async collectors that scrape N targets concurrently.
//!
//! Today: [[VllmPrometheusCollector]] uses this pattern hand-rolled in the
//! daemon's runner. As future per-instance scrapers come online, they'll reuse
//! `parallel_scrape` and the `WarningBus` instead of re-implementing the
//! JoinSet glue.
//! Today: the daemon's runner calls `parallel_scrape` for the vLLM Prometheus
//! scrape. Future per-instance scrapers should reuse `parallel_scrape` instead
//! of re-implementing the JoinSet glue.

use std::future::Future;
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-collectors/src/vllm_prom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! vLLM Prometheus `/metrics` scraper.
//!
//! Field paths and the kv-cache 0..1 → 0..100 scaling are vendored from
//! instinct-dash `VllmMetricsService.ts`. See `../../wiki/entities/vllm.md`.
//! instinct-dash `VllmMetricsService.ts`.
//!
//! Sync `InstanceMetrics::fetch` returns `Unsupported` (the underlying client
//! is async); call `fetch_async` from the runner.
Expand Down
8 changes: 4 additions & 4 deletions crates/rocm-dash-core/src/bench_rollup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
//! it whenever the row set changes rather than relying on the upstream
//! `pass_n_of_n` / `pass_at_n` CSV columns.
//!
//! See `../wiki/concepts/benchmark-result-schema.md` and
//! `../wiki/entities/normalize-results.md`: rows are grouped by
//! `(cell, model, backend, concurrency)` and each group of N trials yields
//! two verdicts — strict (all N passed) and lenient (at least one passed).
//! Rows are grouped by `(cell, model, engine, tp, dtype, concurrency)` (the
//! private `RollupKey`) and each group of N trials yields two verdicts —
//! strict (all N passed) and lenient (at least one passed). `engine` is part
//! of the key, so a row with no `engine` does not group with one that has it.

use std::collections::BTreeMap;

Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/bench_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Benchmark row schema, vendored from instinct-agent-bench.
//! See `../wiki/concepts/benchmark-result-schema.md` and `../wiki/entities/csv-emitter.md`.

use serde::{Deserialize, Serialize};

Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/efficiency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//! Pure efficiency derivations (tokens-per-watt). No I/O, no rendering.
//!
//! This is the join that turns vLLM throughput + amd-smi power into a
//! per-instance capacity number. See `../wiki/concepts/metric-registry.md`.
//! per-instance capacity number.

use std::collections::HashMap;
use std::hash::BuildHasher;
Expand Down
3 changes: 2 additions & 1 deletion crates/rocm-dash-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
//! Pure types, traits, schemas, and the reducer for rocm-dash.
//! No rendering deps. No async deps at the type boundary.
//!
//! See `../wiki/concepts/tea-reducer-pattern.md` for the architectural pattern.
//! `State::apply` in `state` is the pure reducer, in the style of The Elm
//! Architecture.

pub mod bench_rollup;
pub mod bench_schema;
Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Live metric types. snake_case + units encoded in field names.
//! See `../wiki/concepts/metric-registry.md` and `../wiki/data/metric-field-index.md`.

use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/partition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! GPU partition mode enums. See `../wiki/concepts/gpu-partition-modes.md`.
//! GPU partition mode enums.

use serde::{Deserialize, Serialize};

Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! NDJSON command/event protocol between rocmdashd and rocmdash.
//! See `../wiki/comparisons/ctux-vs-rocm-dash.md` (resolved decisions).

use serde::{Deserialize, Serialize};

Expand Down
1 change: 0 additions & 1 deletion crates/rocm-dash-core/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// SPDX-License-Identifier: MIT

//! Pure reducer. `State::apply(StateEvent) -> Vec<SideEffect>`.
//! See `../wiki/concepts/tea-reducer-pattern.md`.

use std::collections::{HashMap, VecDeque};
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-core/src/vram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
//!
//! Graceful degradation: an instance that matches nothing (empty `gpu_ids`,
//! no container entry — e.g. Lemonade) resolves to `(0, 0)`, never a panic and
//! never a confidently-wrong number. See `../wiki/concepts/metric-registry.md`.
//! never a confidently-wrong number.

use std::collections::HashMap;

Expand Down
9 changes: 5 additions & 4 deletions crates/rocm-dash-daemon/src/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
//!
//! Simulates a single 8× AMD Instinct MI355X node serving inference traffic
//! through three vLLM containers. Output is the same `PersistedEntry` NDJSON
//! the daemon writes when `--persist-dir` is set, so `rocm replay` (and
//! `rocm demo`) play it back unmodified.
//! the daemon's session writer produces, so `rocm dash --replay` plays it back
//! unmodified.
//!
//! Deterministic: the same [`DemoOptions`] always produce byte-identical
//! output (seeded xorshift jitter + a fixed wallclock anchor), which the
//! tests below pin as a hard invariant. `rocm gen-demo`, `rocm demo`, and the
//! marketing screenshot/cast examples all consume this one generator.
//! tests below pin as a hard invariant. `rocm dash --demo` is the consumer: it
//! writes a session to a private file under the user data directory with
//! [`generate_file`] and replays it.

use std::collections::BTreeMap;
use std::f64::consts::PI;
Expand Down
18 changes: 11 additions & 7 deletions crates/rocm-dash-tui/examples/gen_cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
// SPDX-License-Identifier: MIT

//! Render the TUI against a synthetic session NDJSON to an asciicast v2
//! recording. The marketing page replays it as a real animated terminal
//! demo — no live terminal, no external capture tools, no drift.
//! recording — no live terminal and no external capture tools.
//!
//! Usage:
//! cargo run --release --example gen_cast -p rocm-dash-tui -- \
//! --input /tmp/mi355x-demo.ndjson \
//! --output ../marketing/asciinema/rocm-dash.cast
//! --input session.ndjson \
//! --output rocm-dash.cast
//!
//! `--input` is a `PersistedEntry` NDJSON session recording, the format
//! `rocm dash --replay` reads, such as the `session-*.ndjson` that
//! `rocm dash --demo` writes under the `demo/` folder of the user data
//! directory. Whatever the input, the cast is marked as simulated data.
//!
//! Each frame is the actual `ui::draw` framebuffer for a point in a
//! scripted storyboard (tab + modal walk), converted to a truecolor ANSI
Expand Down Expand Up @@ -45,12 +49,12 @@ const DEFAULT_BG: (u8, u8, u8) = (13, 15, 18);
about = "Render TUI storyboard to an asciicast v2 recording"
)]
struct Args {
/// Synthetic session file (produced by `make demo`).
/// Session NDJSON recording to render (`PersistedEntry` lines).
#[arg(long, default_value = "/tmp/mi355x-demo.ndjson")]
input: PathBuf,

/// Output cast file. Parent dir created if absent. Default targets the
/// repo-root `marketing/asciinema/` directory when run from `app/`.
/// Output cast file. Parent dir created if absent. The default is relative
/// to the working directory.
#[arg(long, default_value = "../marketing/asciinema/rocm-dash.cast")]
Comment thread
jussielo-amd marked this conversation as resolved.
Resolved
output: PathBuf,

Expand Down
19 changes: 11 additions & 8 deletions crates/rocm-dash-tui/examples/gen_screenshots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
// SPDX-License-Identifier: MIT

//! Render the TUI against a synthetic session NDJSON and dump each view to
//! a standalone SVG. The screenshots embed cleanly in the marketing page
//! and demo decks — no live terminal, no manual capture, no drift.
//! a standalone SVG — no live terminal and no manual capture.
//!
//! Usage:
//! cargo run --release --example gen_screenshots -p rocm-dash-tui -- \
//! --input /tmp/mi355x-demo.ndjson \
//! --output-dir marketing/screenshots
//! --input session.ndjson \
//! --output-dir screenshots
//!
//! `--input` is a `PersistedEntry` NDJSON session recording, the format
//! `rocm dash --replay` reads, such as the `session-*.ndjson` that
//! `rocm dash --demo` writes under the `demo/` folder of the user data
//! directory. Whatever the input, the views are marked as simulated data.
//!
//! Each output is the actual `ui::draw` framebuffer for a specific
//! AppState configuration (tab + modal + theme). Cells get run-length
Expand All @@ -35,13 +39,12 @@ use rocm_dash_tui::ui;
about = "Render TUI views to SVG for marketing"
)]
struct Args {
/// Synthetic session file (produced by `make demo`).
/// Session NDJSON recording to render (`PersistedEntry` lines).
#[arg(long, default_value = "/tmp/mi355x-demo.ndjson")]
input: PathBuf,

/// Output directory. Created if absent. SVGs are named per view.
/// Default targets the repo-root `marketing/screenshots/` directory
/// when run from the `app/` workspace.
/// Output directory. Created if absent. SVGs are named per view. The
/// default is relative to the working directory.
#[arg(long, default_value = "../marketing/screenshots")]
Comment thread
jussielo-amd marked this conversation as resolved.
Resolved
output_dir: PathBuf,

Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/jobs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Async job-bridge runtime (Phase 3 Wave 0).
//! Async job-bridge runtime.
//!
//! Interprets [`SideEffect::SpawnJob`]: launches the child process, streams its
//! stdout+stderr back as [`StateEvent::JobLine`], finishes with
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

//! Chat LLM configuration: a pure precedence resolver plus a std-only TCP liveness probe.
//!
//! No HTTP client here — the Rig-built `AgentClient` (Phase 3)
//! No HTTP client here — the Rig-built `AgentClient`
//! lives in `agent/clients.rs`. Keeping detection in the TUI crate preserves the
//! core's render/async-free boundary.

Expand Down
4 changes: 2 additions & 2 deletions crates/rocm-dash-tui/src/tool_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
//! Plain-data signatures ONLY (serde_json / std / serde). The bin (`apps/rocm`,
//! which owns `rocm-core` and the tool engine) implements [`RocmToolExecutor`];
//! the dash holds it as `Option<Arc<dyn RocmToolExecutor>>` and never depends on
//! `rocm-core`. Phase 2 stored the seam; Phase 3 used it for read-only tools;
//! Phase 4 adds the mutating "execute approved" path + the approval descriptor.
//! `rocm-core`. The trait has a read-only `execute` and a mutating
//! `execute_approved` path, plus the approval descriptor.

use std::sync::Arc;

Expand Down
5 changes: 2 additions & 3 deletions crates/rocm-dash-tui/src/ui/approval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@
//
// SPDX-License-Identifier: MIT

//! Approval-gate seam (Phase 3 Wave 0).
//! Approval-gate seam.
//!
//! This is a **render + event seam ONLY**. The decision *logic* — what an
//! approval actually does (run a CLI command, enable full access, approve a
//! proposal) — stays CLI-side per the working agreement
//! (`rocm-cli-unification-working-agreements.md` §1). This module renders an
//! proposal) — stays CLI-side. This module renders an
//! [`ApprovalRequest`] and reports the user's [`ApprovalVerdict`]; the caller
//! maps the verdict onto a CLI-side action.
//!
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/automations_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Automations manager overlay (Phase 3 Wave 3).
//! Automations manager overlay.
//!
//! Lists the background checks ("watchers", plumbed in from the bin which owns
//! `rocm-core`) and toggles them via the `rocm automations …` verbs:
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/command_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Command runner overlay (Phase 3 Wave 3).
//! Command runner overlay.
//!
//! A general escape hatch: type any `rocm …` subcommand and run it through the
//! job-bridge. Because arbitrary subcommands can't be statically classified as
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/config_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Config + provider manager overlay (Phase 3 Wave 3).
//! Config + provider manager overlay.
//!
//! Folds the frozen `config_manager` and `provider_manager` into one screen:
//!
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/dock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Wide-layout triptych rails (Phase 6).
//! Wide-layout triptych rails.
//!
//! When the terminal is wide enough, `ui::draw` splits the body into a left GPU
//! wall, the existing center tab body, and a persistent right dock. The right
Expand Down
7 changes: 3 additions & 4 deletions crates/rocm-dash-tui/src/ui/engine_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
//
// SPDX-License-Identifier: MIT

//! Engine manager overlay (Phase 3 Wave 1).
//! Engine manager overlay.
//!
//! Lists the serving engines ROCm CLI knows about and runs use/install/reinstall
//! **through the approval gate and the job-bridge** — never inline. Installs
//! stream their output into the shared job console (the Wave-0 `running_job`
//! replacement). This is the third operational screen on the proven primitives;
//! it feeds the serve wizard (which engine to launch a model with).
//! stream their output into the shared job console. It feeds the serve wizard
//! (which engine to launch a model with).
//!
//! The approval *decision* is the user's, captured by the render+event seam; the
//! CLI owns the actual mutation (`rocm config set-default-engine` /
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/examine_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Examine overlay (Phase 3 Wave 2).
//! Examine overlay.
//!
//! Runs `rocm examine` — a read-only environment check — through the job-bridge
//! and shows its streamed output in the shared job console. That run is
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Shared helpers for launching `rocm` sub-commands from operational screens (Phase 3 Wave 1).
//! Shared helpers for launching `rocm` sub-commands from operational screens.
//!
//! Every screen that routes a mutating action through the
//! approval gate + job-bridge resolves the binary the same way, so the logic
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/folder_browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Reusable folder browser (Phase 3 Wave 0).
//! Reusable folder browser.
//!
//! A shared input primitive: pick (or create-under) a directory. Dependency of
//! serve / install / runtime / onboarding. Models the frozen rocm-cli
Expand Down
4 changes: 2 additions & 2 deletions crates/rocm-dash-tui/src/ui/install_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//
// SPDX-License-Identifier: MIT

//! Install overlay (Phase 3 Wave 2).
//! Install overlay.
//!
//! A compact form that builds a `rocm install sdk …` invocation (TheRock ROCm
//! wheels). Dry-run is read-only and spawns straight through the job-bridge; a
//! real install is mutating and routes through the approval gate first. The
//! install folder is picked with the Wave-0 [`FolderBrowser`]. Streaming-install
//! install folder is picked with the [`FolderBrowser`]. Streaming-install
//! archetype, zero thread::spawn/try_recv.

use crossterm::event::{KeyCode, KeyEvent};
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/job_console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Job console widget (Phase 3 Wave 0).
//! Job console widget.
//!
//! Renders a [`JobState`] from the reducer: a status header, the streamed
//! output ring, and key hints. This is the shared "running job" surface every
Expand Down
2 changes: 1 addition & 1 deletion crates/rocm-dash-tui/src/ui/logs_view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

//! Logs overlay (Phase 3 Wave 3).
//! Logs overlay.
//!
//! Browses recent ROCm CLI logs via `rocm logs [--search WORDS]` — read-only, so
//! no approval gate. An optional search box filters before running. Output
Expand Down
Loading
Loading