Repository navigation
ROCMAI-830: pin the fix-13 gate for a Lemonade Strix Halo host with a managed runtime #835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3222,7 +3222,9 @@ async fn assert_no_hip_sdk_advice(world: &mut E2eWorld) { | |
| // The stated substitute is the unit test | ||
| // `fix_13_does_not_fire_on_a_lemonade_vulkan_host_with_no_hip_evidence` in | ||
| // `rocm-core::diagnose`, which drives the whole `diagnose()` pipeline on | ||
| // the ticket's exact Windows/gfx90c host shape. | ||
| // the ticket's exact Windows/gfx90c host shape. The gate on a supported | ||
| // Windows GPU (the Strix Halo shape of ROCMAI-830) does run end to end, as | ||
| // `diagnose-48` on the Windows GPU lane. | ||
| let output = world.cli_output.as_ref().expect("no diagnose output"); | ||
| assert!( | ||
| !output.contains("fix-13-hip-sdk-missing"), | ||
|
|
@@ -3270,3 +3272,62 @@ async fn assert_old_driver_advice_follows_the_inspection(world: &mut E2eWorld) { | |
| assert!(score < threshold, "{row:#}"); | ||
| } | ||
| } | ||
|
|
||
| #[then( | ||
| "the diagnosis lists the HIP SDK cause only when the inspection finds something that needs it" | ||
| )] | ||
| async fn assert_hip_sdk_advice_follows_the_inspection(world: &mut E2eWorld) { | ||
| const FIX_ID: &str = "fix-13-hip-sdk-missing"; | ||
| let diagnosis: serde_json::Value = | ||
| serde_json::from_str(world.cli_output.as_ref().expect("no diagnosis")) | ||
| .expect("`diagnose --json` did not emit valid JSON"); | ||
| let (examine_json, _, _) = crate::run_rocm(world, &["examine", "--json"]); | ||
| let examine: serde_json::Value = | ||
| serde_json::from_str(&examine_json).expect("`examine --json` did not emit valid JSON"); | ||
| let field = |name: &str| { | ||
| examine | ||
| .get(name) | ||
| .unwrap_or_else(|| panic!("the inspection carries no `{name}`:\n{examine:#}")) | ||
| }; | ||
| let text = |name: &str| field(name).as_str().unwrap_or_default().to_owned(); | ||
| // Something on this host that calls into the system HIP SDK, read from the | ||
| // inspection the same way `check_13_hip_sdk_missing` reads it with no | ||
| // symptom: a managed runtime's HIP build brings its own HIP runtime, and | ||
| // Lemonade's bundled llama.cpp is not on PATH as a HIP build. | ||
| let has_amd_gpu = field("has_amd_gpu").as_bool() == Some(true); | ||
| let framework = text("framework"); | ||
| let ambient_hip_torch = framework == "pytorch" | ||
| && text("framework_rocm_version").starts_with("hip=") | ||
| && text("framework_source") != "managed-runtime"; | ||
| let hip_llama_cpp = framework == "llama-cpp" && text("framework_rocm_version") == "GGML_HIP=ON"; | ||
| let ambient_hip_torch = has_amd_gpu && ambient_hip_torch; | ||
| let hip_llama_cpp = has_amd_gpu && hip_llama_cpp; | ||
| let needs_hip = ambient_hip_torch || hip_llama_cpp; | ||
| let sdk_unusable = | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This oracle restates check_13's predicate (SDK path empty or hipinfo absent). Please confirm it matches the production condition exactly. On the target Strix Halo lane expected is always false, so the step only proves absence; note which break of the gate turns diagnose-48 red.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, and nowycondro found the same thing: |
||
| text("hip_sdk_path").is_empty() || field("hipinfo_present").as_bool() != Some(true); | ||
| // ROCMAI-837 considers the ambient-torch +25 listing beside a healthy SDK | ||
| // wrong. This oracle copies that rule on purpose, so whoever changes the | ||
| // +25 bonus in `check_13_hip_sdk_missing` must update this copy too. | ||
| // Mirrors the scoring in `check_13_hip_sdk_missing`, not only its | ||
| // headline: inside the `needs_hip` gate an unusable SDK scores 35 or 30, | ||
| // and an ambient HIP-built torch adds a further 25 that does not look at | ||
| // the SDK at all. `run_all_checks` keeps any score above zero in | ||
| // `matched`, so a host with ambient HIP torch and a healthy SDK still | ||
| // lists the entry (weakly, 25). | ||
| let expected = needs_hip && (sdk_unusable || ambient_hip_torch); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This oracle copies check_13's gating and the +25 rule, and pins the weak listing that ROCMAI-837 considers wrong. Please name ROCMAI-837 in the comment here (and in the feature comment) so whoever changes the +25 bonus finds this copy too.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done: the oracle comment and the feature comment now name ROCMAI-837 and say that whoever changes the +25 bonus must update this copy. |
||
| let present = diagnosis["matched"] | ||
| .as_array() | ||
| .expect("matched is a list") | ||
| .iter() | ||
| .any(|entry| entry["id"] == FIX_ID); | ||
| assert_eq!( | ||
| present, | ||
| expected, | ||
| "{FIX_ID} present: {present}; inspection: framework {framework:?} (source {:?}, \ | ||
| rocm {:?}), HIP SDK {:?}, hipInfo {}\n{diagnosis:#}", | ||
| text("framework_source"), | ||
| text("framework_rocm_version"), | ||
| text("hip_sdk_path"), | ||
| field("hipinfo_present"), | ||
| ); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Positive arm is good. Please confirm in the PR text that you broke the gate (e.g. removed the managed-runtime/Lemonade exemption) and saw this test go red, per AGENTS §3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, and shown in the PR description: with
needs_hipforced on (removing the managed-runtime / Lemonade exemption), this test fails and diagnose-48 fails too; with the gate intact both pass. Pushed as 864aef2.