Skip to content

ci: run the fork's recorded-stale expectation check here, where a PR sees it (engine#2774) - #2841

Closed
bong-water-water-bong wants to merge 1 commit into
mainfrom
os3-hrx-stale-in-ci
Closed

bong-water-water-bong wants to merge 1 commit into
mainfrom
os3-hrx-stale-in-ci

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

The check from llama.cpp #419 is registered as test-hrx-stale-expectations, inside if (TARGET ggml-hrx). Measured after it merged: none of the fork's 50 workflows mentions GGML_HRX, so the HRX backend is never configured in that repo's CI and every row under that guard — this one and hrx-ops-test itself — is invisible at PR time.

That is the trap the engine's own CI comments already name ("a row that skips is not a gate"), and I walked into it: the check is a gate for whoever builds with -DGGML_HRX=ON and for the device lanes, and for nobody on a pull request.

The check is CI-able by design and this repo already has the tree. It reads tests/hrx-ops-test.cpp, ggml/src/ggml-hrx/**/*.cpp and the corpus manifests — no CMake, no HRX SDK, no GPU, about a second. ci.yml already runs git submodule update --init --depth 1 third_party/llama.cpp (the same commit the build compiles), so the step runs against the pin this repo ships.

      - name: The fork's recorded-stale kernel expectations are honest
        run: |
          python3 third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py --self-test
          python3 third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py --check \
              --root third_party/llama.cpp

Verified against a real checkout at the pin ddd415f4a:

$ check_stale_expectations.py --self-test
self-test ok
$ check_stale_expectations.py --check --root <fork at the pin>
stale-expectations: 31 recorded, every one exported by a corpus and selected by no matcher      rc 0

Both modes run: --self-test so the fixtures are exercised too (a check whose own arms never run is the same problem one level down), and --check for the ratchet. A recorded kernel that becomes selectable (ROTTED) or that no corpus exports any more (NOT EXPORTED) exits 1.

What it does not do: it cannot see a kernel that is registered and still not selected — that is the other half of engine#2774 (the eight names), which is a fixture/guard question, not a table one.

…s it

engine#2774's check landed in the fork as `test-hrx-stale-expectations`,
inside `if (TARGET ggml-hrx)`. Measured afterwards: **none of the fork's
50 workflows mentions GGML_HRX**, so the backend is never configured in
its CI and the row is invisible at PR time -- the trap of a gate that
cannot run. This repo's build step already fetches the submodule
(`git submodule update --init --depth 1 third_party/llama.cpp`), so the
same check runs here in about a second, needs no SDK and no GPU (it
reads source files), and is pinned to the same commit the build
compiles.

It runs both modes: `--self-test` (hermetic fixtures) and `--check`.

Not pushed yet: this repo already holds three open PRs from this lane
(#2819, #2822, #2833). Ready to push the moment one lands.
@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

Closing this in favour of #2839 and #2840, which are both 8 minutes older (03:32:25 and 03:32:40 against 03:40:27) and do the same job. Three PRs for one row is the waste #2807 was filed about, and I did not run gh pr list --search 2836 before implementing — the rule I last broke on #2737 and have now broken again.

What is worth carrying into whichever of those two lands, because it is the only thing this one did differently: it ran the fork's own script in place.

python3 third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py --check --root third_party/llama.cpp

ci.yml already checks out that submodule at the shipped pin (git submodule update --init --depth 1 third_party/llama.cpp), and the pin ddd415f4a contains the script (llama.cpp #419), so there is nothing to add to this repo. Both #2839 (tools/ci/hrx_stale_expectations.py, 90 lines) and #2840 (tools/ci/stale_expectations_check.py, 99 lines) instead reimplement it — neither contains kRecordedStaleExpectations or GGML_HRX_KERNEL_REF, so they are independent parsers of the same table, a third and a fourth of the ~223-line original.

That is the drift class this fleet has already paid for twice tonight (gpu-hold four features stale, accel_sampler.sh 207 vs 253 lines): two implementations of one checker agree until exactly the moment one of them is fixed. A wrapper that runs the fork's script keeps one parser and one set of arms; if either of those PRs wants to keep its own file, the argument for that needs to be in the body, because "the copy is smaller" is not a property that survives the first bug fix.

@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

CI Check Placement

The PR introduces a CI check to validate the fork's recorded-stale kernel expectations. While the check is valuable for ensuring correctness, it is placed in a location that may not be optimal for catching issues early. The check runs against the pinned llama.cpp fork, but its placement in the CI workflow might not provide sufficient visibility or integration with the overall build process to effectively gate pull requests.

- name: The fork's recorded-stale kernel expectations are honest
  run: |
    python3 third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py --self-test
    python3 third_party/llama.cpp/ggml/src/ggml-hrx/tools/check_stale_expectations.py --check \
        --root third_party/llama.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant