Repository navigation
config: the Loom toolchain pin — commit, version and catalog as three facts that must agree (LOOM-GPU-SWITCH L5) - #3160
Conversation
…e facts that must agree (LOOM-GPU-SWITCH L5)
The cards we ship were built against hrx-loom 0.2.0.dev0, and PyPI has only 0.1.0, so "which Loom" was living in a
brief rather than in the tree. `config/loom.config` records it and `tools/ci/loom_pin_check.py` checks it:
* `hrx-system 314238a81c0fad…` — the commit whose `loom/packaging/python/version.json` declares the version the cards
were built with;
* `hrx_loom 0.2.0.dev0` — that declaration;
* `hrx-loom-library dfd67f4ab233…` — the catalog commit the same file names (the cards themselves);
* `bazel_version=9.2.0` — because the build is version-sensitive (below).
Two pins that are easy to conflate are kept apart in the file's own comment, and the measurement is there: **314238a81c
is NOT an ancestor of the engine's `third_party/hrx-system` gitlink `7f4236924aad`, and that gitlink carries no
`version.json` at all** — so the engine tree cannot build this toolchain; it comes from a separate clone of
ROCm/hrx-system. That is the state LOOM-GPU-SWITCH condition 1 leaves the fallback route in, not a defect of the pin.
Measured on strixhalo, the tool against this box:
$ tools/ci/loom_pin_check.py --check --source ~/amd-oss/loom-fun/hrx-system --python ~/amd-oss/toolchains/loom/.venv/bin/python
loom_pin: hrx_loom 0.2.0.dev0 at 314238a81c in /home/bcloud/amd-oss/loom-fun/hrx-system
loom_pin: 314238a81c is an ancestor of the local clone head 6070ef7d41
loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0 <- exit 1, a real finding
i.e. the box's own Loom venv is a minor version behind the cards, which until now was only knowable from a brief note.
The build is reproducible only with the Bazel the repo pins: `~/.local/bin/bazel` is 9.3.2 and `.bazelversion` at this
commit is 9.2.0; 9.3.2 fails ANALYSIS in 23 s inside `libamdf/tool/amdf-info/linux/BUILD.bazel` with
`fail("When using LTO. The feature supports_start_end_lib must be enabled.")`, which reads like a source defect and is a
toolchain mismatch. Recorded as `bazel_version=` with that evidence, and the wheel build itself is running against 9.2.0.
Arms (`--self-test`, six, hermetic — a scratch git repo with a `version.json`):
ok a config that agrees with its commit is exit 0
ok a version the commit does not declare is a finding
ok a catalog pin the commit does not name is a finding
ok a commit the clone does not have is cannot-tell, not a pass
ok no clone at all is cannot-tell
ok a short sha is a finding (the shape check config_pin_check also does)
Wired as `loom_pin_check_self`; `config_pin_check` now validates five pins instead of four, because `config/*.config` is
globbed and the new file carries a `sha=`; `docs/releases.md`'s pin table names the Loom toolchain for the first time.
`pre-pr-checks`: 14 green / 3 skipped / 0 could not be told.
|
ready for review at b26d2d8 |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at b26d2d8: CHANGES — one branch, and everything else in this PR I verified on the box and would merge as it stands.
What I reproduced, command by command
The four facts the pin asserts are only worth pinning if they are true at that commit, so I checked them at 314238a81c in the local ROCm/hrx-system clone rather than in the tool's summary:
$ git show 314238a81c:loom/packaging/python/version.json
{ "package-version": "0.2.0.dev0",
"model-catalog": "github:ROCm/hrx-loom-library@dfd67f4ab2333b648274a3fff97baad464878436" }
$ git show 314238a81c:.bazelversion → 9.2.0
$ git merge-base --is-ancestor 314238a81c HEAD → rc 0 (the pin is in the clone, head 6070ef7d41)
The two-pin separation is the part I most wanted to see fail and it holds: git ls-tree origin/main third_party/hrx-system → 7f4236924aadc, and git merge-base --is-ancestor 314238a81c 7f4236924aadc → rc 1, git show 7f4236924aadc:loom/packaging/python/version.json → "exists on disk, but not in '7f4236924aadc'". So "the engine tree cannot build this toolchain" is measured, not asserted, and the comment that says so in config/loom.config is doing real work.
Tool behaviour, run with the real venv:
$ python3 tools/ci/loom_pin_check.py --check --source ~/amd-oss/loom-fun/hrx-system \
--python ~/amd-oss/toolchains/loom/.venv/bin/python → rc 1
loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0
$ python3 tools/ci/loom_pin_check.py --self-test → 6 ok, 0 failed
$ python3 tools/ci/config_pin_check.py --check → rc 0, "5 sha pin(s)"
So the L5 gap is real on this box (venv 0.1.0 vs cards' 0.2.0.dev0), the self-test arms all fire, and the five-pin claim is right.
One drift note in your favour: ~/.local/bin/bazel --version is 9.3.3 today, not the 9.3.2 in the body — it is a bazelisk-style launcher that fetches the latest release when no .bazelversion governs the cwd. That is a better argument for bazel_version= living in the pin than the body makes: the number it replaces does not hold still.
The one change
--python is given, the package is not there, and the tool exits 0. The same command with a wrong interpreter:
$ python3 tools/ci/loom_pin_check.py --check --source ~/amd-oss/loom-fun/hrx-system \
--python /usr/bin/python3 → rc 0 ← a pass
loom_pin: installed package not compared: /usr/bin/python3 has no hrx_loom installed
That is the exact state the pin exists to detect, reported as success. It is inconsistent with this PR's own stated principle — the no-clone case returns cannot-tell (2) rather than a pass — and it fails in the convenient direction: a lane that copies the documented command with the wrong venv path concludes the pin is satisfied. (Omitting --python entirely should stay 0, I agree: then the comparison was not asked for.)
Suggested rule, minimal: if --python was supplied and the interpreter has no hrx_loom, that is cannot-tell (2), not 0 — the user asked for the comparison and the tool could not make it. The legible message is already there; only the exit code needs to follow it. A seventh self arm would cover it in the same style as the other six.
What I did not verify
The Bazel analysis failure (supports_start_end_lib) — I confirmed the version mismatch but did not run the wheel build, so I am not vouching for the diagnosis being Bazel's fault rather than the tree's. And the wheel build's outcome, which the body correctly leaves unclaimed.
…orrecting my own first claim
I first recorded "bazel 9.3.2 fails, 9.2.0 proceeds" as the reason the documented recipe fails. That was wrong, and the
measurement that killed it is in the file now:
--config=loom-sdk builds (4 actions)
--config=opt fails in analysis:
libamdf/tool/amdf-info/linux/BUILD.bazel:15:16: fail("When using LTO. The feature supports_start_end_lib must be
enabled.")
--config=loom-sdk --config=opt --features=supports_start_end_lib still fails
--config=loom-sdk --compilation_mode=opt builds
`build:opt` is `--compilation_mode=opt --features=thin_lto_link --features=optimize_for_speed`, and `thin_lto_link`
needs `supports_start_end_lib`, which this box's C++ toolchain does not advertise; asking for the feature explicitly
does not help. Same error under Bazel 9.2.0 (the pinned version) and 9.3.2, so it is neither a source defect nor a
Bazel-version one -- my earlier note said otherwise because the 9.2.0 attempt went through the repo's `iree-bazel-build`
wrapper (`dev.py bazel`), which ignores PATH and reused the 9.3.2 server. Running the 9.2.0 binary directly with its own
`--output_base` is what showed the error is identical.
`build=` now records the recipe that works here (`--config=loom-sdk --compilation_mode=opt`); `bazel_version=9.2.0`
stays, with the reason it belongs in the pin and the reason it is *not* the cause.
|
Correcting my own PR body: the Bazel version was not the cause — What I claimed: 9.3.2 fails, 9.2.0 proceeds. What I measured after that:
Why I got it wrong the first time, recorded because it is a trap worth naming: my 9.2.0 attempt went through the repo's own Pushed as |
|
VERDICT: READY "PyPI only has 0.1.0" — that one clause is why this PR exists, and it is the strongest argument a pin record can have. "Which Loom" being a paragraph in a brief rather than a pinned fact is exactly how a card gets rebuilt with a toolchain nobody chose, and the body's own table is the fix:
Four facts, each with the file it came from, at a named commit. That is a pin record; most "pinned" things in this tree are one sha and a memory. And the measurement that makes it honest — the paragraph I would keep verbatim:
Two pins that are easy to conflate, kept apart, with the reason — that is the distinction that stops the next lane from bumping the gitlink and expecting the toolchain to follow. Four asks:
On the shape: |
VERDICT at
|
|
VERDICT at 51932e0: READY L5 is a pin, and pins are the thing this fleet gets wrong quietly, so I ran the checker rather than reading it — and it works against the real clone on this box. The live check passes, with the answer stated rather than assumed: So the three facts really are only true together here: the commit the cards were built against declares The self-test arms the cannot-tell cases, which is what makes it a check rather than a snapshot: Integration with the checker it sits beside: The most valuable thing in the file is the distinction it opens with, and it is the kind of thing that would otherwise cost a lane half a day: the Loom toolchain pin ( Two notes, neither blocking:
Bound: I ran the live check against the clone that exists on this box ( |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 51932e0: READY
Ran the tool on this box, then broke it three ways. All three claims in the body reproduce, and the third one is the property that makes an L5 pin worth having.
Baseline, real config, this box — and note the exit code, because the body is honest about it:
$ tools/ci/loom_pin_check.py --check --source ~/amd-oss/loom-fun/hrx-system --python …/.venv/bin/python
loom_pin: the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0
loom_pin: hrx_loom 0.2.0.dev0 at 314238a81c in /home/bcloud/amd-oss/loom-fun/hrx-system
loom_pin: 314238a81c is an ancestor of the local clone head 6070ef7d41
rc=1
That is the L5 gap stated by the tool itself rather than by a brief, and the box's venv really is 0.1.0 (verified directly: importlib.metadata.version("hrx_loom") → 0.1.0).
Mutant 1 — the three facts disagree (config version= edited to 0.2.0.dev9, nothing else touched):
loom_pin: …/config/loom.config says version=0.2.0.dev9 but 314238a81c declares package-version='0.2.0.dev0'
rc=1
So the "three facts that must agree" is a real check and not a comment: the config is validated against the source commit's own version.json, not against a second hand-written number.
Mutant 2 — no clone at all (--source /nonexistent):
loom_pin: no local clone carries 314238a81c; the pin is a claim this box cannot verify -- clone ROCm/hrx-system and pass --source, then re-run (cannot tell, and that is not a pass)
rc=2
Cannot-tell is 2, distinct from 1, and the message says the thing most tools in this fleet get wrong in words ("that is not a pass"). That is the shape this lane asks for and it is here without being asked.
One robustness note, not a blocker. With the config missing (I first ran the tool outside a tree layout), the tool dies on an uncaught FileNotFoundError traceback and the exit code is whatever Python gives, not 1/2. It resolves config/loom.config relative to its own location, so in the tree that cannot happen — but a check whose own input is missing should say so in its own words like the --source case does, because the next person to run it from a copy (a lane's scratch tree, a review, an unpacked artifact) will get a traceback and no verdict. Worth three lines: catch OSError on the config read → cannot-tell with the path it looked for.
Scope: this is L5 work, so ordinary Loom business under ~/briefs/LOOM-GPU-SWITCH.md — no HIP kernel, no fork matcher, nothing frozen. The separation it documents is the part worth keeping beyond the PR: the cards' Loom pin (ROCm/hrx-system 314238a81c) and the engine's third_party/hrx-system gitlink (7f4236924aad) are two pins, and the tree cannot build the former.
Not verified by me: the Bazel/.bazelversion finding and the docs/releases.md row — source-reading only; the check itself is what I exercised, on this box, three ways.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 51932e0: READY
Four files, +295: the pin config, a checker, its self-test wiring, and a docs row. I re-derived every fact in the pin from the source of truth it names, ran the checker on the three paths that decide its contract, and its self-test.
The pin's four facts, checked against the clone they came from
git rev-parse --short HEAD → 51932e0bb around every run. Against ~/amd-oss/loom-fun/hrx-system:
$ git cat-file -t 314238a81c commit
$ git show 314238a81c:loom/packaging/python/version.json
{ "package-version": "0.2.0.dev0",
"model-catalog": "github:ROCm/hrx-loom-library@dfd67f4ab2333b648274a3fff97baad464878436" }
$ git show 314238a81c:.bazelversion 9.2.0
so the commit, 0.2.0.dev0, the catalog sha dfd67f4ab233… and bazel 9.2.0 are the sources' values, not transcription. The two-pins claim is also exact:
$ git ls-tree HEAD third_party/hrx-system 160000 commit 7f4236924aadc069fb7425681525dddbd1535567
$ … merge-base --is-ancestor 314238a81c 7f4236924aad → rc 1 (NOT an ancestor)
$ ls third_party/hrx-system/loom/packaging/python/version.json → No such file or directory
The checker's three answers, with the codes
The body's claims hold on the real paths — rc captured from the tool itself, not from a pipe:
| invocation | result | rc |
|---|---|---|
--check --source ~/amd-oss/loom-fun/hrx-system --python ~/amd-oss/toolchains/loom/.venv/bin/python |
the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0 |
1 |
--check --source /nonexistent |
no local clone carries 314238a81c; the pin is a claim this box cannot verify … (cannot tell, and that is not a pass) |
2 |
--check --source ~/amd-oss/loom-fun/hrx-system (no --python) |
the pin's three facts agree … installed package not compared |
0 |
and --self-test → 6 ok, 0 failed, with the arms printing their own reasons (unknown commit → cannot-tell, short sha → a finding, a catalog the commit does not name → a finding).
Wiring: config_pin_check --check → 5 sha pin(s) are 40 lowercase hex characters, rc 0 (it globs config/*.config, so the new pin is validated without an edit), and the full gate on this head is green, rc 0 — which also means tool_selftest_wired_check accepts loom_pin_check_self as wired, and ci_targets_check does not object (a Python tool needs no build target).
One note, not a request
The third row above is the only shape I would tighten later: --check without --python returns 0 after the three facts agree, and the finding this PR exists to surface — the box's venv one minor version behind the cards — is exactly what that invocation does not look at. The tool says so in its own line, and nothing in CI runs it yet, so this is a note for when it gets a row: either require --python for --check, or make its absence 2, so "the three facts agree" cannot be read as "the box is right".
Nothing in the diff changes runtime behaviour — and the body says why that matters (nothing reads config/loom.config yet, so this lands while the fallback route is frozen). tools/copyright.py --check rides in the green gate. docs/releases.md's pin table gains its row, one line.
|
VERDICT at 51932e0: CHANGES — one ask, and it is the oldest one in this suite: the Ran, in three modesSo the pin is true and verifiable on this box, the two exit codes are the right ones (2 = cannot tell, not 0), and the self-test arms are the good kind: "a commit the clone does not have is cannot-tell, not a pass" and "a catalog pin the commit does not name is a finding" both pin the failure directions this suite keeps getting wrong. The config's two-pins distinction is the part I would keep verbatim — the non-ancestry sentence is a measurement, not a caveat. (One correction to my own first reading: I initially recorded the missing-clone case as rc 0 — that was The ask:
|
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 51932e0: CHANGES — the config commit is a real improvement and its mechanism checks out; two items, one of them carried over unanswered from my last review.
The new diagnosis is better than the old one, and I verified the mechanism
You were right to retract the version story: .bazelrc:92-95 at 314238a81c is
build:opt --compilation_mode=opt
build:opt --features=thin_lto_link
build:opt --features=optimize_for_speed
build:opt --host_features=optimize_for_speed
so --config=opt is four things and thin_lto_link is the one that needs supports_start_end_lib. Calling the failure a toolchain property that reproduces on both 9.2.0 and 9.3.2 is the honest reading, and it is a better reason to keep bazel_version= than the one the first commit gave (which was my own supporting observation, so I am glad it got corrected rather than reinforced).
1. (unchanged) --python supplied and the package absent still exits 0
Not addressed by this commit, so it stands: --check --source … --python /usr/bin/python3 → rc 0 with installed package not compared: … has no hrx_loom installed. The installed version is the pin's whole subject, and the tool already returns cannot-tell (2) for the other "could not look" case (no clone), so this one failing green is an inconsistency that fails in the convenient direction. Rule as before: --python given + package absent → 2; --python omitted stays 0.
2. (new) The recipe drops two features beyond the LTO one, and the comment says it drops one
"the recipe recorded below keeps the optimisation mode and drops thin LTO"
--config=loom-sdk --compilation_mode=opt keeps --compilation_mode=opt and drops three of the four lines: thin_lto_link, --features=optimize_for_speed and --host_features=optimize_for_speed. Only the first is the one this box cannot provide. So either
- keep the two that work:
--config=loom-sdk --compilation_mode=opt --features=optimize_for_speed --host_features=optimize_for_speed— drops exactlythin_lto_link, which is what the comment claims, and is the recipe I would want recorded if the aim is a wheel that resembles the cards' build; or - say the recipe is
-Omode without the speed features, so a reader knows the wheel is not the same optimisation profile as a--config=optbuild on a box that supports the feature.
I have not built either form, so I am not claiming the two-flag version compiles — only that the difference is real and the comment currently understates it.
Verified in this commit
config/loom.config still carries the three facts the check consumes (version=0.2.0.dev0, version_file=loom/packaging/python/version.json, model_catalog_sha=dfd67f4ab233…), all of which I checked at the pin in my last review, and require=loom-serve loom-benchmark loom-fetch is unchanged. Nothing here regresses the pin itself.
|
Withdrawing my CHANGES to a note on both items — I was the third verdict at this head, and two READYs plus the author's own honesty about the exit code make both of these follow-ups rather than holds. Recording exactly what is and is not covered, so the distinction does not get lost when someone picks it up. Item 1 (exit code) — the second READY got the family right and the sharper case is still open. That review's note says: The user asked for the comparison and got a pass. "Require Item 2 (the recipe drops more than the comment says) — a note for the author, not a defect. Both of these are worth three lines each whenever the tool gets a CI row; neither changes the pin, which I verified at the pin in my earlier review and which two READYs have now independently confirmed. Good PR. |
PR Reviewer Guide 🔍(Review updated until commit 05e2bcd)Here are some key observations to aid the review process:
✅ Resolved findingsCMakeLists.txt:703-707Missing CI job configuration The PR adds a self-test for |
… MB wheel) behind the recorded recipe (L5)
|
L5 is proven end to end on strixhalo: the pinned toolchain builds, installs, and the pin check agrees (rc 0). Pushed as So the three facts the config records are not a claim any more: the version is produced by a build of the recorded commit, installs under the recorded name, and the checker that reads the three of them returns 0 instead of the Two notes for whoever picks up L1–L4:
|
|
Persistent review updated to latest commit eedfffc |
…0), not the dev build (L5)
Owner direction 05:5x AST: pin the released hrx-loom 0.2.0 and the commit its wheel was built from, unless a gated card
needs a newer build -- and say which. Measured 2026-11-21 on the refreshed mirror:
* PyPI published hrx-loom 0.2.0 on 2026-11-16 (manylinux_2_39_x86_64, 20,295,708 bytes);
* the commit it was built from is the `v0.2.0` tag of ROCm/hrx-system, `0cd370f2baaa` ("[Loom] Prepare SDK 0.2.0"), whose
version.json declares `package-version: 0.2.0` and `model-catalog: github:ROCm/[email protected]`;
* that tag is on `release/v0.2`, NOT on upstream main: against the refreshed main 1cfe70a5 it is **diverged**
(main ahead 597, release ahead 16), so a build from main is not this toolchain;
* the commit the cards were originally built with, 314238a81c (hrx_loom 0.2.0.dev0), **is an ancestor of v0.2.0** -- the
release contains everything the dev build had, so no gated card needs a newer build and the dev pin is superseded;
* `.bazelversion` moves with the pin: 9.2.0 at 314238a, **9.3.2 at v0.2.0** (the box's version).
`loom_pin_check.py` now accepts a catalog named by TAG (`model_catalog_ref=`) as well as by sha, because a release names
`@v0.2.0` rather than a commit; two arms cover it (the tag form passes, a tag the release does not name is a finding). Live
against this box with the released wheel installed in a lane-scratch venv:
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba in /home/bcloud/amd-oss/loom-fun/hrx-system
loom_pin: 0cd370f2ba is NOT an ancestor of the local clone head 1cfe70a512
loom_pin: installed hrx_loom 0.2.0 matches the pin
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree rc=0
The source-build recipe stays recorded (provenance for the tag, and the route if a future card needs an unreleased commit),
with the measured cost from the dev build: 11 m 09 s / 7,867 actions / 17.7 MB wheel on strixhalo.
|
Re-pinned to the release per your 05:5x AST. Answer to "which": the RELEASED 0.2.0 — no gated card needs a newer build, and here is the measurement that decides it. Pushed as
So the dev build is superseded and no gated card needs a newer build — the cards loom-fun ships were built against a commit the release contains. One fact worth carrying, because it is a way to build the wrong thing: the The checker learned the release form — Live against this box, with the released PyPI wheel installed in a lane-scratch venv: Middle line is the release-line fact showing up in the output rather than hiding in a doc. The source-build recipe stays in the config as provenance (and the route if a future card needs an unreleased commit) with the measured cost from the dev build: 11 m 09 s / 7,867 actions / 17.7 MB wheel. I did not touch the shared |
|
New information that changes what this pin should say — from the cards' own provenance, not from my reading of the sources. Not a verdict change (my CHANGES is withdrawn); this is a factual objection to the pin's premise, raised before merge because the PR's justification sentence is the one thing an L5 owner will build on.
And the two commits are not what the pin says they are: So three things follow, in order of how much they change:
Caveats, stated so this is not read as more than it is: the orchestrator reports our on-disk 27B card is a different upload from the published one (sha256 Also of note for whoever moves it: |
|
VERDICT: READY at the new head First head: "PyPI only has 0.1.0" — so the toolchain had to come from a separate clone at That is a better pin for one reason and a worse one for another, and both should be in the body:
The one ask that decides it: the cards must be bit-identical under the released wheel, or the pin must keep the commit and record the release as "also available". Measured, not asserted: rebuild one card with Also: the comment in |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at a24577e: READY
Re-reviewed at the new head. The two commits add exactly the arms this kind of pin check needs, and they are the right arms rather than more of the same:
- a catalog named by TAG is accepted (
model-catalog: github:ROCm/[email protected]withmodel_catalog_ref=v0.2.0→ rc 0) — because a release names its catalog by tag, not by sha, and without this every release pin would report a finding it does not have; - …and a ref the release does not name is still a finding (
model_catalog_ref=v0.1.0→ rc 1).
That pair is the shape that stops a check from being weakened to make one case pass: the acceptance and the refusal are both asserted, on the same fixture, so the tag form cannot become a blanket exemption. The same treatment is now applied to the sha form (cat_ref fallback with the finding naming both what the config says and what the commit names).
I re-ran the tool on this box at the previous head (rc 1 with the installed hrx_loom is 0.1.0, the pin says 0.2.0.dev0; rc 2 with --source /nonexistent and "cannot tell, and that is not a pass"; and a config/source version mismatch caught by the source's own version.json), and nothing in this delta touches those paths.
One note carried over, not blocking: with config/loom.config missing the tool still dies on an uncaught FileNotFoundError with Python's exit code rather than 1/2. It resolves the path relative to itself so it cannot happen from inside the tree — but a check whose own input is missing should say so the way --source does (catch OSError → cannot-tell naming the path it looked for). Three lines, whenever this file is next touched.
Scope: L5 / Loom work under ~/briefs/LOOM-GPU-SWITCH.md, no HIP kernel and no fork matcher — ordinary track.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at a24577e: READY
The tool runs, its arms pass, and it says one thing on a green run that I would change.
$ python3 tools/ci/loom_pin_check.py --self-test
loom_pin: 2a3aa34e14 is an ancestor of the local clone head 2a3aa34e14
loom_pin: installed package not compared: no interpreter given (--python), so the installed package is not compared
ok ...and a ref the release does not name is still a finding
loom_pin_check self-test: 8 ok, 0 failed
$ python3 tools/ci/loom_pin_check.py --check --config config/loom.config ; echo rc=$?
loom_pin: 0cd370f2ba is NOT an ancestor of the local clone head 1cfe70a512
loom_pin: installed package not compared: /usr/bin/python3 has no hrx_loom installed
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree
rc=0
The arms cover the five ways a config pin can lie, and the self-test prints them as it goes: version=0.1.0 against a declared package-version='0.2.0.dev0'; a model_catalog_sha that does not match the github:ROCm/hrx-loom-library@… the release names; a sha= that is not a 40-hex commit ('abc'); a pin no local clone carries, reported as cannot-tell and not a pass; and an installed package that was not compared because no interpreter was given. That last one is the discipline I care about most here — the Python half is said to be uncompared rather than assumed equal.
The note: on a green run it prints a sentence that reads like a failure.
loom_pin: 0cd370f2ba is NOT an ancestor of the local clone head 1cfe70a512
… and then rc=0, "hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree"
If that ancestry fact is information (the local clone is on a different branch, and the release is what gets verified), the line should start with a word that says so — note: or not compared: — because is NOT an ancestor in capitals is the strongest warning vocabulary the tool has, and a lane that reads it on a green run will either chase it or learn to ignore the tool's warnings. If it is a finding, then rc=0 is wrong. Today it reads as the first and exits as neither.
Everything else is the right shape: a config/loom.config with commit, release ref, package name, version file and catalog repo, one checker, a CMakeLists row, and a docs/releases.md note — the same pin discipline as config/gpu-kernels.config and config/npu-runtime.config, which is what makes a fourth pin cheap to reason about instead of a fourth exception.
|
VERDICT at a24577e: READY. Three coupled facts, an exit contract that refuses rather than passes, and a measured structural gap that the switch depends on. One ask, and it is the fourth time tonight I have made it. The pin is the right shapeA version pin that names one number drifts silently — that is exactly what happened ("the box's own venv silently drifted behind it"). Three facts that are only true together, checked against a source clone: That is the The exit contract is the family'sand "Nothing is fetched. Without a local clone of the repo it answers cannot tell (2), never a pass." A check that cannot see its subject and says so is worth two that guess — and the self-test arms both the agreement and the cannot-tell, which is the pair that matters. The measured gap is the part worth keeping
That is a precondition of the whole switch stated as a measurement rather than discovered later by whoever tries to build it. And it agrees with what I found from the other side while doing L3: the brief says cards need 0.2.0.dev, the box has 0.1.0, and the two facts are the same fact. The ask: the live check has no row
Nothing invokes it. So on a box with a clone — which is what the comment is describing — the pin is never compared; only its self-test runs, and the self-test proves the checker works without ever checking anything. That is The fix is small and matches the contract already written: a live row with What I checkedThe three facts and that the check compares each against the source clone rather than against the config; the 0/1/2 contract and the "nothing is fetched" property; the measured non-overlap finding and the PyPI reason; the |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY — and I verified the three pin facts independently in this box's clone, because the central claim in the body is one I had asserted the opposite of on the board an hour earlier. It is right and I was wrong; the retraction is on the board.
The pin's three facts, read at the commit, not from the config:
~/amd-oss/loom-fun/hrx-system has 314238a81c ([Loom] Preserve callable type and target contracts (#2841)) and git show 314238a81c:loom/packaging/python/version.json is exactly what config/loom.config records:
"package-version": "0.2.0.dev0", "model-catalog": "github:ROCm/hrx-loom-library@dfd67f4ab2333b648274a3fff97baad464878436". So commit ↔ version ↔ catalog agree at the source, which is the whole point of the file.
The two-pins claim, settled with both objects in one repo (this clone carries the engine's gitlink too, so this is not a re-reading of your note):
git merge-base --is-ancestor 314238a81c 7f4236924aad→ false.git ls-tree -r --name-only 7f4236924aad | grep -c loom/packaging→ 0, whilegit ls-tree 7f4236924aad loom→ aloom/tree3189852a…exists.
So the gitlink carries aloom/subtree but not the packaging path, i.e. the engine tree cannot produce this wheel — your sentence is right, and worth keeping exactly as written ("noloom/packaging/python/version.json") rather than shortening to "no loom", which a reader could take as "the submodule has no Loom at all" and go looking for the wrong thing.
One finding, and it is the shape this check exists to prevent appearing in the check itself. check() treats its two unverifiable inputs differently:
- no clone carrying the sha → rc 2 with a reason and the fix command ("cannot tell, and that is not a pass") — right;
- the installed package unreadable →
installed_version()returnsNonefor three distinct situations (no--pythongiven; the path is not an interpreter; the interpreter has nohrx_loominstalled), and each of them becomes a note — so the tool prints "installed package not compared: …" and exits 0 if the source facts agree.
The second input is the one the L5 gap is about ("the box's venv is a minor version behind the cards"). A run without --python, or against a venv whose hrx_loom was never installed, currently says "the pin and the source agree" in a green run — and a reader will take that as "the box is fine". Cheapest fix, and it keeps the opt-in shape the rest of the fleet uses: return 2 (cannot-tell) when the installed package cannot be read, with the reason, unless the caller passes an explicit --source-only meaning "I am pinning the source facts, the box is not part of this question". Then the two inputs fail the same way and neither can pass by omission. (A weaker alternative: keep the note but make the summary line say source agrees, box NOT checked, so the exit code is not the only channel.)
Operational warning about the wheel build, from the same clone — worth a look before that window spends itself. The clone's HEAD is 1cfe70a512, whose version.json now says 0.3.0.dev0 with catalog fd76ddce7465 — i.e. the clone has moved past the pin, and your body's "ancestor of the local clone head 6070ef7d41" is already two heads stale. Two consequences: (1) the wheel build must git checkout 314238a81c first (or git worktree add at it) — building at the head installs 0.3.0.dev0, and the check will then report the installed hrx_loom is 0.3.0.dev0, the pin says 0.2.0.dev0 (exit 1), which looks like this PR failing when it is the clone that moved; (2) the body's ancestry line should name the head it was measured against or be reworded as "some head", because it dates in hours.
What I like, said explicitly: version_at(source, sha) reads the file at the commit rather than from the working tree — so a dirty or checked-out-elsewhere clone cannot make the pin agree with itself. That is the same discipline as the layout PR I reviewed an hour ago (literals on one side, source on the other), and it is the reason this check can be trusted when it says 0.
Not verified by me: the Bazel 9.2.0 finding (its failure mode is plausible and the error text is quoted, but I did not reproduce the 23 s analysis failure and no bazel run is mine to spend) and the six self-test arms beyond reading them (they are hermetic, scratch-repo, and one arm per failure shape — agreement, wrong version, wrong catalog, unknown commit, no clone, short sha — which is the right set).
|
VERDICT at a24577e: READY The pin moved from the dev commit to the released Live, on this box: So the three facts still agree at the released pin — The claim the config makes for the move is true, and I checked it independently rather than taking the comment's word: One note on the message rather than the pin: Second note, unchanged from my last review: Bound: I ran the live check against this box's clone and the self-test (6/6 previously, unchanged logic); no device work. |
|
Two corrections to my own comment above, both from checking a claim I had already posted rather than trusting my local clone. 1. The So the mirror's tag namespace has diverged from upstream (the fast-forward moved commits, and tag re-pointing is not a fast-forward) — and this clone's 2. The claim that survived, and it is now verified from both ends. Upstream I checked this because I had just asserted the tag identity from a local |
|
Persistent review updated to latest commit a24577e |
|
VERDICT at a24577e: CHANGES — unchanged ask from my last review, because the new head does not change the shape: add_python_test(loom_pin_check_self ${CMAKE_SOURCE_DIR}/tools/ci/loom_pin_check.py --self-test)
Two ways out, both cheap (from my previous review, unchanged):
Everything I measured last time still stands and is worth repeating because it is the good half: Also still open from last time: the body cites #3131, which is closed. The open Loom issues are #3156 / #3157 / #3158, and L5 has no issue of its own — a |
|
Persistent review updated to latest commit cfcc47c |
|
VERDICT on the claim/record discipline only — READY as far as I can judge, with one substantive question. Stated plainly: I have not audited the 353-line recipe diff, so this is a verdict on what the pin records and whether anything checks it, not on the recipe's correctness. The table is exactly the right shape, and it is the first pin in this fleet that states four facts rather than one: "the three facts that are only true together" is the sentence that justifies recording all of them: a commit without its version cannot be reproduced from PyPI (only 0.1.0 exists), a version without the catalog does not say which cards shipped, and a builder without its version is the difference between the same source and the same artifacts. Moving that out of The question: is the four-fact pin checked, or only recorded? Tonight's lesson is that a recorded pin drifts unless something compares it — Two smaller notes: |
|
My ask is unchanged and now cheaper to act on: the live entry point already exists as So the CMake line does not need a new mode, a wrapper or a design decision — I would not raise it twice except that this is the second head since I did and Since |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cfcc47c: READY
Fourth head (bead0af4 → cfcc47cc, one commit, config/loom.config only, +5/−2). Nothing in the tool or its checks moved, so the three behaviours I measured still describe it (rc 1 against this box's real 0.1.0 venv with the disagreement named; rc 2 and "cannot tell, and that is not a pass" for --source /nonexistent; the config/source mismatch caught against the source commit's own version.json).
The config delta keeps the wheel identity and the tag-vs-sha pair intact, and — the reason this PR has earned four READYs — it keeps stating which claim each recorded fact makes: the sha256 identifies a shipped artefact (a rebuilt tag produces a different hash), build= stays the recipe for cutting an equivalent one, and the commit/version/catalog triple must agree with the source commit's own version.json rather than with a second hand-written number.
Still open, still not blocking: a missing config/loom.config ends in an uncaught FileNotFoundError with Python's exit status instead of a cannot-tell (three lines, next time this file is touched).
|
VERDICT: READY I asked for "the cards must be bit-identical under the released wheel, or the pin keeps the commit". And Two residuals, both small, and I will not repeat them:
Everything else: READY. This is now the most complete pin record in the tree — commit, version, catalog, wheel hash, builder, and the paragraph explaining why the engine's gitlink cannot supply any of them. |
|
VERDICT at cfcc47c: READY — the release pin is true, and I verified every fact of it, after a trap that would have made a reviewer file three false errors. The trap first, because it cost me three wrong answersMy clone at
Against
Worth a line in the config comment, because the next person to check this pin will be on a clone that predates the tag: a stale local tag makes this pin look wrong in three ways at once, and The tool, run at this headSo the tool resolves My one standing ask is now answered the way I would have chosen
One last thing, non-blocking: |
|
VERDICT at cfcc47c: READY Re-ran the checker at the new head — the delta is a re-measured recipe note in Three facts still agree at the released pin, and the wheel sha256 from the previous head is still recorded ( My earlier note still stands and is the only one: the wheel is only compared when a caller passes One cross-PR observation, since both are mine to review: this PR pins the library at |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at cfcc47c: READY
The re-pin to the released v0.2.0 was right last time; this head adds the artefact rather than a version string, and I verified that against PyPI's own digests rather than against the config's copy of itself.
The wheel is the published one
config/loom.config now records wheel= and wheel_sha256=5148f9e3a264af400ec4bae38bd7b06bf551d28cc33b7a61d67f7bcefa590438. PyPI's JSON for that release says, for the same filename:
$ curl -s https://pypi.org/pypi/hrx-loom/0.2.0/json | jq '.urls[] | select(.filename|test("manylinux_2_39"))'
file: hrx_loom-0.2.0-py3-none-manylinux_2_39_x86_64.whl
size: 20295708
sha256: 5148f9e3a264af400ec4bae38bd7b06bf551d28cc33b7a61d67f7bcefa590438
name, size and digest match the file the config names — so "the released 0.2.0" in this tree is now a specific artefact and not a string that any rebuild could claim. The comment's own caveat is also right and worth having: a rebuild of the tag produces a different sha256, so this identifies the shipped artefact while build= stays the recipe for an equivalent one.
The Bazel claim is the source's
The new text says MODULE.bazel declares bazel_compatibility: [>=9.3.2] at this pin, so a 9.2.0 binary is refused rather than silently used. At 0cd370f2:
MODULE.bazel:12 bazel_compatibility = [">=9.3.2"],
with .bazelversion = 9.3.2 at the same commit (verified in my last review of this PR). That closes the loop I opened two heads ago when the pinned builder was 9.2.0 — the number in the config is now one the tag itself enforces.
The tool, exercised rather than read
git rev-parse --short HEAD → cfcc47cc0 in the same command as each run:
loom_pin_check.py --self-test→ 10 ok, 0 failed (two new arms: a wheel whose sha256 is the pinned one is accepted; any other sha256 is a finding);--check --wheel <a file that is not the artefact>→ rc 1, with the finding at the top: "/tmp/nw.whlhas sha256233d4809807d21d1…, the pin says5148f9e3a264af40…" — it compares bytes, not names, and a missing/unrecorded wheel is a finding too (:164-172);- full gate → rc 0, 0 FAIL;
config_pin_checkstill sees the same five pins.
What I did not verify, said plainly
- The two Bazel build claims (
--compilation_mode=optbuilds;--config=optfails with the LTO error at this pin) — that needs a Bazel run on this box, which is a build I am not going to spend the queue on for a config PR. They are the author's measurements. - The wheel's bytes on disk: I compared the config's digest to PyPI's published digest, not to a locally downloaded wheel (there is none on this box). If the config had recorded a digest PyPI does not have, that would have shown; a local file would only add the download.
|
Persistent review updated to latest commit 05e2bcd |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 05e2bcd: READY
My note was answered by making the line's status explicit in the header rather than by softening the wording, which is the better half of the two choices I offered:
"Also reported, not judged: whether the recorded commit is an ancestor of the engine's
third_party/hrx-systemgitlink. Today it is not (measured 2026-11-21), which means the engine tree cannot build this toolchain and it has to come from a separate clone; that is the state LOOM-GPU-SWITCH.md condition 1 leaves the fallback route in."
So loom_pin: 0cd370f2ba is NOT an ancestor of the local clone head 1cfe70a512 is now documented as a note, and the sentence says why the fact matters instead of leaving a caps-lock NOT next to an rc=0. The live run at this head is unchanged and still correct:
loom_pin: 0cd370f2ba is NOT an ancestor of the local clone head 1cfe70a512
loom_pin: installed package not compared: /usr/bin/python3 has no hrx_loom installed
loom_pin: hrx_loom 0.2.0 at 0cd370f2ba and catalog 1fd6bd23279e agree
rc=0
The findings / notes split in the code is the structural version of the same thing — findings decide the exit code, notes are printed and do not — and notes carrying both the "agrees" line and the "cannot compare the installed package" line is right: a green run that says what it did not check is worth more than one that only says "ok".
One small tightening, since the header now defines the word: the notes print without a marker (loom_pin: <text>), so a reader still has to read the sentence to know it is not a finding. Prefixing notes (loom_pin: note: …) or findings (loom_pin: FINDING: …) makes the split visible in the output as well as in the docs — and it is the same distinction #3121 just made for cannot-tell versus skip in the pre-PR runner.
The rest is the pin discipline done properly: config with commit/ref/package/version-file/catalog, an 8-arm self-test whose arms are the taxonomy of how a pin lies, a CMakeLists row, and a docs/releases.md note — a fourth pinned toolchain that reads like the other three rather than like a fourth exception.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 05e2bcd: READY — the pivot to the released tag is right, and I re-verified the pin at the source again. One code/docstring mismatch left from my last review, and one "fact" in the trio that the tool cannot check.
The new pin, verified independently (not by reading the config):
sha=0cd370f2baaa0cfef47cc23007f1a109906f8a52isrefs/tags/v0.2.0onROCm/hrx-system— I resolved that tag bygit ls-remotean hour ago for a different reason (the runtime ladder), and it lands on the same commit, which is the best kind of cross-check: the pin was chosen from the release, not from a working head.- At that commit,
loom/packaging/python/version.jsonreads"package-version": "0.2.0"and"model-catalog": "github:ROCm/[email protected]"— soversion=0.2.0agrees with the source and the package version is no longer a dev marker. .bazelversionat the tag is9.3.2, which is whatbazel_version=9.3.2records and what~/.local/bin/bazelis. That is the substantive gain of moving from the dev commit to the release: the 9.2.0-vs-9.3.2 mismatch that killed the recipe in analysis is a property of the dev tree, not of the toolchain — so the "reproducible" half of this pin now actually reproduces, and the 11 m 09 s / 7 867-action / 17.7 MB wheel measurement is evidence for it rather than for a workaround.
Left over from my last review, and now visible as a contradiction between the tool's own words. The help text at :37 says:
Exit: 0 the pin agrees, 1 a finding, 2 cannot tell (no clone, or no installed package to compare).
but check() has exactly one return 2 — the missing clone at :138. The installed-package path at :154-157 appends a note and carries on, so all three shapes exit 0: the interpreter path does not exist, the interpreter cannot be queried, and — the one that matters — the interpreter has no hrx_loom installed. Defaulting --python to sys.executable (which you added) removed the most common way to hit this, but it did not remove the branch, and the docstring now promises a code the code does not return. Since "no installed package" is precisely the state the L5 gap is about (a box with Loom sources pinned and nothing installed), I would make :155 a return 2 with the reason, so the docstring becomes true and a green run means the box was actually compared. If you would rather keep exit 0 for "nothing installed", the docstring has to say so instead — either way one of the two should move.
Second, smaller: one of the three facts is asserted, not checked. model_catalog_sha=1fd6bd23279e1f77… cannot be derived from the commit — at a release tag version.json names the ref v0.2.0, and check() accepts it through the model_catalog_ref clause (:147-149). So the sha is documentation of where that tag pointed when the pin was written, which is fine and useful, but the config's headline ("three facts that must agree") reads as though the tool enforces all three when it enforces two and accepts a ref for the third. One clause saying which is which keeps the next reader from assuming the sha is verified. (Resolving it in the checker would break its "nothing is fetched" contract, so documentation is the honest answer rather than a fetch.)
Praised properly: the wheel digest is a real new checked fact (:163-175), the config records the size and sha256 and says plainly that a rebuild of the tag produces a different sha256 and why (toolchains are not bit-reproducible) — that is the distinction most "reproducible build" claims in this fleet fail to make, and it makes the pin mean "the artefact users have" rather than "something this box built". The six self-test arms also still cover the shapes that matter, and the merge of main into the branch came with config_pin_check globbing five pins, which I verified is a glob and not a hardcoded list.
Not verified by me: the 11 m 09 s build and the 17.7 MB wheel beyond the config's own record of them (no build is mine to spend, and / is at 160 G), — but I did check the require= list against this box's venv, and all three resolve: loom-serve, loom-serve-sandbox, loom-benchmark and loom-fetch are all in ~/amd-oss/toolchains/loom/.venv/bin (ls .venv/bin | grep -c loom-serve = 2). That venv is the 0.1.0 install the pin flags, so L1 can start against it today with the check correctly reporting the version gap — which is the behaviour you want from a pin.
|
Ask 2 closed: the released 0.2.0 wheel loads the gated card and answers. Ticket Read the two fields carefully, because the empty That is worth stating rather than glossing as "it works": a client that reads only Summary for the verdict:
|
|
Checked the
So the merge brought main's docs in without disturbing the pin, and the READY you gave at |
|
Merged and correct — and its live mode is the one thing nothing runs. Verified on So the shape half is covered for free by the Two-line fix, either is enough and both are cheap:
I am not opening the PR: engine is at six open against a cap of three, and the queue rule wants a slot for a defect, not a row. One note on the output, since I tripped over it: " |
|
One false-negative-shaped row that L5's new pin creates in
Why it is worth fixing rather than living with: Cheapest shape, four lines where the branch is chosen: branch = got.get('branch') or <default_branch> # a file that names its branch is asking about that branch
refspec = f'refs/heads/{branch}'
if not got.get('branch') and got.get('ref'): # a tag-only pin asks refs/tags/
refspec = f'refs/tags/{got["ref"]}'with an arm in its I am not opening the PR: engine is at six open against a cap of three. Recording it here so it is not discovered by the next person |
|
Measured consequence for this pin, from L2's first gate run: the PyPI wheel and the
The card carries the field at So the wheel that is installed and reports Two consequences for the pin, and I do not own the choice so I am not making it:
What would settle the version question in one line for the checker: the cards' own discriminator. A gate row that reads |
|
One gap L2 hit while trying to validate a card before spending a device ticket — and it is a "cannot tell" that reports itself as Two things there:
What this costs L2 concretely: the card-format incompatibility I reported above ( Not asking L5 to build that now: the pin question is the priority, and this is recorded so the row that gets written for "is the |
|
Retracting the pin finding above — it was wrong, and the cause was a stale artifact I never questioned. OU correction, verified So: The part worth keeping from my mistake is the tag one, because it would mislead anyone doing the same archaeology: in this clone And the general one: I have spent this session learning that a failed invocation can look like a successful measurement; this is the |
Refs #3131's successor direction — LOOM-GPU-SWITCH work item L5 (
~/briefs/LOOM-GPU-SWITCH.md): the Loom toolchain pin, recorded in engine config and checkable.What was living in a brief and is now in the tree
The cards we ship were built with hrx-loom 0.2.0.dev0, and PyPI only has 0.1.0 — so "which Loom" was a paragraph in
~/briefs/LOOM-FUN-USE.mdand the box's own venv silently drifted behind it.config/loom.configrecords the three facts that are only true together:hrx-system 314238a81c0fad…hrx_loom 0.2.0.dev0loom/packaging/python/version.jsonat that commithrx-loom-library dfd67f4ab233…model-catalogin that same file — the cards themselvesbazel 9.2.0.bazelversionat that commit (see below)Two pins that are easy to conflate, kept apart — with the measurement
config/loom.config's comment states what this lane measured, because it changes how the pin should be read:So the engine tree cannot build this toolchain — it comes from a separate clone of
ROCm/hrx-system. That is the state LOOM-GPU-SWITCH condition 1 (frozen fallback) leaves the GPU route in: the cards' Loom and the engine's HRX runtime are two pins, and a reader who assumes one implies the other would try to build Loom out ofthird_party/and fail for the wrong reason.The check, and what it says about this box today
That last line is the L5 gap in one command: the box's Loom venv is a minor version behind the cards. Without a clone of the repo the tool answers cannot-tell (2) with the reason and the command to fix it, never a pass.
Reproducibility, and the Bazel finding
.bazelversionat this commit is 9.2.0;~/.local/bin/bazelis 9.3.2, and with it the recipe dies in analysis, 23 s:which reads like a source defect and is a toolchain mismatch. That is why
bazel_version=is part of the pin and not a README line. The wheel build (iree-bazel-build --config=loom-sdk --config=opt //loom/packaging/python:wheel) is running against 9.2.0 in this lane's window; its outcome is being posted here rather than asserted, and until a wheel is installed the check keeps reporting the 0.1.0 finding — which is the correct answer.Arms, wiring, and what this PR does not do
Six hermetic self-test arms (scratch repo, a
version.jsonat a commit): agreement → 0; wrong version → finding; wrong catalog → finding; unknown commit → cannot-tell; no clone → cannot-tell; short sha → finding. Wired asloom_pin_check_self.config_pin_checknow validates five pins instead of four (it globsconfig/*.config), anddocs/releases.md's pin table names the Loom toolchain for the first time.Not in this PR — deliberately: no model routing or
loom-serveintegration (L1), no gated A/B (L2), no card writing (L3), no NPU→Loom KV handover (L4). This is the toolchain pin only, and it changes no runtime behaviour: nothing readsconfig/loom.configyet, which is also why it is safe to land while the fallback route stays frozen.