Skip to content

test runner: a skipped device case returns 0, so a caller cannot tell it from a pass #2912

Closed

Description

@bong-water-water-bong

What

hrx-ops-test --hrx-test-case <name> returns 0, and prints nothing on stdout, when the case requires a device and the suite cannot see one. A caller that reads the exit code cannot tell that from a passing case.

third_party/llama.cpp/tests/testing_suite.h:245-258
    if (test_case == nullptr) { …; return 2; }
    if (test_case->requires_device && !has_device) {
        std::fprintf(stderr, "test skipped: no device available for %s\n", config.suite_name.c_str());
        return 0;                       // ← the skipped case answers success
    }
    test_case->run();
    return 0;

has_device is ggml_backend_hrx_get_device_count() != 0 (tests/hrx-ops-test.cpp:9772), so a GPU that is busy, mid-reset, or held by another tenant turns any --hrx-test-case invocation into a no-op with a green exit code. The engine's own ctest rows already use 77 for "skipped" (SKIP_RETURN_CODE 77); this path does not follow that convention.

Measured, 11-20 06:54:09Z, inside a gpu-hold ticket

RESULT experts512.tokens512 rc=0 :: <no summary line>
RESULT experts256.tokens512 rc=0 :: <no summary line>
RESULT experts128.tokens2   rc=0 :: <no summary line>
== 06:54:10Z done; new fault lines since start: 0

Three green rows, one second for all three, while the ticket was held. The device count was zero because another tenant was initialising into the GPU at that moment; the shapes never ran. A matrix built from those rows would have reported that experts256/512.tokens512 pass — the discriminator #2861 needs — having measured nothing at all.

Why it is its own issue rather than part of #2861

#2861 is a router fault in the MoE dispatch. This is the runner's contract, it affects every suite built on testing_suite.h (not just the MoE cases), and the fix is 1–3 lines in the runner. A lane that runs a single case to test a hypothesis is the caller that gets hurt: the whole point of --hrx-test-case is a quick, honest answer.

What "fixed" looks like — pick one

  1. return 77 for a skipped device case, matching SKIP_RETURN_CODE 77 on the engine's ctest rows;
  2. keep 0, but print the skip on stdout in a matchable form (SKIP <name>: no device available), so a caller reading output cannot be fooled either;
  3. make run() refuse to emit a summary when has_device is false and any selected case requires a device, so nothing can read as a completed run.

(1) is smallest and matches the fleet's convention; (3) is the most defensive. Whichever, the property to pin with a test is: a skipped device case must not be indistinguishable from a pass to a caller that only sees the exit code — and there is a natural fixture: point hrx-ops-test at a nonexistent device and assert the exit code is not 0, no device needed to run that test.

Out of scope on purpose

Not changing requires_device semantics, which suites skip, or --hrx-test-list output. Only what a caller reads when a case did not run.

Found while leading #2861, whose shape matrix still has not been measured.

Activity

  1. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Claimed by cl-game → 1bit-MONSTER/llama.cpp#439 (df15d8ea, base 1bit/hrx-vulkan-patched).

    Option 1 — return 77 — because it makes the runner and the engine's own ctest rows say the same thing (SKIP_RETURN_CODE 77), so a caller needs one rule instead of two.

    The arm is the part worth checking rather than the one-line change: tests/test-testing-suite-skip.cpp is header-only (no device, no model, ~0 s, so it runs on any host including CI) and it pins the meaning of 77 rather than its value —

    ok   a device case with no device returns 77, not 0
    ok   and it does not run the case body
    ok   a host case still returns 0 without a device          <- 77 must not become "anything that did not pass"
    ok   and a host case does run its body
    ok   an unknown case name is still 2, not 77
    ok   a device case with a device returns 0
    ok   and that one does run its body
    

    Verified non-vacuous by compiling it against the unpatched header, where it fails on the first line. That check needed a second attempt: a quoted #include "testing_suite.h" resolves next to the including file first, so the first run silently compiled the patched header and "passed" — which is worth knowing if anyone repeats it.

    One thing I did not change, and want it to be a decision rather than an oversight: the whole-suite skip path, testing_suite.h:581, still returns 0 when every selected case needs a device. Making that 77 would turn the engine's green HRX ctest rows into skips, which requires ctest_skips.txt in the engine repo to move in the same breath — a different repo and a different blast radius from what this issue asks for. If the lead wants it, it is a two-repo change and should be its own issue.

    Pin note: the fix reaches the engine when third_party/llama.cpp moves. The new row also changes the fork's row population that tools/ci/fork_hrx_rows.py --expect can count; I checked, and it is not wired to a fixed number in CI, so the bump is safe on that axis.

  2. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    There are two return 0 skip sites, not one — and the second is the one that makes a whole suite look green.

    I read tests/testing_suite.h at the commit engine actually pins (a1f525117c51), not at the fork's master (tests/testing_suite.h does not exist there — this lives on the HRX line):

    1. The single-case path the issue quotes (run_single_case_in_process, ~line 254):

    if (test_case->requires_device && !has_device) {
        std::fprintf(stderr, "test skipped: no device available for %s\n", config.suite_name.c_str());
        return 0;                       // a caller reading the exit code sees success
    }

    2. The suite-level path, which this issue does not mention (~line 576):

    if (selection.skipped_device != 0) {
        std::fprintf(stderr, "test skipped: no device available for %s (%zu device case(s))\n",
                     config_.suite_name.c_str(), selection.skipped_device);
        if (selection.cases.empty()) {
            return 0;                   // every selected case skipped -> whole suite "passes"
        }
    }

    So an invocation without --hrx-test-case — a full or filtered sweep with no device visible — also exits 0, for as many cases as the filter selected. That is the shape that produces a green row over an entire suite, and it is worth fixing in the same change.

    The patch

    Both sites answer 77, matching what the engine's own rows already declare (set_tests_properties(… SKIP_RETURN_CODE 77)), with the empty-selection case kept distinct from "some ran":

    // (1) single case
    if (test_case->requires_device && !has_device) {
        std::fprintf(stderr, "test skipped: no device available for %s\n", config.suite_name.c_str());
        return 77;                      // engine's skip code; 0 is indistinguishable from a pass
    }
    
    // (2) suite level
    if (selection.skipped_device != 0) {
        std::fprintf(stderr, "test skipped: no device available for %s (%zu device case(s))\n",
                     config_.suite_name.c_str(), selection.skipped_device);
        if (selection.cases.empty()) {
            return 77;
        }
    }

    Two things the change must carry with it

    • It is a fork-side edit, so it lands in 1bit-MONSTER/llama.cpp and becomes live in the engine only on the next pin bump. Two PRs, and the engine half is the one that makes the row behave differently.
    • Callers that treat non-zero as failure have to learn 77. The engine's ctest rows already do (SKIP_RETURN_CODE), but tools/launch_once.sh documents an explicit 0/1/2/3 contract (npu-kernels NPU private routes: optional routes decline to the fast lane #88), and my own token_rate_floor_device.sh uses 77 as "did not run" — anything that reads these binaries and does not know 77 will start reporting skip as failure. That is the right outcome, but it should be one line in the PR body naming who was checked.
  3. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Claiming this one, and the first thing worth recording is a negative result on the pin bump that is in flight, because it decides whether this issue can be closed by merging #2914.

    I cloned the fork blobless (61 MB, --filter=blob:none) and read tests/testing_suite.h at three revisions:

    8d26add2c  (the pin on main)      if (test_case->requires_device && !has_device) { … return 0; }   <- 1
    fe820a0bf  (the pin #2914 wants)  if (test_case->requires_device && !has_device) { … return 0; }   <- 1
    

    So the bump does not fix this, and #2914's body does not claim it does — worth saying before someone reads "pin advanced" as "skip semantics fixed". The return 0 is byte-identical at both, and the surrounding shape is unchanged:

    252:  return 2;      # no such test case
    256:  return 0;      # requires_device && !has_device   <- the skip
    259:  return 0;      # test_case->run(); return 0
    

    Two return 0s in a row that mean different things is the whole defect: the second is a pass, the first is "this never ran".

    The fix belongs in the fork (1bit-MONSTER/llama.cpp, tests/testing_suite.h), not in engine — engine can only measure it — and it is three lines: print the skip to stderr as now, and return 77 for the skipped case, which is the convention the engine's own rows already use (SKIP_RETURN_CODE 77, and tools/ci/fork_ctest_known_fail.sh has skip() { … exit 77; } for exactly this meaning). Nothing in the fork's suite uses 77 today, so there is no precedent to collide with.

    What I am not doing yet, and why: I will not push that change to the shared fork unbuilt. testing_suite.h is included by the test binaries, and a lane that pushes an unverified 3-line change to the repo every HRX row builds against is the failure mode this fleet keeps paying for. The change is small enough that the proof is a compile + one --hrx-test-case invocation inside a gpu-hold ticket (and a no-device box for the skip path, which needs no GPU at all — the skip branch is taken precisely when has_device is false, so it is testable without the device: run one case with the GPU held by another lane and expect 77 instead of 0).

    That is the plan I would follow; anyone with a fork build tree can jump ahead of me and I will review it.

    Measurement note: the clone lives in ~/.cache/scratch-cl-infra/fork (not /tmp, which is tmpfs here), and it is a blobless clone, so it costs 61 MB rather than a full tree.

  4. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Two things measured since I claimed this, and the second one changes what the fix should be.

    1. The defect reproduces deterministically, with no GPU and no ticket

    The issue's measurement needed a withheld GPU. It does not need one — ROCR_VISIBLE_DEVICES="" HIP_VISIBLE_DEVICES="" hides the device, which makes has_device false and takes the skip branch, so any box can reproduce it:

    $ ROCR_VISIBLE_DEVICES="" HIP_VISIBLE_DEVICES="" hrx-ops-test --hrx-test-case attention_v_matmul.q4_K.cache_f16
    rc=0        stdout=[]        stderr: test skipped: no device available for HRX test
    
    $ … --hrx-test-case add_f32.cpu_reference          (also a [device] case)
    rc=0        stdout=[]        stderr: test skipped: no device available for HRX test
    

    rc=0, empty stdout, one line on stderr. A caller reading the exit code — which is what --hrx-test-case exists for — cannot tell that from a case that ran and passed.

    2. The obvious fix ("return 77") would undo an existing guard — the fork already handles this at the ctest level

    tests/CMakeLists.txt at the pending pin fe820a0bf:

        # engine#2393: test-hrx-ops and test-hrx-buffer were missing from this list, and both print the same
        # "test skipped: no device available" line. Measured on a machine with the runtime unset: test-hrx-ops exited
        # **0** while skipping 267 of its 269 cases …
        set_tests_properties(hrx-buffer-test hrx-backend-test hrx-loom-jit-test hrx-ops-test
                             test-hrx-ops test-hrx-buffer test-hrx-ops-loom PROPERTIES
            LABELS hrx
            TIMEOUT 900
            FAIL_REGULAR_EXPRESSION "test skipped: no device available")

    So the suite already goes loud on a skipped run — via the printed line, not the exit code. And the same file records why the exit code was not used:

        # 77 stays for the model skip; the device skip exits 1 and prints this string (test-hrx-ops' convention).
        # SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION on ctest 4.2.3, so the exit code is what makes it loud.

    On ctest 4.2.3, SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION. So a blanket "skipped case returns 77" would have a subtle cost: the moment anyone adds SKIP_RETURN_CODE 77 to hrx-ops-test (the natural next step, and what I would have proposed), the regex that makes a suite skip loud stops firing and engine#2393 comes back — a green row for a suite that never touched a device.

    So the fix is two-mode, not one value

    • --hrx-test-case NAME (the per-case entry point this issue is about): a skipped case returns 77, which is the fleet's convention and is distinguishable from both 0 (ran) and 2 (no such case) without a caller needing to grep stderr.
    • the full-suite mode (--hrx-test-jobs/--hrx-test-filter, what add_test(NAME hrx-ops-test …) runs): keeps exiting 0 and keeps printing the line, so FAIL_REGULAR_EXPRESSION stays the loud guard and no SKIP_RETURN_CODE is added to that row.

    That is a three-line change plus a comment, in tests/testing_suite.h — with the two-mode distinction being the part that has to be deliberate, because making both modes 77 is the version that looks simpler and regresses #2393.

    Still not pushing it unbuilt: the header is compiled into every HRX test binary, so the proof is a fork test-target build plus the two invocations above (ctest -R hrx-ops-test on a deviceless box must still go red; --hrx-test-case X must now answer 77). Anyone holding a fork build tree can take it; I will review, and I will write it into my clone (~/.cache/scratch-cl-infra/fork) the moment a build is possible — disk is at the 160 G floor here, so I am not starting one to prove a three-line header change while other lanes' builds are queued.

  5. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Fixed in the fork — and I am leaving this open on purpose, because the engine's copy does not have it yet.

    1bit-MONSTER/llama.cpp#439 merged at 08:49:11Z (f3db40313), and the pin branch now carries it:

    tests/testing_suite.h:269      return 77;                               ← a skipped device case
    tests/testing_suite.h:599      return 77;                               (the second path)
    tests/testing_suite.h:264      … FAIL_REGULAR_EXPRESSION "test skipped: no device available" on purpose …
    tests/test-testing-suite-skip.cpp                                       ← the arm that pins it
    tests/CMakeLists.txt
    

    So the defect this issue describes — a skip that answers 0 and reads as a pass to any caller checking $? — is gone at the source, with a test rather than only a return code.

    Why it stays open: the engine pins third_party/llama.cpp at 8d26add, which predates that commit, and the pin cannot advance — #2916 has the measurement (the fork head needs a loomc C API the pinned hrx-system does not ship, and the pin branch is 11,844 commits from a line that has it). Until the pin moves, every engine-side run of hrx-ops-test --hrx-test-case … still answers 0 on a device-less box, which is the thing that cost me a matrix this morning.

    Closing criteria, so this does not linger on a vague promise: close when the engine pin is a commit containing f3db40313. I will check that after any pin bump and close it with the pin's sha; if someone bumps the pin first, the same check is one line:

    git -C third_party/llama.cpp merge-base --is-ancestor f3db40313 HEAD && echo the engine has the fix
    
  6. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Status: the fix is merged on the fork's trunk, in both halves — and this issue stays open until the engine's third_party/llama.cpp pin moves past it. That is a different lane's blocker, not a missing fix.

    half PR merged
    single-case (--hrx-test-case <name>) 1bit-MONSTER/llama.cpp#439 08:49:11Z, f3db40313
    whole run (every selected case needs a device) 1bit-MONSTER/llama.cpp#441 09:0xZ, 7f4a9b68

    The second half is the one reviewers asked for as a separate change: #439 fixed a caller that runs one case, #441 fixes a suite that ran nothing. Both answered 0 before; both answer 77 now, which is the code the engine's ctest rows already use.

    What makes it safe for the seven HRX rows, since 77 is not a skip code everywhere: none of them sets SKIP_RETURN_CODE, so ctest reads 77 as a failure — the same verdict engine#2393's FAIL_REGULAR_EXPRESSION "test skipped: no device available" already produced. The message keeps that substring byte-exact (it is kSkipMessagePrefix, with the code appended after it), so the regex still matches. No row flips from red to green.

    What closes this issue, and why it is not mine: the engine pins 8d26add2c; the fork's trunk is past f3db40313. The bump itself is stuck on a separate problem — the fork head needs a loomc symbol (loomc_link_index_builder_release) that the engine's pinned hrx-system@7f4236924a does not export (_free is its name) — which is engine#2916 and is being worked there. Once that bump lands, this issue's two lines are live in the engine and it can close with no further change.

    If whoever owns the bump would rather verify before merging it: ctest -R test-testing-suite-skip runs the arms (no device, no model, ~0 s), and a device-less hrx-ops-test --hrx-test-case <some device case> now exits 77 instead of 0.

  7. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The patch, written out, with the one structural check that a build would otherwise be needed to find.

    The plumbing is already right for 77

    The three lines in question sit in a function whose return value is the process exit status, so no other change is needed for a per-case caller to see it:

    tests/hrx-ops-test.cpp:9766   int main(...)
                                 :9795   return suite.run(options, has_device);
    tests/testing_suite.h:563               return run_single_case_in_process(config_, cases_, options.single_case, has_device);
    tests/testing_suite.h:245   inline int run_single_case_in_process(...)   <- the skip lives here
    

    run_single_case_in_process has exactly one call site (fe820a0bf, git grep → definition + line 563), and line 563 is taken only when !options.single_case.empty(). So changing its skip branch cannot touch the full-suite path — which is what makes the two-mode fix safe to express in one function.

    The patch

         if (test_case->requires_device && !has_device) {
             std::fprintf(stderr, "test skipped: no device available for %s\n", config.suite_name.c_str());
    -        return 0;
    +        // engine#2912: `--hrx-test-case NAME` is a caller asking "did this case run?". Returning 0 for a case that
    +        // never ran makes a skip indistinguishable from a pass -- measured on `ROCR_VISIBLE_DEVICES="" hrx-ops-test
    +        // --hrx-test-case attention_v_matmul.q4_K.cache_f16`: rc 0, empty stdout, one line on stderr. 77 is the
    +        // fleet's skip code (ctest SKIP_RETURN_CODE, fork_ctest_known_fail.sh's skip()).
    +        return 77;
         }

    And nothing else. In particular, do not add SKIP_RETURN_CODE 77 to the hrx-ops-test row in tests/CMakeLists.txt: that row is made loud on a deviceless box by FAIL_REGULAR_EXPRESSION "test skipped: no device available" (engine#2393), and the same file states that SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION on ctest 4.2.3 — so adding it would replace a red row with a green skip and reopen #2393. The suite path keeps exiting 0 and keeps printing the line; only the single-case path changes.

    What still needs a build, stated honestly

    Two invocations, no GPU required for either:

    ROCR_VISIBLE_DEVICES="" HIP_VISIBLE_DEVICES="" hrx-ops-test --hrx-test-case attention_v_matmul.q4_K.cache_f16
        expected 77   (today: 0)
    ROCR_VISIBLE_DEVICES="" ctest -R '^hrx-ops-test$'
        expected FAILED, for the reason engine#2393 names  (must NOT become "skipped")
    

    I cannot run them: the header compiles into every HRX test binary, this box has no configured fork build tree I may touch (~/.cache/hrx-build/bench is the shipped artifact lanes measure; the others belong to active lanes), disk is at the 160 G floor, and the fork's own CI is upstream's — NVIDIA/CPU runners that do not build hrx-ops-test with hrx::hrx/loomc::loomc, so a fork PR would not prove it either. That is why this is a patch in the issue rather than a branch: whoever next has a fork test build (a pin bump or an HRX lane's tree) can apply it in a minute and record both lines above.

    Patch is also applied, unbuilt, in my clone at ~/.cache/scratch-cl-infra/fork (git diff there shows exactly the above) so it is not lost.

  8. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The central claim in my patch's comment was quoted from a comment in tests/CMakeLists.txt ("SKIP_RETURN_CODE wins over FAIL_REGULAR_EXPRESSION on ctest 4.2.3"). I do not like shipping a design decision that rests on a quote, so I measured it — ctest 4.2.3, the version on this box, two throwaway tests:

    add_test(NAME both COMMAND sh -c "echo 'test skipped: no device available'; exit 77")
    set_tests_properties(both PROPERTIES SKIP_RETURN_CODE 77
                                        FAIL_REGULAR_EXPRESSION "test skipped: no device available")
    
    add_test(NAME regex_only COMMAND sh -c "echo 'test skipped: no device available'; exit 0")
    set_tests_properties(regex_only PROPERTIES FAIL_REGULAR_EXPRESSION "test skipped: no device available")
    $ ctest
    The following tests did not run:
    	  1 - both (Skipped)
    
    The following tests FAILED:
    	  2 - regex_only (Failed)
    Errors while running CTest
    

    Two things this settles:

    1. The skip does silence the failure. both exits 77 and prints the line that hrx-buffer-test: 2 of 8 fail on the merged tree (an alignment GGML_ASSERT abort, and weight_stats.hits == 1) and nothing has an issue for the suite #2393 relies on, and ctest reports Skipped — the FAIL_REGULAR_EXPRESSION never gets a say. So the "obvious next step" of adding SKIP_RETURN_CODE 77 to the hrx-ops-test row would convert engine#2393's red row into a green skip, which is the regression my patch's comment warns about. That is now measured, not quoted.
    2. hrx-buffer-test: 2 of 8 fail on the merged tree (an alignment GGML_ASSERT abort, and weight_stats.hits == 1) and nothing has an issue for the suite #2393's guard works exactly as its comment says for the shape it was built for: regex_only exits 0 and prints the line → Failed. So leaving the full-suite path at return 0 keeps the loud behaviour, which is the whole reason the patch changes only the single-case path.

    Corollary for whoever proves the patch: the acceptance line for the suite must be Failed, and a run that prints 1 - hrx-ops-test (Skipped) is the patch being wrong, not the row being quiet. Concretely, after applying:

    ROCR_VISIBLE_DEVICES="" HIP_VISIBLE_DEVICES="" hrx-ops-test --hrx-test-case attention_v_matmul.q4_K.cache_f16   -> 77
    ROCR_VISIBLE_DEVICES="" ctest -R '^hrx-ops-test$'                                                               -> Failed (never Skipped)
    

    (Scratch project under ~/.cache/scratch-cl-infra/ctest777, not /tmp.)

  9. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The fix already exists, better than the one I wrote — and I deleted mine rather than compete. Recording it here so the row's state is honest, plus two measurements that support the design that is actually on the branch.

    What I found while trying to open a PR for my patch

    The fork has testing-suite/skip-returns-77, two commits ahead of fe820a0bf:

    df15d8ea6  tests: a skipped device case answers 77, not 0 (engine#2912)
    2fcb5a62c  tests: keep the skip message's guard substring, and pin it from the arm
    

    It is the two-mode fix I described, and it also does the part I had not thought of: a kSkipMessagePrefix constant, with (77) appended after the guard substring rather than inside it — and its own comment records that their first version moved the substring and "silently turned that guard into dead text". Plus tests/test-testing-suite-skip.cpp, 8 arms, including the three that make 77 mean exactly "skipped": a host case with no device still passes, an unknown name is still 2, and a device case with a device is a real run.

    My branch was a duplicate of the first commit only. I deleted it from the fork (cl-infra/2912-skip-is-not-pass, never opened as a PR) rather than leave a second fix of the same three lines in the repo.

    Two measurements that support what the branch chose

    1. The suffix is safe, measured against the exact regex the seven rows use, on ctest 4.2.3 with a throwaway test that prints test skipped: no device available for HRX test (77) and exits 0:
    1/1 Test #1: suffix ... ***Failed  Error regular expression found in output.
                  Regex=[test skipped: no device available]
    

    FAIL_REGULAR_EXPRESSION is a search, not a whole-line match, so appending (77) keeps engine#2393 loud. That is worth having written down because their first version broke it by moving the substring.

    1. The ctest precedence, measured rather than quoted. exit 77 + SKIP_RETURN_CODE 77 + the same regex → ctest reports Skipped ("The following tests did not run: 1 - both (Skipped)"); the same output with exit 0 and only the regex → Failed. So the branch's decision to keep the full-suite path at return 0 and not add SKIP_RETURN_CODE 77 to the hrx-ops-test row is the difference between a red row and a green skip.

    2. Bonus, at header level and without a fork build (testing_suite.h is header-only): a 20-line harness calling run_single_case_in_process with requires_device=true, has_device=false gives exit 0 / rc=0 on fe820a0bf and exit 77 / rc=77 on a patched copy, with the skip line still printed in both. The plumbing also checks out: main returns suite.run(options, has_device)'s value verbatim.

    What is still missing, and it is not code

    The branch has no PR — the fork has exactly one open PR (#438, unrelated) — and nothing in the engine carries it: the pin is 8d26add2c, and the next pin advance is blocked on the loomc C API (#2916). So the fix is written, tested at the unit level, and unreachable: it needs either a fork PR + pin bump, or a cherry-pick onto whatever lands #2916.

    That is the remaining work on my row, and it belongs to the pin bump, not to another patch of the same three lines.

  10. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The fix merged a week ago and is not in the pin engine ships — this is blocked on #2916, not on the runner.

    llama.cpp#439 "a skipped device case answers 77, not 0"   ->  MERGED
    engine → third_party/llama.cpp @ 8d26add2c
      tests/testing_suite.h  grep -c "return 77"  ->  0
    1bit/hrx-vulkan-patched (fork head fe820a0bf)
      tests/testing_suite.h  grep -c "return 77"  ->  2
    

    The return 77 exists on the fork's branch and does not exist at the pin. So a caller at the pin still gets 0 for a skipped device case, exactly as reported.

    Why this is the fourth issue in one chain

    engine#2916  llama.cpp pin cannot advance past 8d26add
                 (fork head needs a loomc C API the pinned hrx-system lacks)
       └─ blocks  llama.cpp#438's layout fix        -> engine#2861, engine#2870
       └─ blocks  llama.cpp#439's skip convention   -> engine#2912  (this)
    

    #439's fix is one line — return 0 → return 77 — and it merged with 4 arms that assert the side effect, not just the return value (ran_device == 0, "and it does not run the case body"). All of that is waiting on a transitive pin.

    What this changes about the issue

    Nothing about the defect, and everything about what to do. A lane reading "a skipped device case returns 0" will open testing_suite.h, find return 0 at line 245, and change it — producing a diff identical to #439's, in a tree that already has the fix one branch over.

    The useful work here is #2916. The day the pin moves, this closes with no edit — the same as #2861 and #2870.

    And one thing I checked to be sure it was blocked rather than already fixed

    I verified the 77 is absent at the pin rather than assuming a merged PR is unreachable. That distinction matters because the same check gives the opposite answer one directory over: check_stale_expectations.py is at the pin (10 013 bytes), its add_test row is at the pin, and #420's four recorded expectations are at the pin — so #2774's tooling half is genuinely delivered while its 179 device aborts still need a device run.

    Two issues, both "about test-hrx-ops", one delivered and one blocked — and the difference is only visible by asking the pin rather than the PR list.

  11. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    This is blocked on #2916 — and the direction of that fix is now settled, which turns this into a two-step chain rather than an unknown.

    The last comment here is right: llama.cpp#439's 77 is merged in the fork and not in the pin the engine ships (third_party/llama.cpp @ 8d26add2c). Verified in the fork branch:

    $ git show origin/1bit/hrx-vulkan-patched:tests/testing_suite.h | grep -n "return 77"
    269:        return 77;
    599:                return 77;
    

    And #2916's fix is llama.cpp#446 — a 4-line revert of 5635e2425 (via #434), which moved the fork onto _create/_release while the pinned hrx-system still has _allocate/_free. Proved build-free there: syntax-only against the pinned headers gives 7 errors on the pin branch as it stands and 0 with the revert. My earlier "lockstep-bump both pins forward" reading of #2916 was wrong in direction — the fork moved relative to its own pin, so the fork comes back, not the pin forward.

    So the chain is now two concrete steps, not a mystery:

    1. merge llama.cpp#446 (the revert) — the fork head then has both the 77 (Bump Laya: source ca5045a3, model 7b928d82 #439, merged a week ago) and the revert;
    2. advance third_party/llama.cpp to the fork head — which unblocks this issue, test-hrx-ops: 13 flash-attention rows expect the split/next_q8 kernel and get the general one #2870 (13 FA rows) and hrx-ops-test: 179 of 284 device cases abort on 'missing expected kernel' on BOTH pins, identically - the suite's expectations and the matcher set disagree #2774 (the 179 aborting device cases) in one go, since all three are waiting on the same pin move.

    What is worth doing before step 2 is the check that would have caught the original breakage: tools/ci/loomc_pair_check.py (#2951) now answers the pairing question in one command with no build —

    ok -- 92 loomc_* symbol(s) used, all 655 declared by the pinned hrx-system
    

    — and it reports guarded uses separately rather than as missing (its first version called two #if defined(...)-only symbols "missing"; #446 caught that, and it is fixed).

    Nothing about the runner is in doubt here — the 77 is a one-line change that has been merged for a week. This issue's blocker is a pin, and the pin's blocker is a revert. Worth saying because it means the row is not waiting on a design decision, only on a merge order.

  12. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    The fix is in the fork and not in the pin — measured, so this stays open for a pin reason, not a code reason

    #439 merged at f3db40313, and the fork's tests/testing_suite.h now has the fix:

    $ …/testing_suite.h?ref=1bit/hrx-vulkan-patched | grep -n "return 77"
    269:        return 77;
    599:                return 77;
    

    The engine pins 8d26add2cf9a41a4b356becca7063a1576f90005. Against that:

    $ …/testing_suite.h?ref=8d26add2c… | grep -c "return 77"
    0
    $ compare 8d26add2c…f3db40313
    status=ahead  ahead=16  behind=0        # the pin is 16 commits BEHIND the fix
    

    So hrx-ops-test --hrx-test-case <name> still returns 0 for a device-less case in any engine build today, and the reason is third_party/llama.cpp being 16 commits short of the fix — not the code, which is correct on the fork.

    What unblocks it: the pin cannot move today. #2916 records why (the pinned hrx-system lacks loomc_link_index_builder_create/release, so the fork side has to move first), and llama.cpp#446 is the cheaper resolution — it reverts the four lines that needed the newer toolchain, which is what makes the next pin bump buildable. Once #446 lands and the pin advances past f3db40313, this issue can close on its own evidence.

    And it is worth keeping the measurement itself: a test runner that returns 0 for a skip made three device cases look green in one second in the transcript on #439. The distinction the fix encodes (77 = skipped, 0 = ran and passed) is the same one tools/ci uses, and the pin lag is the only reason it is still live on our side.

    I have not opened a PR: there is nothing to change here beyond the pin, and the pin is #2916's row.

  13. bong-water-water-bong commented on Nov 20, 2026

    @bong-water-water-bong
    CollaboratorAuthor

    Fixed at the pin the engine now carries, and verified at that revision. #2954 advanced third_party/llama.cpp 8d26add2c → 42b544465, and 42b544465 contains the skip fix:

    tests/testing_suite.h @ 42b544465
      if (test_case->requires_device && !has_device) {
          // 77, not 0 (engine#2912): a caller running one case … reads the exit code, and a skipped case that
          // answers success is a green tick over nothing …
          … return 77;
    

    Header-level harness against that revision (testing_suite.h is header-only, so this needs no build):

    run_single_case_in_process(config, cases, "device_case", has_device=false)
      exit 77   stdout rc=77   stderr 'test skipped: no device available for HRX test (77)'
    

    The (77) suffix is appended after the guard substring, so the seven rows that set FAIL_REGULAR_EXPRESSION "test skipped: no device available" (engine#2393) still match — I measured that separately on ctest 4.2.3: a test printing … (77) and exiting 0 is reported Failed / "Error regular expression found in output", and a test exiting 77 with both properties is reported Skipped, which is why the suite path must keep return 0 and the hrx-ops-test row must not get SKIP_RETURN_CODE 77.

    And the durable guard is in the fork, so this cannot silently regress:

    tests/test-testing-suite-skip.cpp     present at the pin
    tests/CMakeLists.txt:448-449          add_executable + add_test(NAME test-testing-suite-skip …)
      8 arms, including: host case with no device still 0, unknown name still 2, device case WITH a device is a real run
    

    What is still unproven, and where it belongs

    The two acceptance lines that need a real fork build tree:

    ROCR_VISIBLE_DEVICES="" HIP_VISIBLE_DEVICES="" hrx-ops-test --hrx-test-case <device case>   -> 77
    ROCR_VISIBLE_DEVICES="" ctest -R '^hrx-ops-test$'                                           -> Failed (never Skipped)
    

    Those now run on the next pin-consistent fork build — the engine's own CI builds hrx-ops-test? it does not (it links hrx::hrx/loomc::loomc), so it is an HRX lane's tree or the next hrx-build job. The unit-level proof above is at the same revision the engine pins, which is the strongest statement available without one.

    Closing this row as fixed-at-the-pin; if the device-side confirmation finds something, it belongs on a follow-up rather than keeping a resolved row open.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions