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
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ form works depends on the engine your GPU selects.
| `rocm` | Open the launcher menu (setup, serve, diagnose, chat, dashboard) |
| `rocm examine` | Check GPU, ROCm install, engines, and managed folders |
| `rocm diagnose` | Match this machine against known ROCm/PyTorch/llama.cpp failure modes |
| `rocm diagnose --model <model>` | Say whether a model will run here, before downloading it |
| `rocm fix [<fix-id>]` | Apply a fix reported by `rocm diagnose` |
| `rocm install sdk` | Install TheRock ROCm wheels into a managed Python environment |
| `rocm install driver` | Install the AMD kernel driver on Linux |
Expand Down Expand Up @@ -261,6 +262,7 @@ the JSON report, not the human-readable one.

```
rocm diagnose [--symptom TEXT] [--top N] [--json] [--distro [NAME]]
rocm diagnose --model <model> [--json]
rocm fix [<fix-id>] [--yes] [--dry-run] [--device-index N]
```

Expand Down Expand Up @@ -452,6 +454,27 @@ rocm engines shell <engine> [--runtime-id KEY | --env-id ID] [--shell PATH]

Supported engines: `lemonade`, `vllm`.

### Will a model run here?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good writeup here, but docs/testing.md (WSL Preflight section) and docs/manual-testing.md weren't updated to mention rocm diagnose --model, despite it being new observable behavior worth a manual-test entry.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair gap, reporting rather than fixing: docs/testing.md now has a "Model Fit Preflight" section covering --model, but I left docs/manual-testing.md alone. That file's sections are interactive smoke-test walkthroughs for things without automated coverage (SDK install, server records, ComfyUI); diagnose --model already has unit, integration, and 5 e2e scenarios, so there's no manual-only gap to fill there today. Happy to add an entry if you'd rather have it regardless.


Ask before downloading anything:

```
rocm diagnose --model <model> [--json]
```

Answers in seconds, from the curated recipe and this machine's GPU — it
fetches no weights and makes no network call. The verdict is `ready`,
`degraded`, `blocked`, or `undetermined`. A `ready` answer also names the
engine `rocm serve` would use; a `blocked` one names curated models that would
run here instead.

`undetermined` is a real answer and not a failure: it is what you get when the
recipe catalog could not be read, when this machine's GPU memory could not be
measured, or when the model is not one of the curated recipes (`rocm model`
lists those). None of those say anything about whether the model fits, so none
of them are reported as though they did — `rocm serve` still accepts a model
outside the catalog, this just cannot tell you in advance how it will go.

### Model serving

Start a local OpenAI-compatible model server:
Expand Down
830 changes: 799 additions & 31 deletions apps/rocm/src/main.rs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions apps/rocm/src/remote/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ mod tests {
url: "https://example.invalid/issues".to_owned(),
},
out_of_scope: None,
// These fixtures exercise the remote renderer, which prints the
// environment half of a report. A model verdict rides on top of
// that half rather than replacing it, so there is nothing for these
// to say about one.
model: None,
}
}

Expand Down
30 changes: 26 additions & 4 deletions crates/rocm-core/src/diagnose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,16 @@ pub struct DiagnoseReport {
/// avoid emitting bare-metal-Linux diagnoses that don't apply.
#[serde(default)]
pub out_of_scope: Option<String>,
/// The verdict on a model, when `--model` named one.
///
/// Attached by the caller after the fact rather than produced by
/// [`diagnose`]: answering it needs the host's GPU memory and the engine
/// `serve` would select, neither of which an [`Examination`] carries. It
/// rides on this report rather than replacing it because the environment
/// answer stays true and useful either way — a blocked model on a host whose
/// driver is also misconfigured is two findings, not one.
#[serde(default)]
pub model: Option<crate::model_readiness::ModelReadiness>,
}

/// Whether any diagnosis cleared [`MIN_SCORE_FOR_MATCH`].
Expand Down Expand Up @@ -2115,6 +2125,20 @@ fn catalog_covers(e: &Examination) -> bool {
.any(|(_, applicable)| applicable.contains(&family))
}

/// Where to report something this CLI could not answer.
///
/// The one place a `Route` is built, so every command that has to say "I don't
/// recognise this" sends the user to the same tracker for the same target —
/// `rocm diagnose --model` has the same problem for a model the catalog does not
/// carry as `rocm diagnose` has for a symptom it does not recognise.
#[must_use]
pub fn upstream_route(target: &str) -> Route {
Route {
target: target.to_owned(),
url: upstream_tracker(target).to_owned(),
}
}

/// Where to send a user when nothing in the catalog matched.
///
/// Keyed off the *host-detected* framework, which `Examination::probe` only
Expand All @@ -2132,10 +2156,7 @@ fn route_when_no_match(e: &Examination) -> Route {
"llama-cpp" => "llama-cpp",
_ => "rocm-core",
};
Route {
target: target.to_owned(),
url: upstream_tracker(target).to_owned(),
}
upstream_route(target)
}

/// Diagnose an examination against the closed catalog.
Expand All @@ -2162,6 +2183,7 @@ pub fn diagnose(e: &Examination, symptom: &str) -> DiagnoseReport {
high_confidence_threshold: HIGH_CONFIDENCE,
route_when_no_match: route_when_no_match(e),
out_of_scope,
model: None,
}
}

Expand Down
3 changes: 2 additions & 1 deletion crates/rocm-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@ pub mod diagnose;
pub mod disk_space;
pub mod examine;
pub mod fix;
pub mod model_readiness;
pub mod openmpi;
pub mod proc_lifecycle;
pub mod runtime;
#[cfg(test)]
mod test_env;
pub mod uv;
pub use diagnose::{
DiagnoseReport, Diagnosis, Fix, diagnose as run_diagnose,
DiagnoseReport, Diagnosis, Fix, Route, diagnose as run_diagnose,
render_report_text as render_diagnose_text,
};
pub use disk_space::{
Expand Down
Loading
Loading