Repository navigation
tests: record the gfx1152 llama.cpp bundle gap so the next one is not silent - #7491
Conversation
… silent #7431 made gfx1152 (Krackan Point, Radeon 860M/840M) a first-class arch, which fixed torch wheel selection: those laptops were pulling gfx1150 wheels built for a different LLVM target. It also changed llama.cpp prebuilt selection, because no gfx1152 bundle is published. published_rocm_choice_for_host deliberately refuses to serve a sibling-family bundle, so those hosts now fall back to a HIP source build. That is the right outcome, a wrong-ISA binary fails at the first BLAS call rather than merely installing slowly, but nothing recorded it and nothing would have caught it. TestPublishedRocmGfxSelection builds its release from a hardcoded family list, so it can only assert about arches someone already thought to add. Adds TestPublishedRocmBundleCoverage: - PUBLISHED mirrors the mapped_targets in llama-prebuilt-manifest.json. - KNOWN_GAPS lists arches _GFX_TO_AMD_INDEX_ARCH routes torch for that no bundle covers: gfx1033/1035/1036 (RDNA 2, never built) and gfx1152. - test_known_gaps_fall_back_to_source_build pins each to None. - test_every_torch_routed_arch_is_covered_or_a_known_gap compares the routed set against bundle coverage, so adding an arch for torch without a bundle has to be a deliberate KNOWN_GAPS entry. The invariant fires both ways. Simulating a new routed arch fails with "coverage drifted: ['gfx1153'] newly uncovered"; simulating a published gfx1152 bundle fails with "gfx1152 is in KNOWN_GAPS but a bundle now matches it; drop it from the set", so closing the gap cannot leave the list stale. Reads _GFX_TO_AMD_INDEX_ARCH from source instead of importing install_python_stack, which this suite does not otherwise depend on. No production code changes. Install suite 1355 passed, no new failures.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 513c9a5691
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| # mapped_targets of each published ROCm bundle, mirroring | ||
| # unslothai/llama.cpp's llama-prebuilt-manifest.json. | ||
| PUBLISHED = { |
There was a problem hiding this comment.
Read coverage from the published manifest
When unslothai/llama.cpp publishes a new bundle or adds gfx1152 to an existing bundle's mapped_targets without modifying this repository, this hardcoded snapshot remains unchanged. _release() therefore continues constructing the old synthetic release, so both new tests still pass and keep asserting that gfx1152 is a gap even though production consumes the updated remote manifest. This defeats the claimed reverse drift guard; derive or generate this coverage from the artifact publishing source (or a synchronized checked-in manifest) instead.
Useful? React with 👍 / 👎.
Follow-up to #7431. Tests only, no production code changes.
#7431 made gfx1152 (Krackan Point, Radeon 860M/840M) a first-class arch. That fixed the torch side: those laptops were pulling gfx1150 wheels built for a different LLVM target, and
repo.amd.compublishes gfx1150 and gfx1152 as separate index leaves with separately built wheels.It also changed llama.cpp prebuilt selection, which we did not notice at the time. No gfx1152 bundle is published:
published_rocm_choice_for_hostdeliberately refuses to serve a sibling-family bundle, so a Krackan host now falls back to a HIP source build where it previously downloaded the gfx1150 prebuilt.Why this is not a revert
The source build is the correct outcome. The gfx1150 binary was being handed to gfx1152 hardware before, and these bundles carry the ROCm runtime inside them (
rocblas.dll,hipblas.dll,amdhip64_7.dll), whose Tensile kernels are arch-specific. That is the same failure mode as the gfx906 breakage in #7354: a wrong-ISA binary dies at the first BLAS call rather than merely installing slowly. Trading a fast broken install for a slow working one is the right direction.What was wrong is that nothing recorded the gap and nothing would have caught it.
TestPublishedRocmGfxSelectionbuilds its release from a hardcoded family list, so it can only assert about arches someone already thought to add.What this adds
TestPublishedRocmBundleCoverage:PUBLISHEDmirrors themapped_targetsinllama-prebuilt-manifest.json.KNOWN_GAPSlists the arches_GFX_TO_AMD_INDEX_ARCHroutes torch for that no bundle covers:gfx1033/1035/1036(RDNA 2, never built) andgfx1152, each with the reason and, for gfx1152, how to close it.test_known_gaps_fall_back_to_source_buildpins each gap toNone.test_every_torch_routed_arch_is_covered_or_a_known_gapcompares the torch-routed set against bundle coverage, so adding an arch for torch without a bundle has to be a deliberateKNOWN_GAPSentry rather than an unnoticed drop to source builds.The invariant fires in both directions. Simulating a new routed arch:
Simulating a published gfx1152 bundle:
So closing the gap cannot leave the list stale.
On whether to publish a gfx1152 bundle
I looked at how common this hardware is before deciding. Per-arch ROCm bundle download counts, unsloth's last three releases next to lemonade's:
Two independently maintained repos agreeing at 5.9 and 5.3 percent makes gfx1150 a trustworthy number, and ROCm is only about 4 percent of platform binary downloads overall. Krackan sits below Strix Point in the stack and, before #7431, was being counted inside that gfx1150 bucket, so the affected population is a minority of an already small slice.
Worth noting AMD's own lemonade has the same gap on its nightly channel, and fails harder:
rocm_asset_familiesdoes not list gfx1152, unlisted ISAs are used verbatim, so it requests an asset that does not exist and 404s. Its default stable channel sidesteps this entirely by shipping one arch-agnostic binary keyed by ROCm version and injecting per-arch runtime libraries from TheRock, which is why it can claim gfx1152 support without building for it.So I would not add a bundle just for this. Recording the gap is the proportionate step, and if a Krackan user reports the slow install we have the entry to point at. The near-zero-cost alternative, if we want it sooner, is checking whether the gfx1150 build already lists gfx1152 in its
HIP_ARCHITECTURES; if it does, adding gfx1152 to that bundle'smapped_targetscloses this with no new artifact, and these tests will tell us to updateKNOWN_GAPSwhen it lands.Verification
Windows 11, Strix Halo (gfx1151). Install suite 1355 passed with no new failures against a clean
mainbaseline.