feat(diagnose): add the vLLM out-of-memory failure mode to the catalog (EAI-8060) - #290
Conversation
|
A few observations from a read-through:
|
ee202f0 to
a97a39f
Compare
…AI-8060) Add a keyword-scored OOM signature to the rocm-core diagnosis catalog and a matching print-only remediation recipe. The error covers two distinct faults (a tenancy collision with vLLM's fixed ~90% VRAM reservation, versus a model that genuinely does not fit), so the wording stays conditional: it never prescribes lowering --gpu-memory-utilization as the unconditional answer, and the verify step avoids the tenancy knob. Because an Examination carries no per-GPU VRAM or tenancy fields, the match is keyword-only and the checker is gated to Linux (vLLM is Linux/WSL-only). - diagnose.rs: KEYWORDS_VLLM_OOM table + check_16_vllm_oom (linux-only) - fix.rs: print-only fix-16-vllm-oom recipe; catalog count 15 -> 16 and AUTO-set assertion strengthened - engines/vllm: serve OOM hint points users at 'rocm diagnose --symptom' - e2e-cucumber: conditional-remediation scenario + step defs and catalog contract updated Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
Review feedback on #290 flagged that KEYWORDS_VLLM_OOM never required anything vLLM-specific: 'torch.OutOfMemoryError: CUDA out of memory' scores 45+45=90 (high confidence) under the keyword table alone, so any ROCm PyTorch job's OOM would be misreported as a vLLM startup OOM with rocm-serve-only remediation. gpu_memory_utilization -- the one vLLM-specific token -- was weighted lowest and never required. check_16_vllm_oom now requires an explicit vLLM anchor (the word 'vllm', or one of its distinctive flags: gpu[-_]memory[-_]utilization, tensor[-_]parallel) before the keyword table is scored at all. Update the serve OOM hint's suggested --symptom text and the matching e2e-cucumber step to carry that anchor so the self-referential 'rocm serve' -> 'rocm diagnose' flow keeps working, and add a regression test for the reported false positive. Also fix a second issue from the same review: the diagnose() WSL branch dropped sub-threshold hits from matched entirely when nothing cleared MIN_SCORE_FOR_MATCH, which the DiagnoseReport::matched doc says should never happen. It now keeps whatever run_all_checks returns (empty only when no wsl-applicable checker fired at all) and adds a regression test. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
d2cd3ac to
8d9f22d
Compare
|
Thanks for the review — addressed both issues in bac9ce2 / rebased and pushed.
All of |
Review feedback on #290 flagged that KEYWORDS_VLLM_OOM never required anything vLLM-specific: 'torch.OutOfMemoryError: CUDA out of memory' scores 45+45=90 (high confidence) under the keyword table alone, so any ROCm PyTorch job's OOM would be misreported as a vLLM startup OOM with rocm-serve-only remediation. gpu_memory_utilization -- the one vLLM-specific token -- was weighted lowest and never required. check_16_vllm_oom now requires an explicit vLLM anchor (the word 'vllm', or one of its distinctive flags: gpu[-_]memory[-_]utilization, tensor[-_]parallel) before the keyword table is scored at all. Update the serve OOM hint's suggested --symptom text and the matching e2e-cucumber step to carry that anchor so the self-referential 'rocm serve' -> 'rocm diagnose' flow keeps working, and add a regression test for the reported false positive. Also fix a second issue from the same review: the diagnose() WSL branch dropped sub-threshold hits from matched entirely when nothing cleared MIN_SCORE_FOR_MATCH, which the DiagnoseReport::matched doc says should never happen. It now keeps whatever run_all_checks returns (empty only when no wsl-applicable checker fired at all) and adds a regression test. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
8d9f22d to
a3e7db8
Compare
Review feedback on #290 flagged that KEYWORDS_VLLM_OOM never required anything vLLM-specific: 'torch.OutOfMemoryError: CUDA out of memory' scores 45+45=90 (high confidence) under the keyword table alone, so any ROCm PyTorch job's OOM would be misreported as a vLLM startup OOM with rocm-serve-only remediation. gpu_memory_utilization -- the one vLLM-specific token -- was weighted lowest and never required. check_16_vllm_oom now requires an explicit vLLM anchor (the word 'vllm', or one of its distinctive flags: gpu[-_]memory[-_]utilization, tensor[-_]parallel) before the keyword table is scored at all. Update the serve OOM hint's suggested --symptom text and the matching e2e-cucumber step to carry that anchor so the self-referential 'rocm serve' -> 'rocm diagnose' flow keeps working, and add a regression test for the reported false positive. Also fix a second issue from the same review: the diagnose() WSL branch dropped sub-threshold hits from matched entirely when nothing cleared MIN_SCORE_FOR_MATCH, which the DiagnoseReport::matched doc says should never happen. It now keeps whatever run_all_checks returns (empty only when no wsl-applicable checker fired at all) and adds a regression test. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
a3e7db8 to
2b23692
Compare
Review feedback on #290 flagged that KEYWORDS_VLLM_OOM never required anything vLLM-specific: 'torch.OutOfMemoryError: CUDA out of memory' scores 45+45=90 (high confidence) under the keyword table alone, so any ROCm PyTorch job's OOM would be misreported as a vLLM startup OOM with rocm-serve-only remediation. gpu_memory_utilization -- the one vLLM-specific token -- was weighted lowest and never required. check_16_vllm_oom now requires an explicit vLLM anchor (the word 'vllm', or one of its distinctive flags: gpu[-_]memory[-_]utilization, tensor[-_]parallel) before the keyword table is scored at all. Update the serve OOM hint's suggested --symptom text and the matching e2e-cucumber step to carry that anchor so the self-referential 'rocm serve' -> 'rocm diagnose' flow keeps working, and add a regression test for the reported false positive. Also fix a second issue from the same review: the diagnose() WSL branch dropped sub-threshold hits from matched entirely when nothing cleared MIN_SCORE_FOR_MATCH, which the DiagnoseReport::matched doc says should never happen. It now keeps whatever run_all_checks returns (empty only when no wsl-applicable checker fired at all) and adds a regression test. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
2b23692 to
7bd33b8
Compare
|
Round 2. The sub-threshold/ Two blocking:
Smaller things:
One worth confirming as deliberate: on WSL, any nonzero fix-16 score (a bare "vllm ... out of memory" scores 25) now sets
|
… the vLLM OOM anchor Round-2 review (EAI-8060): - Remove the `--tensor-parallel-size` / multi-GPU sharding remediation from both the fix catalog (fix-16-vllm-oom) and the diagnose summary: the flag does not exist and rocm-cli serves one model on a single GPU (docs/vllm.md). The 'model does not fit' branch now points only at a smaller/quantized model. - Drop `tensor[-_]parallel` from VLLM_ANCHOR_PATTERN: it is a Megatron/DeepSpeed term, so anchoring on it would misattribute those frameworks' OOMs to vLLM. The anchor is now just `vllm|gpu[-_]memory[-_]utilization`. - Route the user's *actual* failing log line into the `rocm diagnose --symptom` hint (vllm-anchored) instead of a canned literal. - Escape the dot in the `torch\.outofmemoryerror` keyword regex and let the `gpu[-_]memory[-_]utilization` keyword accept a hyphen like the anchor. - Tests: e2e reads high_confidence_threshold from the report instead of a hardcoded 75, locks out `--tensor-parallel-size`, and shares a find_vllm_oom helper; the sub-threshold unit test uses `.expect()` instead of a vacuous `if let`. - docs/vllm.md and the @requires-bare-metal doc note the `rocm diagnose --symptom` pointer and the WSL keyword-only exception. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
|
Thanks for the Round-2 review — pushed
Smaller items:
Two notes:
|
Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
volen-silo
left a comment
There was a problem hiding this comment.
LGTM.
Round 3. Both round-2 blockers are genuinely fixed, not just claimed: --tensor-parallel-size is gone from the recipe, the diagnose summary and the commands, with a negative e2e assertion locking it out; the anchor is down to vllm|gpu[-_]memory[-_]utilization, and re-simulating the Megatron/DeepSpeed cases confirms they now fail the anchor before the table is scored at all. I re-checked the surviving prescriptions against the clap definitions (--gpu-memory-utilization, --gpu <index> both real), re-derived scores by hand for the anchored / unanchored / sub-threshold cases, confirmed applies_on: LINUX_ONLY still lets rocm fix fix-16-vllm-oom run under WSL2 (current_os() has no wsl concept), and ran fmt, clippy, rocm-core, rocm-engine-vllm and cargo check -p e2e-cucumber --tests — all clean.
Your open question — out_of_scope keyed off wsl_matches.is_empty() rather than MIN_SCORE_FOR_MATCH: keep it as-is. On WSL only fix-16 can fire, and it cannot fire without the vLLM anchor, so the only symptom that suppresses the /dev/dxg routing is one that literally names vLLM or its reservation flag. A topical WEAK entry beats printing both that entry and "out of scope for this platform", which would contradict itself.
Nits (non-blocking)
- PR body still reads "exit-code/output contract change".
rocm diagnosealways exits 0 (main.rs), so only the output contract changed — and since this repo squash-merges, the body becomes the permanent commit message. Commit6097efbc's body still says "gated to Linux" / "(linux-only)" against its own&["linux", "wsl"]registration, though that one won't survive the squash. oom_utilization_hintinterpolates the raw log line into--symptom '<line>'with no quote escaping; an apostrophe breaks the copy-paste. Display-only, nothing is executed, and lines are uncapped in length.- A line matching only the bare
out of memoryphrase (e.g.RuntimeError: HIP error: out of memory) scores 25, so the command the serve hint just handed the user comes back WEAK.render_report_textstill prints the whole remediation for sub-threshold entries, so it is a mislabeled tier rather than a lost answer — but the round trip the hint advertises is not guaranteed by the keyword table. torch\.outofmemoryerrordoes not match the older fully-qualifiedtorch.cuda.OutOfMemoryError; harmless today becausehip out of memory+tried to allocate ... GiBstill reaches 75..unwrap_or("out of memory")inoom_utilization_hintis unreachable: a literal containing no newline cannot span alines()boundary, so the guard above it already guarantees a hit.- Recipe examples say
--gpu-memory-utilization 0.5while the shared hint constant anddocs/vllm.mduse0.1. - Still out of draft while its base (#251) is open, which AGENTS.md §11 asks against.
…g (EAI-8060) (#290) * feat(diagnose): add vLLM out-of-memory failure mode to the catalog (EAI-8060) Add a keyword-scored OOM signature to the rocm-core diagnosis catalog and a matching print-only remediation recipe. The error covers two distinct faults (a tenancy collision with vLLM's fixed ~90% VRAM reservation, versus a model that genuinely does not fit), so the wording stays conditional: it never prescribes lowering --gpu-memory-utilization as the unconditional answer, and the verify step avoids the tenancy knob. Because an Examination carries no per-GPU VRAM or tenancy fields, the match is keyword-only and the checker is gated to Linux (vLLM is Linux/WSL-only). - diagnose.rs: KEYWORDS_VLLM_OOM table + check_16_vllm_oom (linux-only) - fix.rs: print-only fix-16-vllm-oom recipe; catalog count 15 -> 16 and AUTO-set assertion strengthened - engines/vllm: serve OOM hint points users at 'rocm diagnose --symptom' - e2e-cucumber: conditional-remediation scenario + step defs and catalog contract updated Signed-off-by: Roman Sirokov <roman.sirokov@amd.com> * fix(diagnose): require a vLLM anchor before matching the OOM checker Review feedback on #290 flagged that KEYWORDS_VLLM_OOM never required anything vLLM-specific: 'torch.OutOfMemoryError: CUDA out of memory' scores 45+45=90 (high confidence) under the keyword table alone, so any ROCm PyTorch job's OOM would be misreported as a vLLM startup OOM with rocm-serve-only remediation. gpu_memory_utilization -- the one vLLM-specific token -- was weighted lowest and never required. check_16_vllm_oom now requires an explicit vLLM anchor (the word 'vllm', or one of its distinctive flags: gpu[-_]memory[-_]utilization, tensor[-_]parallel) before the keyword table is scored at all. Update the serve OOM hint's suggested --symptom text and the matching e2e-cucumber step to carry that anchor so the self-referential 'rocm serve' -> 'rocm diagnose' flow keeps working, and add a regression test for the reported false positive. Also fix a second issue from the same review: the diagnose() WSL branch dropped sub-threshold hits from matched entirely when nothing cleared MIN_SCORE_FOR_MATCH, which the DiagnoseReport::matched doc says should never happen. It now keeps whatever run_all_checks returns (empty only when no wsl-applicable checker fired at all) and adds a regression test. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com> * diagnose: drop the non-existent multi-GPU sharding remedy and tighten the vLLM OOM anchor Round-2 review (EAI-8060): - Remove the `--tensor-parallel-size` / multi-GPU sharding remediation from both the fix catalog (fix-16-vllm-oom) and the diagnose summary: the flag does not exist and rocm-cli serves one model on a single GPU (docs/vllm.md). The 'model does not fit' branch now points only at a smaller/quantized model. - Drop `tensor[-_]parallel` from VLLM_ANCHOR_PATTERN: it is a Megatron/DeepSpeed term, so anchoring on it would misattribute those frameworks' OOMs to vLLM. The anchor is now just `vllm|gpu[-_]memory[-_]utilization`. - Route the user's *actual* failing log line into the `rocm diagnose --symptom` hint (vllm-anchored) instead of a canned literal. - Escape the dot in the `torch\.outofmemoryerror` keyword regex and let the `gpu[-_]memory[-_]utilization` keyword accept a hyphen like the anchor. - Tests: e2e reads high_confidence_threshold from the report instead of a hardcoded 75, locks out `--tensor-parallel-size`, and shares a find_vllm_oom helper; the sub-threshold unit test uses `.expect()` instead of a vacuous `if let`. - docs/vllm.md and the @requires-bare-metal doc note the `rocm diagnose --symptom` pointer and the WSL keyword-only exception. Signed-off-by: Roman Sirokov <roman.sirokov@amd.com> * style: rustfmt the new OOM --symptom routing test assertion Signed-off-by: Roman Sirokov <roman.sirokov@amd.com> --------- Signed-off-by: Roman Sirokov <roman.sirokov@amd.com>
Summary
Adds the vLLM startup out-of-memory failure mode to the
rocm-corediagnosiscatalog, with a matching print-only remediation recipe.
The error string covers two distinct faults, and the remediation splits on which
one it is:
already in use on a shared or busy GPU; lowering the reservation is the fix, or
steer onto a less-busy device with
--gpu <index>.an earlier OOM for a later one; the fix is a smaller/quantized model or
sharding across GPUs with
--tensor-parallel-size <n>.So the wording stays conditional: it never presents
--gpu-memory-utilizationas the unconditional answer, and the
verifystep avoids the tenancy knob so itdoes not unconditionally prescribe the tenancy workaround.
What changed
crates/rocm-core/src/diagnose.rs—KEYWORDS_VLLM_OOMkeyword table andcheck_16_vllm_oom. The match is keyword-only: anExaminationcarries noper-GPU VRAM or tenancy fields, so nothing structural can corroborate it — the
user passes the error via
--symptom, or arrives from the serve failure hint.The checker is gated to Linux and WSL2 (vLLM is Linux/WSL-only). On
WSL2 this means a qualifying keyword match now produces a normal
diagnosis instead of the platform's previous unconditional "out of
scope" routing -- an exit-code/output contract change worth calling out
explicitly here, not just in code comments. A required vLLM anchor (the
word
vllm, or one of its distinctive flags/logs) gates the wholekeyword table, so a bare framework OOM string (e.g.
torch.OutOfMemoryError: CUDA out of memoryfrom an unrelated PyTorch job) is not misattributedto vLLM.
crates/rocm-core/src/fix.rs— print-onlyfix-16-vllm-oomrecipe(
auto_applicable: false, no runner). Catalog count assertion 15 → 16 and theAUTO-set assertion strengthened to pin fix-16 as print-only.
engines/vllm/src/lib.rs— the serve OOM hint points users atrocm diagnose --symptom '…'.tests/e2e-cucumber— a conditional-remediation scenario(
@id:diagnose-vllm-oom-is-conditional,@requires-os:linux), its stepdefinitions, and the catalog fix-id contract updated.
Dependencies / stacking
gpu-out-of-memory, EAI-8058) — this PR targets thatbranch, not
main, and stays in draft until feat(vllm): Tackle out of memory errors (EAI-8058) #251 merges upstream.routes users here.
Test plan
cargo test -p rocm-core --lib— passes (includes the checker tests: ahigh-confidence anchored OOM match, a bare "out of memory" staying below
threshold, a bare framework OOM without a vLLM anchor not matching at all,
Linux/WSL gating, and a WSL sub-threshold hit staying in
matchedinsteadof being routed out of scope).
cargo test -p rocm-engine-vllm --lib— passes.cargo clippy --workspace --all-targets -- -D warnings— clean.@requires-os:linuxscenario runs on theself-hosted Linux/GPU lane rather than locally.