From eef67d358631c3c7f37d4406ec52afb8facdbc41 Mon Sep 17 00:00:00 2001 From: Harkirat Gill Date: Wed, 11 Nov 2026 17:08:10 -0500 Subject: [PATCH 1/4] fix(examine): enumerate every AMD adapter on WSL and enable fix-9 there Signed-off-by: Harkirat Gill --- crates/rocm-core/src/diagnose/catalog.rs | 54 +++++-- crates/rocm-core/src/examine.rs | 9 +- crates/rocm-core/src/examine/wsl.rs | 141 +++++++++++++++++- crates/rocm-core/src/fix/catalog.rs | 14 +- crates/rocm-core/src/host_gpu.rs | 6 +- .../src/host_gpu/windows_inventory.rs | 28 ++-- crates/rocm-core/src/host_gpu/wsl.rs | 56 +++++-- crates/rocm-core/src/lib.rs | 12 +- 8 files changed, 272 insertions(+), 48 deletions(-) diff --git a/crates/rocm-core/src/diagnose/catalog.rs b/crates/rocm-core/src/diagnose/catalog.rs index 4635d4923b..9a6ea20636 100644 --- a/crates/rocm-core/src/diagnose/catalog.rs +++ b/crates/rocm-core/src/diagnose/catalog.rs @@ -67,8 +67,7 @@ const CHECKERS: &[Checker] = &[ (check_6_path_missing, &["linux", "windows", "wsl"]), (check_7_stale_repos, &["linux"]), (check_8_wheel_rocm_mismatch, &["linux", "windows", "wsl"]), - // Not "wsl": WSL2 exposes no per-device topology to collide over. - (check_9_igpu_dgpu_collision, &["linux", "windows"]), + (check_9_igpu_dgpu_collision, &["linux", "windows", "wsl"]), (check_10_container_devices, &["linux"]), (check_11_iommu_hang, &["linux"]), (check_12_repo_native_broken, &["linux"]), @@ -219,6 +218,43 @@ mod tests { use crate::diagnose::{MIN_SCORE_FOR_MATCH, diagnose, render_report_text}; use crate::examine::Gpu; + /// An APU paired with a discrete card is a finding on WSL2, not silence. + /// + /// Both halves are asserted together because either alone still reports + /// nothing useful: the checker has to run, *and* the catalog has to name the + /// WSL family, or applicability falls back to print-only and the fix the + /// finding offers cannot be run at all. + #[test] + fn an_apu_beside_a_discrete_card_is_reported_on_wsl_as_it_is_on_bare_metal() { + let mut e = igpu_dgpu_host("linux"); + e.is_wsl = true; + assert_eq!(platform_family(&e), "wsl", "the fixture must read as WSL"); + + let report = diagnose(&e, ""); + let found = report + .matched + .iter() + .find(|d| d.id == "fix-9-igpu-dgpu") + .expect("the iGPU/dGPU pairing is reported on WSL"); + + assert!( + found.score >= MIN_SCORE_FOR_MATCH, + "a reported pairing has to clear the match threshold, not merely exist: {}", + found.score + ); + let fix = found.fix.as_ref().expect("the finding carries its fix"); + assert_eq!( + fix.class, + crate::fix::FixClass::NeedsArgument, + "WSL is its own catalog family; without an entry the fix degrades to print-only" + ); + assert_eq!( + fix.needs.as_deref(), + Some("--device-index"), + "and the argument that makes it runnable must be named" + ); + } + /// A pasted HIP-loading error still opens fix-13 when no AMD GPU was /// detected at all — deliberately, and this is the test that says so. /// @@ -460,15 +496,15 @@ mod tests { #[test] fn the_shared_checks_under_report_on_wsl_rather_than_over_report() { - // WSL does not collect GPU topology: `gpus` stays empty because the - // probes that fill it read KFD and DRM, which do not exist there. The - // cross-platform checks enabled on WSL read those fields, so they run on - // less evidence here than on bare metal. + // WSL enumerates from the Windows host inventory rather than KFD and + // DRM, so a host whose inventory could not be read records no adapters + // at all. The cross-platform checks enabled on WSL then run on less + // evidence than they would on bare metal. // - // That degradation has to be one-directional. Missing topology must mean + // That degradation has to be one-directional. Missing evidence must mean // a check cannot reach its threshold on structure alone -- never that it // invents a fault. This pins the direction: on a healthy host with a - // framework installed, no shared check may fire at all. + // framework installed and no adapters recorded, no shared check may fire. let mut e = wsl_base(); e.framework = "pytorch".to_owned(); e.framework_version = "2.6.0".to_owned(); @@ -478,7 +514,7 @@ mod tests { e.rocm_path = "/opt/rocm".to_owned(); e.env .insert("PATH".to_owned(), "/opt/rocm/bin:/usr/bin".to_owned()); - assert!(e.gpus.is_empty(), "WSL collects no GPU topology"); + assert!(e.gpus.is_empty(), "this fixture records no adapters"); let report = diagnose(&e, ""); assert!( diff --git a/crates/rocm-core/src/examine.rs b/crates/rocm-core/src/examine.rs index 98ad844b8d..28cb5019b0 100644 --- a/crates/rocm-core/src/examine.rs +++ b/crates/rocm-core/src/examine.rs @@ -660,9 +660,10 @@ impl Examination { /// healthy machine. The caller already holds the detection (it is the /// `summary` of `rocm examine --json`), so this takes it rather than probing /// again: the Windows query is a PowerShell call with its own timeout. Does - /// nothing off WSL, where the probes own the field, and leaves `gpus` empty - /// (there is no PCI listing to build entries from) and `status` alone - /// (`compute_status` answers `wsl` before it asks about a GPU). + /// nothing off WSL, where the probes own the field, and leaves `gpus` and + /// `status` alone — the WSL probe fills the GPU list from the host adapter + /// inventory (`record_host_adapters`), and `compute_status` answers `wsl` + /// before it asks about a GPU. pub const fn adopt_wsl_host_gpu(&mut self, host_has_amd_gpu: bool) { if self.is_wsl { self.has_amd_gpu = host_has_amd_gpu; @@ -924,7 +925,7 @@ mod tests { assert!(e.has_amd_gpu, "a detected gfx target means a GPU is there"); assert!( e.gpus.is_empty(), - "there is no PCI listing on WSL to build gpu entries from" + "adopting the host verdict must not invent gpu entries of its own; the WSL probe fills the list from the host adapter inventory" ); assert!( !e.has_apu && !e.has_discrete_amd, diff --git a/crates/rocm-core/src/examine/wsl.rs b/crates/rocm-core/src/examine/wsl.rs index 75a52ab4a1..4aec66f7e6 100644 --- a/crates/rocm-core/src/examine/wsl.rs +++ b/crates/rocm-core/src/examine/wsl.rs @@ -6,7 +6,7 @@ //! same facts from a named WSL distribution when `rocm examine` runs on the Windows //! host. -use super::{Examination, WSL_MIN_UBUNTU, WSL_PLATFORM_NOTE, WslFacts}; +use super::{Examination, Gpu, WSL_MIN_UBUNTU, WSL_PLATFORM_NOTE, WslFacts}; use crate::probe_exec::{MEDIUM, run, run_utf16le, which}; use std::collections::BTreeMap; use std::time::Duration; @@ -19,7 +19,9 @@ use std::time::Duration; /// the Windows host driver version. pub(super) fn probe_wsl(e: &mut Examination) { let summary = crate::detect_wsl_summary(); - let (host_reachable, host_driver_version) = host_driver_fields(crate::detect_wsl_host_driver()); + let (host_driver, host_adapters) = crate::detect_wsl_host_displays(); + let (host_reachable, host_driver_version) = host_driver_fields(host_driver); + record_host_adapters(e, &host_adapters); let rocminfo = which("rocminfo"); e.wsl = Some(WslFacts { version: if crate::is_wsl1_kernel(&e.kernel_release) { @@ -50,6 +52,45 @@ pub(super) fn probe_wsl(e: &mut Examination) { e.notes.push(WSL_PLATFORM_NOTE.to_owned()); } +/// Record the Windows host's AMD adapters as this examination's GPU list. +/// +/// WSL has no `lspci` scan and no KFD topology to enumerate from, but the host +/// inventory the driver probe already reads names every AMD adapter; keeping +/// only the driver version from it is why `examine` reported one gfx target on +/// a two-GPU machine. +/// +/// The target is resolved in three tiers: PCI device id, then the shared +/// marketing-name table, then the keyword heuristic. The middle tier is not +/// optional — the id table misses parts the name table knows (`DEV_7448`, the +/// PRO W7900), which without it get no target at all. +/// +/// An adapter nothing identified keeps `is_apu` unset rather than `Some(false)`, +/// unlike `probe_gpus_windows`: `check_9_igpu_dgpu_collision` pairs an APU with a +/// discrete card, so calling an unidentified part discrete would invent that +/// pairing. An APU keyword match still counts as integrated with no target. +fn record_host_adapters(e: &mut Examination, adapters: &[crate::WslHostDisplayAdapter]) { + for adapter in adapters { + let (gfx_target, is_apu) = + match crate::host_gpu::gfx_target_from_pnp_device_id(&adapter.pnp_device_id) + .or_else(|| crate::gfx_target::gfx_target_from_amd_marketing_name(&adapter.name)) + { + Some(target) => (target.to_owned(), Some(super::gfx_is_apu_family(target))), + None => match super::linux_gpus::classify_amd_marketing_name(&adapter.name) { + (target, false) if target.is_empty() => (target, None), + (target, is_apu) => (target, Some(is_apu)), + }, + }; + e.gpus.push(Gpu { + name: adapter.name.clone(), + gfx_target, + pci_id: adapter.pnp_device_id.clone(), + is_apu, + is_amd: true, + }); + } + super::linux_gpus::summarise_gpu_categories(e); +} + /// Flatten a host-driver probe into the two [`WslFacts`] fields that carry it. /// /// One place, so the in-guest and host-side probes cannot drift on the point @@ -338,6 +379,102 @@ mod tests { use super::*; use crate::probe_exec::decode_utf16le; + fn host_adapter(name: &str, device_id: &str) -> crate::WslHostDisplayAdapter { + crate::WslHostDisplayAdapter { + name: name.to_owned(), + // The whole string `Win32_VideoController` reports, instance path + // included, so the id parser is exercised on what a host actually + // sends rather than on a tidied prefix. + pnp_device_id: format!( + "PCI\\VEN_1002&DEV_{device_id}&SUBSYS_0E0D1002&REV_00\\6&3666587B&0&00000008" + ), + } + } + + /// `DEV_7448`, the PRO W7900, is not in the PCI id table, so this adapter + /// is identifiable only by its name. Measured on a real WSL2 host: reading + /// the id and then dropping straight to the APU keyword list left this card + /// with no target at all, while the scalar probe answered `gfx1100` from + /// the same row by consulting the shared marketing-name table. + #[test] + fn an_adapter_missing_from_the_id_table_is_identified_by_its_name() { + let mut e = Examination::default(); + record_host_adapters(&mut e, &[host_adapter("AMD Radeon PRO W7900", "7448")]); + + assert_eq!( + e.gpus[0].gfx_target, "gfx1100", + "the name table names this part even though the id table does not" + ); + assert_eq!( + e.gpus[0].is_apu, + Some(false), + "and the target says it is discrete" + ); + assert!( + e.has_discrete_amd && !e.has_apu, + "a lone discrete card is exactly one kind" + ); + } + + /// A Ryzen desktop whose integrated Radeon is listed by Windows *ahead* of + /// the discrete card. Both adapters have to survive the probe — keeping only + /// the first is what reported gfx1036 on a host whose card is a gfx1201 — + /// and the pair has to read as one APU and one discrete part, which is what + /// `check_9_igpu_dgpu_collision` fires on. + #[test] + fn both_host_adapters_are_recorded_when_the_igpu_is_listed_first() { + let mut e = Examination::default(); + record_host_adapters( + &mut e, + &[ + host_adapter("AMD Radeon(TM) Graphics", "164E"), + host_adapter("AMD Radeon RX 9070 XT", "7550"), + ], + ); + + let targets: Vec<&str> = e.gpus.iter().map(|g| g.gfx_target.as_str()).collect(); + assert_eq!( + targets, + vec!["gfx1036", "gfx1201"], + "every AMD adapter the host listed must be recorded, in the host's order" + ); + assert_eq!( + e.gpus[0].is_apu, + Some(true), + "the Raphael iGPU is an APU by its device id" + ); + assert_eq!( + e.gpus[1].is_apu, + Some(false), + "the discrete card must not be folded in with it" + ); + assert!( + e.has_apu && e.has_discrete_amd, + "the host summary must show both kinds, or the iGPU/dGPU check has nothing to fire on" + ); + } + + /// An AMD adapter neither table identifies is recorded with no APU verdict. + /// `Some(false)` would read as "discrete" and could invent the second half + /// of an iGPU/dGPU pair out of a part nothing recognized. + #[test] + fn an_unidentified_adapter_is_recorded_without_an_apu_verdict() { + let mut e = Examination::default(); + record_host_adapters(&mut e, &[host_adapter("AMD Radeon(TM) Graphics", "73DF")]); + + assert_eq!(e.gpus.len(), 1, "the adapter is still reported"); + assert!( + e.gpus[0].gfx_target.is_empty(), + "no table names this device id, so no target may be claimed" + ); + assert_eq!(e.gpus[0].is_apu, None, "and no kind may be claimed either"); + assert!( + !e.has_apu && !e.has_discrete_amd, + "an unidentified part counts as neither kind" + ); + assert!(e.has_amd_gpu, "it is still an AMD GPU that is present"); + } + /// Ported from the Python preflight this replaced, whose `wsl.exe` parser /// was covered by a self-test that CI ran on both lanes. That coverage has to /// land here, or deleting the script quietly drops it. diff --git a/crates/rocm-core/src/fix/catalog.rs b/crates/rocm-core/src/fix/catalog.rs index 086a5e58a2..67063d83a4 100644 --- a/crates/rocm-core/src/fix/catalog.rs +++ b/crates/rocm-core/src/fix/catalog.rs @@ -98,9 +98,10 @@ const PRINT_ON_LINUX_AND_WSL_AUTO_ON_WINDOWS: &[Platform] = &[ on("wsl", FixClass::PrintOnly), ]; -/// `fix-9-igpu-dgpu`. Both arms short-circuit when no device index is given: -/// they print the query that identifies the discrete GPU and return, so there -/// is nothing for `--dry-run` to preview and no prompt to refuse. +/// `fix-9-igpu-dgpu`. Every arm short-circuits without `--device-index`, printing +/// the query that identifies the discrete GPU. WSL needs its own entry despite +/// running the Linux arm: applicability is keyed on platform family, so without +/// one the fix degrades to print-only. const NEEDS_DEVICE_INDEX: &[Platform] = &[ Platform { os: "linux", @@ -112,6 +113,11 @@ const NEEDS_DEVICE_INDEX: &[Platform] = &[ class: FixClass::NeedsArgument, needs: Some("--device-index"), }, + Platform { + os: "wsl", + class: FixClass::NeedsArgument, + needs: Some("--device-index"), + }, ]; /// `info-20-gpu-no-rocm-support`. Not "wsl": WSL2 reports no GPU topology, so @@ -2295,9 +2301,9 @@ mod tests { ("fix-6-path", "linux", FixClass::Auto), ("fix-6-path", "windows", FixClass::Auto), ("fix-6-path", "wsl", FixClass::Auto), - // Both arms short-circuit until `--device-index` names a target. ("fix-9-igpu-dgpu", "linux", FixClass::NeedsArgument), ("fix-9-igpu-dgpu", "windows", FixClass::NeedsArgument), + ("fix-9-igpu-dgpu", "wsl", FixClass::NeedsArgument), ] ); // fix-16-vllm-oom carries a workaround the user must weigh (lowering the diff --git a/crates/rocm-core/src/host_gpu.rs b/crates/rocm-core/src/host_gpu.rs index c2ea229b61..49092c3cb4 100644 --- a/crates/rocm-core/src/host_gpu.rs +++ b/crates/rocm-core/src/host_gpu.rs @@ -85,10 +85,10 @@ use windows_inventory::{ use wsl::detect_wsl_windows_display_probe_text; #[cfg(test)] use wsl::local_windows_host_driver_probe; -pub use wsl::{WSL_ROCDXG_READY, WslHostDriverProbe, is_wsl_host}; +pub use wsl::{WSL_ROCDXG_READY, WslHostDisplayAdapter, WslHostDriverProbe, is_wsl_host}; pub(crate) use wsl::{ - detect_local_windows_host_driver, detect_wsl_host_driver, detect_wsl_summary, is_wsl1_kernel, - ldconfig_cache, ldconfig_lists_librocdxg, + detect_local_windows_host_driver, detect_wsl_host_displays, detect_wsl_host_driver, + detect_wsl_summary, is_wsl1_kernel, ldconfig_cache, ldconfig_lists_librocdxg, }; use wsl::{detect_wsl_windows_display_gfx_target_fast, wsl_driver_summary}; diff --git a/crates/rocm-core/src/host_gpu/windows_inventory.rs b/crates/rocm-core/src/host_gpu/windows_inventory.rs index ec6db3e7b5..1cb8cd16ec 100644 --- a/crates/rocm-core/src/host_gpu/windows_inventory.rs +++ b/crates/rocm-core/src/host_gpu/windows_inventory.rs @@ -146,18 +146,26 @@ impl WindowsExamineInventory { /// vendor, so the rows also hold devices like "AMD Bluetooth Capture Audio /// Device" and "Intel(R) UHD Graphics". A row counts only with an AMD PCI /// device id (`PCI\VEN_1002`) or a marketing name `rocm examine` recognizes. + /// The listed rows that are AMD GPUs, by the test + /// [`Self::amd_display_count`] describes. + /// + /// The count is defined as the length of this, rather than the two sharing + /// a copied predicate, because the WSL adapter list is built from here too: + /// a row the list reported but the count did not would let `rocm serve + /// --gpu N` refuse an index `rocm examine` had just shown. + pub(super) fn amd_displays(&self) -> impl Iterator { + self.displays.iter().filter(|display| { + display + .pnp_device_id + .as_deref() + .is_some_and(|id| id.to_ascii_uppercase().starts_with("PCI\\VEN_1002")) + || gfx_target_from_amd_marketing_name(&display.name).is_some() + }) + } + #[cfg(any(windows, test))] fn amd_display_count(&self) -> usize { - self.displays - .iter() - .filter(|display| { - display - .pnp_device_id - .as_deref() - .is_some_and(|id| id.to_ascii_uppercase().starts_with("PCI\\VEN_1002")) - || gfx_target_from_amd_marketing_name(&display.name).is_some() - }) - .count() + self.amd_displays().count() } pub(super) fn amd_display_driver_detail(&self) -> Option { diff --git a/crates/rocm-core/src/host_gpu/wsl.rs b/crates/rocm-core/src/host_gpu/wsl.rs index c5900a039a..1d4db45180 100644 --- a/crates/rocm-core/src/host_gpu/wsl.rs +++ b/crates/rocm-core/src/host_gpu/wsl.rs @@ -79,10 +79,29 @@ pub(super) fn local_windows_host_driver_probe( ) } -/// Ask the Windows host, from inside the distro, which AMD display driver it runs. -pub(crate) fn detect_wsl_host_driver() -> WslHostDriverProbe { +/// One AMD display adapter the Windows host reports, as the guest sees it. +/// +/// Carries what an `examine` GPU entry is built from and no more. The driver +/// version is deliberately not here: it is a fact about the host, and +/// [`WslHostDriverProbe`] can say "the host was never asked", which a +/// per-adapter `Option` could not. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct WslHostDisplayAdapter { + pub name: String, + /// `PCI\VEN_1002&DEV_...`, or empty when the row carried no id. + pub pnp_device_id: String, +} + +/// Ask the Windows host, from inside the distro, which AMD display driver it +/// runs *and* which AMD adapters it has. +/// +/// Both answers come out of one query on purpose. The inventory is a +/// PowerShell call with its own timeout, on a path the user is waiting on, so +/// asking once for the version and again for the adapters would pay the +/// slowest part of the WSL probe twice for data the first call already parsed. +pub(crate) fn detect_wsl_host_displays() -> (WslHostDriverProbe, Vec) { if !is_wsl_host() { - return WslHostDriverProbe::Unreachable; + return (WslHostDriverProbe::Unreachable, Vec::new()); } let Some(output) = capture_optional_command_with_timeout( "powershell.exe", @@ -95,14 +114,31 @@ pub(crate) fn detect_wsl_host_driver() -> WslHostDriverProbe { ], WINDOWS_INVENTORY_QUERY_TIMEOUT, ) else { - return WslHostDriverProbe::Unreachable; + return (WslHostDriverProbe::Unreachable, Vec::new()); }; - parse_windows_examine_inventory(&output) - .amd_display_driver_version() - .map_or( - WslHostDriverProbe::NoAmdDisplay, - WslHostDriverProbe::Version, - ) + let inventory = parse_windows_examine_inventory(&output); + let adapters = inventory + .amd_displays() + .map(|display| WslHostDisplayAdapter { + name: display.name.trim().to_owned(), + pnp_device_id: display + .pnp_device_id + .as_deref() + .unwrap_or_default() + .trim() + .to_owned(), + }) + .collect(); + let driver = inventory.amd_display_driver_version().map_or( + WslHostDriverProbe::NoAmdDisplay, + WslHostDriverProbe::Version, + ); + (driver, adapters) +} + +/// Ask the Windows host, from inside the distro, which AMD display driver it runs. +pub(crate) fn detect_wsl_host_driver() -> WslHostDriverProbe { + detect_wsl_host_displays().0 } pub(super) fn detect_wsl_windows_display_probe_text() -> Option { diff --git a/crates/rocm-core/src/lib.rs b/crates/rocm-core/src/lib.rs index cef907d063..6bdfcce1da 100644 --- a/crates/rocm-core/src/lib.rs +++ b/crates/rocm-core/src/lib.rs @@ -140,16 +140,16 @@ pub use gfx_target::{ pub use hardware_root::host_path; pub use host_gpu::{ DriverSummary, ExamineSummary, HostGpuSummary, WSL_ROCDXG_READY, WindowsGpuListing, - WslHostDriverProbe, WslSummary, default_engine_for_host, default_engine_for_platform, - detect_gpu_driver_version, detect_host_gfx_target, detect_host_gpu_diagnostics, - detect_host_gpu_summary, detect_system_ram_gib, has_usable_amd_gpu, is_amdgpu_device, - is_wsl_host, preferred_serve_engine_for_host_gpu_summary, usable_amd_gpu_indices, - windows_amd_gpu_listing, + WslHostDisplayAdapter, WslHostDriverProbe, WslSummary, default_engine_for_host, + default_engine_for_platform, detect_gpu_driver_version, detect_host_gfx_target, + detect_host_gpu_diagnostics, detect_host_gpu_summary, detect_system_ram_gib, + has_usable_amd_gpu, is_amdgpu_device, is_wsl_host, preferred_serve_engine_for_host_gpu_summary, + usable_amd_gpu_indices, windows_amd_gpu_listing, }; #[cfg(any(target_os = "linux", test))] use host_gpu::{KfdGpuNode, kfd_gpu_nodes_in}; use host_gpu::{ - detect_linux_sysfs_gfx_target, detect_local_windows_host_driver, detect_wsl_host_driver, + detect_linux_sysfs_gfx_target, detect_local_windows_host_driver, detect_wsl_host_displays, detect_wsl_summary, is_wsl1_kernel, ldconfig_cache, ldconfig_lists_librocdxg, }; pub use jsonl_store::jsonl_lock_path; From ae1ed6941631e58a161a73e377efe3550cc8b35c Mon Sep 17 00:00:00 2001 From: Harkirat Gill Date: Thu, 12 Nov 2026 13:56:53 -0500 Subject: [PATCH 2/4] fix(doctor): regenerate catalog outputs and correct stale WSL GPU-list comments Signed-off-by: Harkirat Gill --- crates/rocm-core/src/diagnose/catalog.rs | 19 +++++++++++-------- crates/rocm-core/src/fix/catalog.rs | 6 +++--- .../rocm-core/src/host_gpu/gpu_visibility.rs | 7 ++++--- .../src/host_gpu/windows_inventory.rs | 12 ++++++------ doctor-catalog.json | 5 +++++ .../rocm-current-cli-carries-on/replies.json | 2 +- .../replies.json | 2 +- .../replies.json | 2 +- .../replies.json | 2 +- .../replies.json | 2 +- .../rocm-vllm-import-error/replies.json | 2 +- .../rocm-vllm-oom-at-startup/replies.json | 2 +- skills/rocm-doctor/reference.md | 10 +++++----- tests/e2e-cucumber/features/diagnose.feature | 9 ++++----- 14 files changed, 45 insertions(+), 37 deletions(-) diff --git a/crates/rocm-core/src/diagnose/catalog.rs b/crates/rocm-core/src/diagnose/catalog.rs index 9a6ea20636..e002a494d1 100644 --- a/crates/rocm-core/src/diagnose/catalog.rs +++ b/crates/rocm-core/src/diagnose/catalog.rs @@ -48,15 +48,17 @@ use crate::examine::Examination; /// A checker plus the OS families it applies to. type Checker = (fn(&Examination, &str) -> Diagnosis, &'static [&'static str]); -// The `wsl` entries below run on less evidence than on bare metal: WSL collects -// no GPU topology (`gpus` is empty, because the probes that fill it read KFD and -// DRM), so the parts of those checks that compare a detected gfx target against a -// wheel's arch list cannot contribute. They still fire on the evidence WSL does +// The `wsl` entries below run on different evidence than on bare metal. WSL has +// no KFD or DRM topology, so its `gpus` are the adapters the Windows host lists, +// which are not guaranteed to be devices the guest runtime can open. A check that +// compares a detected gfx target against a wheel's arch list can therefore name +// an adapter the runtime never sees. They also fire on the evidence WSL does // have -- environment, ROCm install, symptom keywords -- which is strictly better // than the previous behaviour of not running at all. // -// The degradation is one-directional and must stay that way: less evidence means -// a check may miss a real fault, never that it invents one. Pinned by +// When the host inventory could not be read, `gpus` is empty and the degradation +// is one-directional: less evidence means a check may miss a real fault, never +// that it invents one. Pinned by // `the_shared_checks_under_report_on_wsl_rather_than_over_report`. const CHECKERS: &[Checker] = &[ (check_1_arch_not_in_wheel, &["linux", "windows", "wsl"]), @@ -100,8 +102,9 @@ const CHECKERS: &[Checker] = &[ // same 64 MB default a container does, so leaving this tagged `linux` alone // would silence it on one of the two platforms most likely to have it. (check_19_shm_too_small, &["linux", "wsl"]), - // Not "wsl": WSL2 reports no GPU topology (`gpus` is empty), so this check - // has nothing to read there and would never fire. + // Not "wsl": this makes a claim about the whole machine's ROCm support, and + // WSL's `gpus` come from the Windows host inventory rather than from what the + // guest runtime can open. (check_20_gpu_unsupported_by_rocm, &["linux", "windows"]), // Windows only: the runtime is read from the Windows System32 folder. A WSL // distro is examined as a distro, so it has no such runtime to read. diff --git a/crates/rocm-core/src/fix/catalog.rs b/crates/rocm-core/src/fix/catalog.rs index 67063d83a4..46cccda69a 100644 --- a/crates/rocm-core/src/fix/catalog.rs +++ b/crates/rocm-core/src/fix/catalog.rs @@ -120,9 +120,9 @@ const NEEDS_DEVICE_INDEX: &[Platform] = &[ }, ]; -/// `info-20-gpu-no-rocm-support`. Not "wsl": WSL2 reports no GPU topology, so -/// the checker that produces this id never fires there and `rocm fix` would be -/// claiming an answer for a host it was never asked about. +/// `info-20-gpu-no-rocm-support`. Not "wsl": the checker that produces this id +/// does not run there, so `rocm fix` would be claiming an answer for a host it +/// was never asked about. const DIAGNOSE_ONLY_ON_LINUX_AND_WINDOWS: &[Platform] = &[ on("linux", FixClass::DiagnoseOnly), on("windows", FixClass::DiagnoseOnly), diff --git a/crates/rocm-core/src/host_gpu/gpu_visibility.rs b/crates/rocm-core/src/host_gpu/gpu_visibility.rs index 9fb70cef4f..b5bb92c2b2 100644 --- a/crates/rocm-core/src/host_gpu/gpu_visibility.rs +++ b/crates/rocm-core/src/host_gpu/gpu_visibility.rs @@ -56,9 +56,10 @@ fn probe_usable_amd_gpu_indices() -> Option> { /// The usable ordinals on a WSL host, from the plumbing `examine` reports on. /// -/// One device: WSL2 exposes no per-device topology to enumerate, and the -/// visibility mask still applies on top so an explicit `HIP_VISIBLE_DEVICES=""` -/// is honoured. Takes the summary rather than reading the machine so the +/// One device: this reads the guest's ROCDXG readiness, not the host adapter list +/// `examine` records in `gpus`, so on a multi-adapter host the two can disagree. +/// The visibility mask still applies on top so an explicit +/// `HIP_VISIBLE_DEVICES=""` is honoured. Takes the summary rather than reading the machine so the /// decision -- ready means a device, anything else means none -- is testable /// without a WSL host. #[cfg(any(target_os = "linux", test))] diff --git a/crates/rocm-core/src/host_gpu/windows_inventory.rs b/crates/rocm-core/src/host_gpu/windows_inventory.rs index 1cb8cd16ec..0dcf5730b2 100644 --- a/crates/rocm-core/src/host_gpu/windows_inventory.rs +++ b/crates/rocm-core/src/host_gpu/windows_inventory.rs @@ -140,12 +140,6 @@ impl WindowsExamineInventory { } } - /// How many listed rows are AMD GPUs, by the stricter test the driver and - /// GPU-name picks use (`preferred_amd_display`), not the loose name match - /// `pnputil`'s rows are filtered with. The CIM sources do not filter by - /// vendor, so the rows also hold devices like "AMD Bluetooth Capture Audio - /// Device" and "Intel(R) UHD Graphics". A row counts only with an AMD PCI - /// device id (`PCI\VEN_1002`) or a marketing name `rocm examine` recognizes. /// The listed rows that are AMD GPUs, by the test /// [`Self::amd_display_count`] describes. /// @@ -163,6 +157,12 @@ impl WindowsExamineInventory { }) } + /// How many listed rows are AMD GPUs, by the stricter test the driver and + /// GPU-name picks use (`preferred_amd_display`), not the loose name match + /// `pnputil`'s rows are filtered with. The CIM sources do not filter by + /// vendor, so the rows also hold devices like "AMD Bluetooth Capture Audio + /// Device" and "Intel(R) UHD Graphics". A row counts only with an AMD PCI + /// device id (`PCI\VEN_1002`) or a marketing name `rocm examine` recognizes. #[cfg(any(windows, test))] fn amd_display_count(&self) -> usize { self.amd_displays().count() diff --git a/doctor-catalog.json b/doctor-catalog.json index 64580f82b4..a3204ef842 100644 --- a/doctor-catalog.json +++ b/doctor-catalog.json @@ -153,6 +153,11 @@ "os": "windows", "class": "needs-argument", "needs": "--device-index" + }, + { + "os": "wsl", + "class": "needs-argument", + "needs": "--device-index" } ], "needs_sudo": false, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-current-cli-carries-on/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-current-cli-carries-on/replies.json index 9c0ed11c4b..3c825e89fc 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-current-cli-carries-on/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-current-cli-carries-on/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-examine-fails-relays-the-error/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-examine-fails-relays-the-error/replies.json index 6b3f182c39..63eae37e9e 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-examine-fails-relays-the-error/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-examine-fails-relays-the-error/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-amd-found-goes-on-to-diagnose/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-amd-found-goes-on-to-diagnose/replies.json index 5592989a87..115adfb3b3 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-amd-found-goes-on-to-diagnose/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-amd-found-goes-on-to-diagnose/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-no-amd-gpu-asks-which-gpu/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-no-amd-gpu-asks-which-gpu/replies.json index f98514ddff..445d20a8bc 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-no-amd-gpu-asks-which-gpu/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-no-amd-gpu-asks-which-gpu/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-wsl-host-gpu-hidden-asks-which-gpu/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-wsl-host-gpu-hidden-asks-which-gpu/replies.json index b45069b6ca..3a64d5069c 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-wsl-host-gpu-hidden-asks-which-gpu/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-no-vendor-wsl-host-gpu-hidden-asks-which-gpu/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-vllm-import-error/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-vllm-import-error/replies.json index eb3b977605..14f7367a52 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-vllm-import-error/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-vllm-import-error/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/evals/fixtures/rocm-vllm-oom-at-startup/replies.json b/skills/rocm-doctor/evals/fixtures/rocm-vllm-oom-at-startup/replies.json index d385254b59..3caca66ea7 100644 --- a/skills/rocm-doctor/evals/fixtures/rocm-vllm-oom-at-startup/replies.json +++ b/skills/rocm-doctor/evals/fixtures/rocm-vllm-oom-at-startup/replies.json @@ -5,7 +5,7 @@ "rc": 0 }, "fix_json": { - "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", + "stdout": "{\n \"contract_version\": 1,\n \"entries\": [\n {\n \"id\": \"fix-1-arch\",\n \"title\": \"GPU gfx target not in framework arch list\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-2-unset-override\",\n \"title\": \"Unset HSA_OVERRIDE_GFX_VERSION\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-3-rocm-kernel\",\n \"title\": \"ROCm/distro/kernel triple unsupported\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-4-render-group\",\n \"title\": \"Add user to render/video groups\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": true\n },\n {\n \"id\": \"fix-5-amdgpu-load\",\n \"title\": \"Load amdgpu (and clear any blacklist)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-6-path\",\n \"title\": \"Add the ROCm/HIP bin directory to PATH\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"auto\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"auto\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-7-stale-repos\",\n \"title\": \"Quarantine duplicate AMD repos\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-8-wheel-rocm\",\n \"title\": \"Reinstall the framework against the system ROCm/HIP X.Y release\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n },\n {\n \"id\": \"fix-9-igpu-dgpu\",\n \"title\": \"Hide the iGPU with HIP_VISIBLE_DEVICES\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"needs-argument\",\n \"needs\": \"--device-index\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-10-container\",\n \"title\": \"Re-launch the container with AMD devices passed through\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-11-iommu\",\n \"title\": \"Add iommu=pt to the kernel command line\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-12-installer\",\n \"title\": \"Reset repo-native install state and reinstall\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": true,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-13-hip-sdk-missing\",\n \"title\": \"Install the AMD HIP SDK for Windows\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html\"\n },\n {\n \"id\": \"fix-14-adrenalin-too-old\",\n \"title\": \"Update the Adrenalin / kernel-mode driver\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-windows/en/latest/install/install.html\"\n },\n {\n \"id\": \"fix-15-msvc-redist\",\n \"title\": \"Install the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-16-vllm-oom\",\n \"title\": \"vLLM ran the GPU out of memory at startup\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-17-torch-dlpack\",\n \"title\": \"Restore the engine's pinned torch (torch-c-dlpack-ext loads the CUDA variant)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-1-gpu-not-exposed\",\n \"title\": \"Expose the GPU to the WSL distro (/dev/dxg)\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-2-dxcore-missing\",\n \"title\": \"Restore the WSL DXCore libraries\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-3-rocdxg-missing\",\n \"title\": \"Install ROCDXG in the WSL distro\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-4-rocdxg-not-linked\",\n \"title\": \"Refresh the linker cache so ROCDXG is loadable\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-5-distro-too-old\",\n \"title\": \"Move to a distro release the WSL path supports\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-6-host-driver-too-old\",\n \"title\": \"Update the AMD driver on the Windows host\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-wsl-7-wsl1\",\n \"title\": \"Convert the distro from WSL 1 to WSL 2\",\n \"platforms\": [\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-18-comgr-conflict\",\n \"title\": \"Code object manager library does not belong to the active HIP runtime\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-19-shm-too-small\",\n \"title\": \"Raise the shared memory allowance\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"print-only\"\n },\n {\n \"os\": \"wsl\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": true,\n \"needs_reboot\": false,\n \"needs_relogin\": false\n },\n {\n \"id\": \"fix-21-msvc-redist-outdated\",\n \"title\": \"Update the MSVC 2015-2022 runtime redistributable\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://aka.ms/vs/17/release/vc_redist.x64.exe\"\n },\n {\n \"id\": \"fix-22-display-driver-old\",\n \"title\": \"Look for a newer AMD display driver (advice only)\",\n \"platforms\": [\n {\n \"os\": \"windows\",\n \"class\": \"print-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": true,\n \"needs_relogin\": false,\n \"doc_url\": \"https://www.amd.com/en/support\"\n },\n {\n \"id\": \"info-20-gpu-no-rocm-support\",\n \"title\": \"GPU has no ROCm/HIP support (Vulkan backend still works)\",\n \"platforms\": [\n {\n \"os\": \"linux\",\n \"class\": \"diagnose-only\"\n },\n {\n \"os\": \"windows\",\n \"class\": \"diagnose-only\"\n }\n ],\n \"needs_sudo\": false,\n \"needs_reboot\": false,\n \"needs_relogin\": false,\n \"doc_url\": \"https://rocm.docs.amd.com/projects/install-on-linux/en/latest/reference/system-requirements.html\"\n }\n ],\n \"exit_codes\": {\n \"declined\": 5,\n \"failed\": 4,\n \"internal\": 1,\n \"not_applicable\": 3,\n \"ok\": 0,\n \"unknown_id\": 2\n },\n \"exit_code_descriptions\": {\n \"declined\": \"The fix needed confirmation and did not get it: the user answered no, or stdin is not a terminal and `--yes` was not given. Nothing the confirmation guarded was changed.\",\n \"failed\": \"A step of the fix failed: a command it ran, a file it wrote, or a read of state it needed before planning (the current User PATH on Windows, read even under `--dry-run`). The change that step was to make was not made.\",\n \"internal\": \"The CLI is inconsistent with itself (a recipe it says it can carry out, with nothing to carry it out with); never a fault of the machine. Exit 1 is also any other error the command reports on stderr, such as `--json` combined with a fix-id.\",\n \"not_applicable\": \"The entry exists but cannot be used here: it is for another platform, the host lacks something the fix cannot do without (a tool it runs, or `sudo` when not root; an install it points at; the current user's name; or a home directory to write a file in), or an argument it was given is one it cannot use, such as a negative device index written `--device-index=-1`. Nothing was tried. Written with a space instead, `--device-index -1` is a usage error and exits 2 (see `unknown_id`).\",\n \"ok\": \"Nothing failed: the fix was applied, found nothing to change (already in place, or a setting it leaves for you to edit), was previewed with `--dry-run`, or only printed what to do (steps to run yourself, or the explanation of a diagnose-only entry); or the catalog was listed. A `--dry-run` preview is not always 0: it exits 3 or 4 when the fix cannot be planned.\",\n \"unknown_id\": \"No catalog entry has that fix-id; no fix step was run, and a stderr line starts with `Unknown fix-id:`. Exit 2 is also what the argument parser returns for a malformed command line (an unknown option, a missing value, or a value it cannot read, such as a non-number for `--device-index`, or a negative one written after a space, `--device-index -1`, which it reads as an unknown option), before any fix-id is looked up; that refusal has a stderr line starting with `error:` and never says `Unknown fix-id:`. Another line, such as a one-time `rocm:` notice, can come first. The code alone cannot tell the two apart; the message can.\"\n }\n}\n", "stderr": "", "rc": 0 }, diff --git a/skills/rocm-doctor/reference.md b/skills/rocm-doctor/reference.md index 8329422d10..6e3297cf5f 100644 --- a/skills/rocm-doctor/reference.md +++ b/skills/rocm-doctor/reference.md @@ -142,8 +142,8 @@ non-interactive shell without `--yes`, and confirm first. **Two exceptions:** not edit your dotfiles. So on Linux it never prompts, `--dry-run` has nothing to preview, and `--yes` is never read. Do not tell a Linux user a dry run previewed a change that was never going to happen. -- **`fix-9-igpu-dgpu` needs `--device-index N` wherever it applies (Linux and - Windows) and is never marked AUTO.** Without the flag the runner just prints +- **`fix-9-igpu-dgpu` needs `--device-index N` wherever it applies (Linux, + Windows and WSL) and is never marked AUTO.** Without the flag the runner just prints the `rocminfo`/`hipInfo` query that identifies which index is the discrete GPU and returns 0: no prompt, nothing for `--dry-run` to preview, nothing pinned. Run `rocm fix fix-9-igpu-dgpu --device-index N` (not the bare id) @@ -167,7 +167,7 @@ reporting confident nonsense. | `fix-6-path` | linux/windows/wsl | ROCm/HIP binaries not on PATH after install | `rocminfo: command not found`, `hipInfo` missing from PATH | auto | | `fix-7-stale-repos` | linux | Stale/conflicting APT/DNF/zypper repos from prior installer runs | apt 404 `repo.radeon.com`, unmet deps, ≥2 ROCm repo files | print-only | | `fix-8-wheel-rocm` | linux/windows/wsl | Framework wheel built for a different ROCm X.Y release than the system | `libamdhip64.so.X` / `amdhip64_X.dll` load failure | print-only | -| `fix-9-igpu-dgpu` | linux/windows | iGPU enumerated alongside dGPU, destabilising the runtime | APU + discrete AMD present, `HIP_VISIBLE_DEVICES` unset, crash/segfault | needs-arg | +| `fix-9-igpu-dgpu` | linux/windows/wsl | iGPU enumerated alongside dGPU, destabilising the runtime | APU + discrete AMD present, `HIP_VISIBLE_DEVICES` unset, crash/segfault | needs-arg | | `fix-10-container` | linux | Container can't see `/dev/kfd` or `/dev/dri/renderD*` | running in docker/podman, kfd/render devices missing | print-only | | `fix-11-iommu` | linux | Multi-GPU hang with IOMMU enabled | ≥2 AMD GPUs, `iommu=` not `pt`, hang/deadlock/timeout | print-only | | `fix-12-installer` | linux | Repo-native package-manager install left a broken DKMS / repo state | dpkg half-configured, DKMS build failure, dpkg/apt error | print-only | @@ -200,8 +200,8 @@ entry would leave a hole rather than renumber the ones after it. Linux-only: fix-3, -4, -5, -7, -10, -11, -12. Windows-only: fix-13, -14, -15, -21, -22. Linux + Windows: info-20 (diagnose-only). -WSL-only: fix-wsl-1 through fix-wsl-7. Linux + Windows: fix-9. -Linux + WSL: fix-16, -17, -18, -19. Linux + Windows + WSL: fix-1, -2, -6, -8. +WSL-only: fix-wsl-1 through fix-wsl-7. +Linux + WSL: fix-16, -17, -18, -19. Linux + Windows + WSL: fix-1, -2, -6, -8, -9. ## Framework routing diff --git a/tests/e2e-cucumber/features/diagnose.feature b/tests/e2e-cucumber/features/diagnose.feature index 776e69a01e..f68ccb0c18 100644 --- a/tests/e2e-cucumber/features/diagnose.feature +++ b/tests/e2e-cucumber/features/diagnose.feature @@ -79,11 +79,10 @@ Feature: Diagnosing failures and listing fixes # # @requires-bare-metal on top of that: the scenario needs a fix that both # applies here AND reaches the consent gate, and only fix-9 does that on a host - # with nothing installed. fix-9 does not apply on WSL2 — a single device with - # no topology cannot have an iGPU/dGPU collision — so there the run stops at - # the wrong-platform refusal before the gate is ever reached. That is designed - # behaviour, not a bug, so it is a skip rather than an xfail. The gate is - # shared code and stays covered by the mock and Linux GPU lanes. + # with nothing installed. fix-9 now applies on WSL2 as well, so the wrong-platform + # refusal no longer stops the run there, but this scenario has not been run on a + # WSL2 lane and stays a skip there until it has. The gate is shared code and + # stays covered by the mock and Linux GPU lanes. @id:diagnose-fix-requires-agreement-before-changing-anything @requires-os:linux @requires-bare-metal Scenario: diagnose-08 - A fix that changes the machine is not applied without agreement Given a user who has chosen a fix that would change the machine From f8c14d7d882799139297d4d11e84cb5c5569b332 Mon Sep 17 00:00:00 2001 From: Harkirat Gill Date: Fri, 13 Nov 2026 11:37:16 -0500 Subject: [PATCH 3/4] test(examine): cover the WSL host-adapter mapping and list every host GPU in an e2e scenario Signed-off-by: Harkirat Gill --- crates/rocm-core/src/host_gpu/wsl.rs | 109 +++++++++++++++++- tests/e2e-cucumber/features/diagnose.feature | 6 +- tests/e2e-cucumber/features/examine.feature | 16 +++ tests/e2e-cucumber/tests/e2e/examine_steps.rs | 29 +++++ 4 files changed, 155 insertions(+), 5 deletions(-) diff --git a/crates/rocm-core/src/host_gpu/wsl.rs b/crates/rocm-core/src/host_gpu/wsl.rs index 1d4db45180..e87fcd0eca 100644 --- a/crates/rocm-core/src/host_gpu/wsl.rs +++ b/crates/rocm-core/src/host_gpu/wsl.rs @@ -116,11 +116,23 @@ pub(crate) fn detect_wsl_host_displays() -> (WslHostDriverProbe, Vec (WslHostDriverProbe, Vec) { let adapters = inventory .amd_displays() .map(|display| WslHostDisplayAdapter { name: display.name.trim().to_owned(), + // An adapter with no id is still an adapter. The empty string says + // "this row carried none", which the gfx-target lookup answers + // `None` for, rather than dropping a GPU the host does list. pnp_device_id: display .pnp_device_id .as_deref() @@ -490,6 +502,101 @@ mod tests { use crate::host_gpu::tests::{CountingSources, pnputil_host}; use crate::host_gpu::windows_inventory::{InventoryScope, assemble_windows_inventory}; + /// Both answers come off one inventory, in the host's own order. + /// + /// Driven from the text the query really emits (`GPU`, name, driver, PNP id, + /// date, tab separated) rather than from hand-built adapters, because the + /// fields this mapping is responsible for are the ones the text decides: + /// trimming, and what an absent id becomes. Both rows are a pairing measured + /// on a real WSL2 host, including the generic name Windows gives the second + /// adapter. + #[test] + fn one_inventory_yields_both_the_driver_and_every_amd_adapter() { + let inventory = parse_windows_examine_inventory( + "GPU\t AMD Radeon PRO W7900 \t32.0.32839.3472\tPCI\\VEN_1002&DEV_7448&SUBSYS_0E0D1002&REV_00\\6&3666587B&0&00000008\t2025-11-04\n\ + GPU\tAMD Radeon(TM) Graphics\t32.0.32839.3472\tPCI\\VEN_1002&DEV_73DF&SUBSYS_0E371002&REV_88\\6&3008A2D0&0&00000009\t2025-11-04\n", + ); + + let (driver, adapters) = host_displays_from_inventory(&inventory); + + assert_eq!( + driver, + WslHostDriverProbe::Version("32.0.32839.3472".to_owned()), + "the driver answer comes from the same query as the adapters" + ); + assert_eq!( + adapters.len(), + 2, + "every AMD adapter survives, not just the preferred one" + ); + assert_eq!( + adapters[0].name, "AMD Radeon PRO W7900", + "the name is trimmed of the padding the query leaves on it" + ); + assert_eq!( + adapters[0].pnp_device_id, + "PCI\\VEN_1002&DEV_7448&SUBSYS_0E0D1002&REV_00\\6&3666587B&0&00000008", + "the id is carried whole, instance path included" + ); + assert_eq!( + adapters[1].name, "AMD Radeon(TM) Graphics", + "and the host's order is preserved" + ); + } + + /// A row with no PNP id is still a reported adapter. + /// + /// The id becomes an empty string rather than the row being dropped: the + /// host said an AMD adapter is there, and only its identity is unknown. + #[test] + fn an_adapter_with_no_device_id_is_kept_with_an_empty_one() { + let inventory = + parse_windows_examine_inventory("GPU\tAMD Radeon RX 9070 XT\t32.0.32015.7029\n"); + + let (driver, adapters) = host_displays_from_inventory(&inventory); + + assert_eq!( + adapters.len(), + 1, + "the adapter is not dropped for want of an id" + ); + assert_eq!(adapters[0].name, "AMD Radeon RX 9070 XT"); + assert!( + adapters[0].pnp_device_id.is_empty(), + "an absent id reads as empty, not as a missing adapter" + ); + assert_eq!( + driver, + WslHostDriverProbe::Version("32.0.32015.7029".to_owned()), + "the driver is still readable from a row with no id" + ); + } + + /// A host that answered, but listed no AMD adapter, is not a host that was + /// never asked. `NoAmdDisplay` is evidence; `Unreachable` is the absence of + /// it, and only a failed spawn produces that. + /// + /// The query filters to AMD rows before it prints, so "no AMD adapter" is a + /// reply carrying the machine facts and no `GPU` line, which is what this + /// feeds. A reply holding some *other* vendor's adapter is not a shape this + /// path can receive, and `preferred_amd_display` would answer it with that + /// vendor's driver version. + #[test] + fn an_inventory_without_an_amd_adapter_reads_as_answered_not_unreachable() { + let inventory = parse_windows_examine_inventory( + "CPU\tIntel(R) Core(TM) i7-8700 CPU @ 3.20GHz\nRAM\t17179869184\n", + ); + + let (driver, adapters) = host_displays_from_inventory(&inventory); + + assert!(adapters.is_empty(), "no GPU row means no AMD adapter"); + assert_eq!( + driver, + WslHostDriverProbe::NoAmdDisplay, + "the host answered; it just has no AMD display" + ); + } + /// A host that answers but has no AMD adapter reads as `NoAmdDisplay`; a host /// where no source answers reads as `Unreachable`. The CPU and RAM answer is /// what makes the first inventory non-empty, so the local host-driver check diff --git a/tests/e2e-cucumber/features/diagnose.feature b/tests/e2e-cucumber/features/diagnose.feature index f68ccb0c18..b68d99c615 100644 --- a/tests/e2e-cucumber/features/diagnose.feature +++ b/tests/e2e-cucumber/features/diagnose.feature @@ -229,10 +229,8 @@ Feature: Diagnosing failures and listing fixes # Linux-only for the same reason diagnose-08 is: the recipe under test # (`fix-9-igpu-dgpu`) only appends a shell rc file on Linux. # - # @requires-bare-metal for the same reason as diagnose-08: `fix-9-igpu-dgpu` - # does not apply on WSL2 (no per-device topology to collide over there), so - # the run stops at the wrong-platform refusal before the confirmation prompt - # is ever printed. + # @requires-bare-metal for the same reason as diagnose-08: this scenario has + # not been run on a WSL2 lane, so it stays a skip there until it has. @id:diagnose-fix-interactive-decline-reported @requires-os:linux @requires-bare-metal Scenario: diagnose-16 - Declining the confirmation prompt on a real terminal is reported the same way Given a user who has chosen a fix that would change the machine diff --git a/tests/e2e-cucumber/features/examine.feature b/tests/e2e-cucumber/features/examine.feature index 9e0dc5af00..53bd5f801c 100644 --- a/tests/e2e-cucumber/features/examine.feature +++ b/tests/e2e-cucumber/features/examine.feature @@ -125,6 +125,22 @@ Feature: GPU detection and system inspection Then the inspection reports Linux as the operating system And the inspection reports that the host is WSL + # WSL2 has no `lspci` and no KFD topology, so the GPU list was left empty + # there and the machine-readable report said nothing about the hardware -- + # on a host whose GPU the same report named in `detected_gfx_target`. The + # entries now come from the Windows host's adapter inventory. + # + # The assertion is "at least one, and every one of them is AMD", not a count: + # the query filters to AMD adapters, so a count would only restate the lane's + # hardware, while an empty list is exactly the regression this guards. + # `@requires-gpu` because a WSL host with no AMD adapter has nothing to list + # and the premise does not hold. + @id:examine-lists-host-gpus-on-wsl @requires-wsl @requires-gpu + Scenario: examine-49 - The machine-readable report lists the host's AMD GPUs on WSL + Given the CLI is running in WSL + When the user inspects the system both for reading and for scripting + Then it lists every AMD GPU the Windows host reports + # The dry-run plan used to print the raw `${ROCM_CLI_AMDGPU_VERSION:-7.2.4}` # shell placeholder on its `repo_version:` line instead of the effective version, # so the preview a user reviews before approving disagreed with what the install diff --git a/tests/e2e-cucumber/tests/e2e/examine_steps.rs b/tests/e2e-cucumber/tests/e2e/examine_steps.rs index a986bc22f7..2dd033492f 100644 --- a/tests/e2e-cucumber/tests/e2e/examine_steps.rs +++ b/tests/e2e-cucumber/tests/e2e/examine_steps.rs @@ -1090,6 +1090,35 @@ fn host_has_lspci() -> bool { .is_some_and(|path| std::env::split_paths(&path).any(|dir| dir.join("lspci").is_file())) } +/// The WSL counterpart of `assert_gpus_match_kfd_nodes`. +/// +/// There is no kernel topology to cross-check against here, so the assertion is +/// the property that actually regressed: the list is populated at all, and +/// everything in it is an AMD adapter. Counting would only restate the lane's +/// hardware, which the suite deliberately does not hard-code. +#[then("it lists every AMD GPU the Windows host reports")] +async fn assert_wsl_gpus_listed(world: &mut E2eWorld) { + let json = parsed_json(world); + let gpus = json + .get("gpus") + .and_then(serde_json::Value::as_array) + .expect("`examine --json` did not report a gpus array"); + + assert!( + !gpus.is_empty(), + "a WSL host with an AMD GPU must list it; an empty array is the \ + regression this guards:\n{json:#}" + ); + for gpu in gpus { + assert_eq!( + gpu.get("is_amd").and_then(serde_json::Value::as_bool), + Some(true), + "the host inventory is filtered to AMD adapters, so a non-AMD \ + entry means the filter stopped working:\n{gpu:#}" + ); + } +} + #[then("it lists one AMD GPU per kernel GPU node, each with its PCI address and gfx target")] async fn assert_gpus_match_kfd_nodes(world: &mut E2eWorld) { let Some(versions) = kfd_gpu_node_versions().filter(|versions| !versions.is_empty()) else { From f8bf13f81fed1e425907919961fcdbacceaba167 Mon Sep 17 00:00:00 2001 From: Harkirat Gill Date: Fri, 13 Nov 2026 13:08:36 -0500 Subject: [PATCH 4/4] test(examine): move the WSL GPU-listing scenario to the end so its index matches position Signed-off-by: Harkirat Gill --- tests/e2e-cucumber/features/examine.feature | 32 ++++++++++----------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/e2e-cucumber/features/examine.feature b/tests/e2e-cucumber/features/examine.feature index 53bd5f801c..f6690b3997 100644 --- a/tests/e2e-cucumber/features/examine.feature +++ b/tests/e2e-cucumber/features/examine.feature @@ -125,22 +125,6 @@ Feature: GPU detection and system inspection Then the inspection reports Linux as the operating system And the inspection reports that the host is WSL - # WSL2 has no `lspci` and no KFD topology, so the GPU list was left empty - # there and the machine-readable report said nothing about the hardware -- - # on a host whose GPU the same report named in `detected_gfx_target`. The - # entries now come from the Windows host's adapter inventory. - # - # The assertion is "at least one, and every one of them is AMD", not a count: - # the query filters to AMD adapters, so a count would only restate the lane's - # hardware, while an empty list is exactly the regression this guards. - # `@requires-gpu` because a WSL host with no AMD adapter has nothing to list - # and the premise does not hold. - @id:examine-lists-host-gpus-on-wsl @requires-wsl @requires-gpu - Scenario: examine-49 - The machine-readable report lists the host's AMD GPUs on WSL - Given the CLI is running in WSL - When the user inspects the system both for reading and for scripting - Then it lists every AMD GPU the Windows host reports - # The dry-run plan used to print the raw `${ROCM_CLI_AMDGPU_VERSION:-7.2.4}` # shell placeholder on its `repo_version:` line instead of the effective version, # so the preview a user reviews before approving disagreed with what the install @@ -748,3 +732,19 @@ Feature: GPU detection and system inspection When the user inspects that machine in machine-readable form and the time it takes is measured Then the inspection finishes long before the background process does And the inspection lists the GPU that lspci printed + + # WSL2 has no `lspci` and no KFD topology, so the GPU list was left empty + # there and the machine-readable report said nothing about the hardware -- + # on a host whose GPU the same report named in `detected_gfx_target`. The + # entries now come from the Windows host's adapter inventory. + # + # The assertion is "at least one, and every one of them is AMD", not a count: + # the query filters to AMD adapters, so a count would only restate the lane's + # hardware, while an empty list is exactly the regression this guards. + # `@requires-gpu` because a WSL host with no AMD adapter has nothing to list + # and the premise does not hold. + @id:examine-lists-host-gpus-on-wsl @requires-wsl @requires-gpu + Scenario: examine-49 - The machine-readable report lists the host's AMD GPUs on WSL + Given the CLI is running in WSL + When the user inspects the system both for reading and for scripting + Then it lists every AMD GPU the Windows host reports