Skip to content

Working PR from 2026-11-28: fixes from the default pipeline and agent runs (base for the next experiments) - #123

Draft
nicolasribeiro2028 wants to merge 8 commits into
mainfrom
thesis/session-preset-anchor
Draft

nicolasribeiro2028 wants to merge 8 commits into
mainfrom
thesis/session-preset-anchor

Conversation

@nicolasribeiro2028

@nicolasribeiro2028 nicolasribeiro2028 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

The working PR for Tactics from 2026-11-28 on: every Tactics fix found by the default pipeline (Daint checking jobs on the A/A shortlist) and by the local agent runs goes on this branch, and the experiments of the next days run on it. The DaCe fixes found the same way are in draft spcl/dace#2811; the runs use dace-extended 1.0.5 with #2811 applied on top until a release carries it.

Fixes

Commit Fix Symptom it removes Found on
183699a A session of a fuzzed judge runs at the fuzz anchor, not always XL every Tactics session built XL inputs under an L+fuzz judge and ran out of memory local agent runs (Mac, Docker)
8d5a24e A kernel's check skips a ScatterConflictCheck's tag scratch conflict-check ("sort") kernels judged wrong while the program was correct (ilu0, lulesh, qe_vexx_k, sparse_cholesky, CPU) Daint A/A shortlist jobs
a98fa29 A kernel cut from a loop keeps the range of the loop's iterator stockham_fft's whole program wrong on the GPU from K = 12 on: indices truncated a floating pow Daint A/A shortlist jobs, then a kernel-by-kernel replay
f5da9d5 A NumPy reference keeps the defaults of parameters the data does not hold qe_cegterg ungraded wherever the bench's numba and C references cannot run: its NumPy function raised KeyError: 'gamma_only' Daint A/A shortlist jobs, then the local container
e303f87 Stage 5 builds a session's kernels at once (Session.default_builds): write-up stage 5 waited on one compiler at a time: qe_cegterg's 29 GPU builds took 476.6 s, now 113.3 s (Daint, same job) Daint T49-04 check of qe_cegterg

Each fix has a tagged reproducer test (# Reproducer:), and each section below gives its symptom, cause, fix and tests. New fixes and changes are added to this table as they land. e303f87 is a speed-up, not a fix; its reproducer-style tests are in tests/test_parallel_builds.py.

Pin. 7a40c72 pins dace-extended>=1.0.5,<1.0.6. 1.0.6 (released 2026-11-29) shifts a loop such as range(1, T) to start at 0; with it, 7 unit tests and 1 integration test fail on this branch's parent 8d5a24e too, and they all pass on 1.0.5. The pin keeps this PR on the version its runs use (1.0.5 with spcl/dace#2811) until Tactics is adapted to 1.0.6. 55a5d04 makes the loop-range test of fix 3 read the loop's own bounds, so it holds on both versions.

1. A session of a fuzzed judge runs at the fuzz anchor, not always XL

Symptom

On a judge whose preset is fuzzed around a rung other than XL (HPCAGENT_BENCH_SERVICE_PRESET=L+fuzz), every Tactics session ran on XL inputs. This affected both the agent's judge route and the tactics_bench tuner columns. The judge itself grades around L, so the session measured at another size than the grade, and on a small machine it ran out of memory: on a 16 GB Mac under Docker, every Tactics column OOMed within about 15 s on every kernel tried, jacobi_1d included. The XL+fuzz default hides it, because there both sides are XL.

Cause

Both callers hand Setup the judge's resolved preset:

  • plugin/tactics/routes/tactics.py:297: judge.cfg.preset.text
  • tactics_bench/__init__.py:87: resolve_preset(service.preset).text

For any <rung>+fuzz token that text is fuzzed, because hpcagent_bench.spec.resolve_preset returns the base Preset.FUZZED and moves the rung into the config override fuzz.anchor. tactics.server.size_rung("fuzzed") then parses the bare token, whose anchor is XL. The session process is started with spawn, so it cannot read the judge's in-memory override itself.

Fix

tactics.server.session_preset(preset), called in the caller's process, gives a bare fuzzed its anchor back from fuzz.anchor (fuzzed → L+fuzz) and keeps every other token. This is the reading the bench itself uses for the rung of a fuzzed run (hpcagent_bench/harness/service.py, profile_size). Both callers pass their token through it, and size_rung is unchanged. The bench import is deferred, as size_rung's is.

Tests

  • New tagged reproducer: tests/test_bench_data.py::test_a_session_of_a_fuzzed_judge_keeps_the_anchor_rung. It checks that resolve_preset("L+fuzz") then session_preset gives L+fuzz and rung L, that XL+fuzz still gives XL, and that other tokens are kept.
  • Before the fix, size_rung(resolve_preset("L+fuzz").text) is XL; after it, size_rung(session_preset(...)) is L.
  • tests/test_bench_data.py: 7 passed (Linux container, dace-extended 1.0.5, hpcagent-bench 1.0.5).
  • tests/test_bench_plugin.py::test_the_reference_column_starts_on_the_preset_the_token_resolves_to asserted the bug (["fuzzed"] for XL+fuzz). It now asserts ["XL+fuzz", "L+fuzz"] with rungs XL and L. The rest of the file: the same 11 tests fail on origin/main 4c639ab and on this branch in a plain Linux container (grading tests that need the bench's launch environment), and 68 pass on both.
  • mypy (65 files) and mypy tests (149 files): no issues. pre-commit: ruff check, ruff format, gitleaks and headers pass.
  • End to end: on an L judge (Mac, Docker, judge image judge-cpu-aarch64), dace_cpu_canon_tactics_default on quatrex_rgf grades correct, hidden 5/5 (it OOMed before the fix with L+fuzz, as on every kernel). Mac times, not citable.

Not in this fix

On the same Mac judge, grading children still fail for reasons outside Tactics. The numba/C baselines write temp files into the read-only checkout, and a grading child maps both libgomp and libomp. Both come from launching the judge by hand instead of through the bench's cluster scripts, and are tracked separately.

2. A kernel's check skips a ScatterConflictCheck's tag scratch

Symptom. On the CPU target, the conflict-check ("sort") kernels of ilu0, lulesh, qe_vexx_k and sparse_cholesky were judged wrong by their own check while the whole program was correct.

Cause. These kernels are ScatterConflictCheck nodes. Their flag matches the oracle. The only differing output is the check's tag scratch (_owner_out), which DaCe documents as never read before it is written and allowed to carry stale values, so no oracle can predict it. On ilu0's extcall_lib_sort0, all 82654 elements of the scratch Tmp0 differ (the oracle's zeros against stale tags), while the flag tmp5 is equal.

Fix. checked_probe (tactics/stages/kernel.py) leaves out unspecified_outputs(boundary): the outputs written through a ScatterConflictCheck's scratch connector, resolved through nested SDFGs to the boundary's names (outermost_name).

Tests.

  • New tagged reproducer: tests/test_kernel_stage.py::test_a_scatter_checks_tag_scratch_is_not_graded, at the top level and nested.
  • tests/test_kernel_stage.py in a Linux container without a GPU: the same 7 GPU-only tests fail with and without the change; 28 pass with it.
  • mypy and mypy tests: no issues. ruff and the header check pass.
  • On CSCS Daint (job 5478369, with [extended] Fixes from Tactics' default pipeline on HPCAgent-Bench (weekend of 2026-11-28) dace#2811 applied to dace-extended 1.0.5): ilu0 and sparse_cholesky have every kernel correct on the CPU target, the sort kernels included, and on the GPU target every conflict-check kernel passes its own check.

3. A kernel cut from a loop keeps the range of the loop's iterator

Symptom. npbench stockham_fft on the GPU target: every kernel passes its own check, but the whole program's y is wrong on every element from K = 12 on (exact up to K = 11). The CPU target is right at every K.

Cause. A kernel left inside a sequential loop takes the loop's iterator as a plain argument. Cut from the loop, DaCe's RelaxIntegerPowers can no longer prove an exponent such as K - _loop_it_0 - 1 nonnegative, so R**e stays a libm pow that every index and loop bound truncates to int64_t. On the device pow(2, 11) rounds just below 2048, so doall27 leaves Tmp4[2048] and Tmp4[4095] unwritten and lib_linalg0 misplaces one element.

Fix. inherit_loop_ranges (tactics/ir/extract.py) adds low <= it <= high for every counted loop around the kernel whose iterator the kernel receives, to the extracted nest and to the ExternalCall's standalone SDFG; DaCe then emits ipow.

Tests. Two tagged tests in tests/test_loop_iterator_symbols.py, failing without the fix and passing with it; no other test changes outcome. The full write-up (the replay that found the elements, the counts of pow removed, what was not checked): comment on a98fa29.

4. A NumPy reference keeps the defaults of parameters the data does not hold

Symptom. qe_cegterg was never graded where the bench's numba and C references cannot run (the Linux container on a Mac: SealError). The fallback to the kernel's NumPy function failed too: ReferenceUnavailable: NumPy function of qe_cegterg: KeyError: 'gamma_only', so the outputs went unchecked.

Cause. numpy_outputs (tactics/server.py) passed every parameter of the NumPy function from the bench data. cegterg_numpy also takes its configuration flags as keywords with defaults (gamma_only=False, noncolin=False, lspinorb=False, ...), and the bench data does not hold them.

Fix. reference_parameters passes the parameters the data holds and every parameter without a default. A missing required input still fails, by name, and a defaulted one keeps its default. This is the same rule the bench uses for its own numba call (hpcagent_bench.harness.grading.numba_call_order).

Tests.

  • New tagged reproducer: tests/test_bench_data.py::test_a_numpy_reference_keeps_the_defaults_of_parameters_the_data_does_not_hold, on qe_cegterg's S data. The code of 7a40c72 raises the KeyError on the same data.
  • New: ::test_a_required_parameter_the_data_lacks_still_fails_by_name.
  • tests/test_bench_data.py (9 passed), mypy and mypy tests, ruff and the header check pass, in a Linux arm64 container.
  • qe_cegterg, CPU target, preset S, on this branch with [extended] Fixes from Tactics' default pipeline on HPCAgent-Bench (weekend of 2026-11-28) dace#2811 774047f913 (which fixes the heap overrun that aborted its program run): every stage runs and the whole program is correct against its NumPy function. The GPU target and the bench's C reference were not checked yet.

🤖 Generated with Claude Code

nicolasribeiro2028 and others added 3 commits November 27, 2026 21:31
The judge route and the tactics_bench tuner columns hand Setup the judge's
resolved preset. resolve_preset turns every '<rung>+fuzz' token into the bare
'fuzzed' and moves the rung into the fuzz.anchor override, so size_rung saw
'fuzzed' and started every session at XL: on an L+fuzz judge the session built
XL inputs while the judge graded around L (OOM on a 16 GB machine, every
kernel). The spawned session process cannot read the judge's override, so
session_preset gives 'fuzzed' its anchor back in the caller's process, as the
bench reads the rung of a fuzzed run (service.profile_size).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scratch a ScatterConflictCheck writes is never read before it is written
and may carry stale values (DaCe's contract), so no oracle can predict it. The
kernel check compared it with the oracle's zeros and judged the kernel wrong
while the whole program was correct: ilu0, lulesh, qe_vexx_k and
sparse_cholesky on the CPU target (T48-42).

checked_probe now leaves out the outputs the kernel does not define
(unspecified_outputs), resolved through nested SDFGs to the boundary's names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A kernel left inside a sequential loop takes the loop's iterator as a plain
argument. Cut from the loop, DaCe can no longer prove an exponent such as
K - _loop_it_0 - 1 nonnegative, so RelaxIntegerPowers keeps R**e as a libm
pow, and every index and loop bound truncates it to an integer. When the
device's pow(2, 11) rounds down, that drops elements: stockham_fft on the GPU
left Tmp4[2048] and Tmp4[4095] unwritten at K = 12, and the whole program was
wrong from K = 12 on (T48-49, Daint jobs 5480009 and 5484421).

inherit_loop_ranges adds low <= it and it <= high for every counted loop around
the kernel whose iterator it receives under its own name, to the extracted nest
and to the ExternalCall's standalone SDFG, beside inherit_symbol_predicates.
DaCe then emits ipow: stockham's doall27 and lib_linalg0 render with no pow in
any index or bound.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicolasribeiro2028

Copy link
Copy Markdown
Collaborator Author

a98fa29: a kernel cut from a loop keeps the range of the loop's iterator

Symptom. npbench stockham_fft on the GPU target: every kernel passes its own check, but the whole program's y is wrong on every element from K = 12 on (exact up to K = 11). The CPU target is right at every K.

Cause. A kernel left inside a sequential loop takes the loop's iterator (_loop_it_0) as a plain argument. Once the kernel is cut from the loop, DaCe's RelaxIntegerPowers can no longer prove an exponent such as K - _loop_it_0 - 1 nonnegative, so R**e stays a libm pow (a double) and every index and loop bound truncates it to int64_t. On the device pow(2, 11) rounds just below 2048, so doall27 leaves Tmp4[2048] and Tmp4[4095] unwritten and lib_linalg0 misplaces one element of tmp_perm; the FFT stages spread them to every output. A Python replay of the stage loop, kernel by kernel against each kernel's NumPy oracle with NaN-filled outputs, found exactly those elements, and compute-sanitizer --tool initcheck flagged the same two indices. The per-kernel checks missed it because they run at stage 7 of K = 15, which never needs pow(2, 11).

Fix. inherit_loop_ranges (tactics/ir/extract.py) adds low <= it and it <= high (SDFG.add_symbol_relation) for every counted loop around the kernel whose iterator the kernel receives under its own name. It is applied to the extracted nest and to the ExternalCall's standalone SDFG (stages/scopes.py), next to inherit_symbol_predicates. DaCe then emits ipow: stockham's doall27 and lib_linalg0 render with no pow in any index or bound (9 to 1 and 6 to 0 std::pow calls; the two left are a tasklet's py_floor that is 0 either way and doall16's floating twiddle divisor).

Tests. Two tagged tests in tests/test_loop_iterator_symbols.py: the kernel carries the iterator's range, and a power of the iterator renders as ipow with no std::pow. Both fail without the fix (the loop bound renders as int64_t(std::pow(R, K - _loop_it_0 - 1))) and pass with it. Nine related test files, with and without the commit: no test fails only with it (the 9 common failures need a GPU). ruff, format, headers, mypy and mypy tests clean.

Not checked here. A GPU run of stockham_fft with the fix; other bench kernels that index with a power of a loop iterator get the same fix but were not run.

@nicolasribeiro2028 nicolasribeiro2028 changed the title A session of a fuzzed judge runs at the fuzz anchor, not always XL Working PR from 2026-11-28: fixes from the default pipeline and agent runs (base for the next experiments) Nov 29, 2026
nicolasribeiro2028 and others added 2 commits November 29, 2026 17:47
dace-extended 1.0.6 shifts range(1, K) to start at 0, so the iterator's range
is 0 <= it <= K - 2 there and 1 <= it <= K - 1 on 1.0.5. The test now compares
the kernel's assumed relations with the enclosing loop's own bounds, so it holds
on both. The pow-to-ipow test is unchanged and still fails without the fix on
both versions (1.0.6 renders int64_t(std::pow(R, K - _loop_it_0 - 2))).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
dace-extended 1.0.6 (released 2026-11-29) shifts a loop such as range(1, T) to
start at 0. With it, 7 unit tests and 1 integration test fail on this branch's
parent 8d5a24e as well (split_doall, tree_view, comm_subsets, durbin costing,
the middle loop value, quickstart's jacobi loops), and all of them pass on
1.0.5. There is no lock file, so CI took 1.0.6. The pin keeps this PR on the
version its runs use (1.0.5 with spcl/dace#2811 applied) until Tactics is
adapted to 1.0.6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicolasribeiro2028 and others added 2 commits November 30, 2026 13:20
…hold

numpy_outputs passed every parameter of the bench's NumPy function from the
data. cegterg_numpy takes its configuration flags as keywords with defaults
(gamma_only=False, noncolin=False, ...), which the bench data does not hold,
so the call raised KeyError: 'gamma_only' and qe_cegterg went ungraded
wherever the bench's numba and C references cannot run.

reference_parameters passes what the data holds and every parameter without
a default, so a missing required input still fails by name; a defaulted one
keeps its default, as the bench's own numba_call_order does.

Tests: tests/test_bench_data.py gains a tagged reproducer on qe_cegterg's
S data (ReferenceUnavailable: KeyError 'gamma_only' before) and a unit test
of the required/defaulted rule. qe_cegterg (CPU, S) is now correct against
its NumPy function.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stage 5 built a session's kernels one after another: render the CPF unit, run
the compiler, link. A program with many kernels (qe_cegterg: 29, about 420 s of
builds on the GPU target at S on Daint) spent most of a checking unit waiting on
one compiler at a time.

Session.default_builds renders the kernels and looks them up in first_builds one
after another (Python), runs the compilers of the kernels not built before in a
thread pool of build_workers() (the compiler runs outside the interpreter, as in
a sweep), then links each in the given order and keeps it as a first build. The
result is the serial one's: the same units, variants and archives, bound in the
same order; a failed build raises once the kernels before it are linked; a stop
cancels the compilers not started. Only codegen "first" without a pass pipeline
takes this path; other codegens build one after another as before.
kernel_evidence (so performance) and finalize use it.

first_build's key and keep step become first_build_key and
remember_first_build, shared by both paths.

Tests: tests/test_parallel_builds.py (same units and variants as the serial
builds, the compilers overlap, a failed build in the middle, a second pass
reuses what the serial pass reuses). qe_cegterg CPU at S in a Linux container
with 8 cores: stage 5 21.6 s serial, 13.9 s parallel; the units match except a
dependence comment whose solver example differs between two serial builds too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicolasribeiro2028

Copy link
Copy Markdown
Collaborator Author

e303f87: stage 5 builds a session's kernels at once (Session.default_builds)

Why

Stage 5 built a program's kernels one after another: render the kernel's CPF unit, run the compiler on it, link the library into the kernel's ExternalCall, then the next kernel. A program that splits into many kernels waited on one compiler at a time while the rest of the node sat idle. qe_cegterg has 29 kernels; on the GPU target at preset S on Daint its builds took 476.6 s, one nvcc after another.

What changed (tactics/session.py)

default_builds(names) builds every kernel in names that has no build yet, in three phases:

  1. One after another (Python): look the kernel up in first_builds, the cache of earlier first builds. On a miss, render its unit (default_kernel) and pick its first variant (first_variant). Rendering writes the session's state (self.sources), so it stays in one thread.
  2. At once: compile every kernel that missed the cache with build_kernel_library, the function the serial path calls, on a ThreadPoolExecutor of build_workers() threads (the cores the process may use, as the sweep does). The compiler is a subprocess, so the threads wait on it without holding the interpreter. Each kernel builds in its own folder (work_dir/<kernel>/library, as before).
  3. One after another, in the order of names: link each fresh library (bind), keep a copy in the cache (remember_first_build), link the kept copy. This is what optimize_kernel followed by first_build did.

compile_at_once holds the pool inside one stopper.armed() section. A stop cancels the compiles not yet started and lets the running ones finish in the background, the same pattern as select_variant.

Same result as the serial loop:

  • Each kernel gets the same unit, variant and archive path, and the links happen in the same order.
  • A compile error is raised in phase 3 when that kernel's turn comes. The kernels before it are linked and the ones after it are not, which is the state the old loop left.
  • Only codegen="first" without a pass pipeline takes this path. Under codegen="sweep" (the server's default for agent sessions) or with a pass pipeline, default_builds calls default_build per kernel as before. A sweep already compiles each kernel's variants in parallel and must time them alone.

Callers: kernel_evidence (so performance()) and finalize now call default_builds once for the missing kernels, instead of default_build inside their per-kernel loops.

Refactor, no behaviour change: first_build's key and keep steps became first_build_key and remember_first_build, so both paths share one definition of the cache.

Tests

  • New tests/test_parallel_builds.py, on a 3-kernel program:
    • each kernel's unit and variant equal the serial builds', and the program computes;
    • the compilers overlap (all 3 at once);
    • a failed compile of the 2nd kernel raises with the 1st linked and the 2nd and 3rd not;
    • a second pass reuses as many cached builds as the serial path does.
  • Related files, on f5da9d5 and on this commit, in a Linux arm64 container: test_feedback, test_finalize_keeps_session, test_gpu_finalize_link, test_journal_replay, test_judge_stall, test_replay, test_session_kernels, test_cloudsc_phases, test_bench_data. 4 failed / 112 passed on the base, 3 failed / 113 passed with the commit. No test fails only with the commit. test_replay[fuse_stencil_through_transient] failed on the base and passed here, which looks flaky and is not credited to this change.
  • mypy, mypy tests, ruff and the header check pass.

Measured

Serial Parallel
qe_cegterg, CPU, S, Mac container (8 cores) 21.6 s 13.9 s
qe_cegterg, GPU, S, CSCS Daint GH200, same job (5496776) 476.6 s 113.3 s

On the CPU target most of what remains is rendering (12.4 s of the 21.6 s), which stays serial. On the GPU target the compilers dominated, hence the 4.2x. GPU L and XL built in 113.0 s and 107.3 s. In that job every unit was correct against the bench's reference or its NumPy function, with the same 26 of 29 kernels on the GPU as the serial build. These are stage times from a checking job with 8 units on the node, not a benchmark.

The generated units match the serial build's except one comment in extcall_for0: a dependence solver's example values, which also differ between two serial builds.

Not in this commit

  • The sweep path (codegen="sweep") is unchanged. It already compiles each kernel's variants in parallel, then times them one at a time, kernel after kernel. Overlapping all kernels' compiles there is possible but a larger change, and only worth it if compiling, not timing, dominates a sweep. Not measured.
  • Stage 7's per-kernel checks still run one after another. On the GPU target each check runs in a fresh process; that is about 450 s of a qe_cegterg GPU unit and now its largest part.
  • The first-build key includes abi_order, which linking rewrites. One kernel of qe_cegterg therefore recompiles on a second pass. This happens on the serial path too and is not changed here.
  • Peak memory of many nvcc at once was not measured beyond that job (at most 4.4 GB per unit).

Task T49-06.

🤖 Generated with Claude Code

Tactics checked the whole program with a plain per-element allclose(rtol, atol),
while HPCAgent-Bench's judge (grade_outputs) also raises atol to the accumulation
floor eps_acc * sqrt(l) * ||expected||_inf and applies its strict-small checks,
graded extent and mismatch fraction. lulesh's default was graded WRONG by Tactics
and right by the bench: dxx/dyy/dzz failed allclose on 3-4 of 10^6 cancelled
elements, error <= 5.2e-10 on values up to 1.3e5 (L and XL, with one thread and
without FMA alike).

Reference gains an optional ProgramRule (spec, accumulation lengths, eps_acc,
bench names), built in bench_data from the bench's contracted_extents and
grade_eps. With it, grade_program calls the bench's grade_outputs once per output
on the spec restricted to that output, so every failing output is named, and
ProgramReport.mismatch_detail carries the bench's error. A Reference without a
rule keeps allclose. The move check at the check rung uses the same reference.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nicolasribeiro2028

Copy link
Copy Markdown
Collaborator Author

a11f496 Grade the whole program by the bench's own rule

Problem. Tactics checked the whole program with Reference.mismatched, a plain per-element np.allclose(rtol, atol). HPCAgent-Bench's judge (grade_outputs) starts from the same rtol/atol, but it also:

  • raises atol to eps_acc * sqrt(l) * ||expected||_inf, the accumulation floor;
  • applies its strict-small checks, the graded extent and the mismatch fraction.

So Tactics could call a program wrong that the judge passes. Found on lulesh's default: dxx/dyy/dzz failed allclose on 3-4 of 10^6 elements, where d - vdov/3 cancels. The largest error was 5.2e-10 on values up to 1.3e5. Meanwhile grade_outputs passed all 31 outputs: at L and XL, with one OpenMP thread, and with -ffp-contract=off, against the bench's numba reference.

Change.

  • tactics/build/grading.py: ProgramRule (spec, accumulation lengths, eps_acc, bench names of renamed outputs) and grade_program. It calls the bench's own grade_outputs once per output, on the spec restricted to that output, because the bench reports only its first failure and Tactics needs every name.
  • tactics/stages/performance.py:
    • Reference.rule is optional. Without it the old exact-or-allclose check stays, for test references with rtol 0.
    • mismatch_detail on ProgramTime/ProgramReport carries the bench's error for each failing output.
  • tactics/server.py:
    • bench_data builds the rule from contracted_extents and grade_eps, for the bench and the NumPy reference alike.
    • The move check at the check rung uses the same reference, so moves are judged by the same rule.
    • One known difference from the judge: there is no write probe for l, so Tactics uses the declared or contracted extent. A comment at the call says so.

Tests.

  • New tests/test_program_grade.py:
    • a tagged reproducer for the lulesh case;
    • a wrong output still fails, with its detail;
    • renamed outputs;
    • integers compare exactly;
    • a reference with a rule pickles, for the spawned GPU child;
    • parity with one grade_outputs call on jacobi_2d.
  • One added test in tests/test_bench_data.py.

Checked (CPU container, dace-extended 1.0.5 + spcl/dace#2811, hpcagent-bench 1.0.5):

  • the new and directly affected tests: 30 passed;
  • 14 files that build a Reference or run the program check: 10 failed / 153 passed here, against 11 / 152 on e303f87. The failures here are a subset of the base's; all need Polygeist/MLIR tools or a GPU;
  • mypy, mypy tests, ruff 0.17.6 and the header check: clean;
  • lulesh at L through session.performance: correct: true.

Not checked. A GPU run, and a run graded against the bench's sealed C/numba reference: the container can't run them, so the end-to-end check used lulesh's NumPy function.

🤖 Generated with Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant