Skip to content

tests: hrx-loom-jit-test reads launch geometry from the executable (refs engine#2404) - #368

Merged
bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
cl-npuperf/2404-materialize-launch
Nov 14, 2026
Merged

bong-water-water-bong merged 1 commit into
1bit/hrx-vulkan-patchedfrom
cl-npuperf/2404-materialize-launch

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

Refs 1bit-MONSTER/engine#2404 — the test-drift half of its materialize case. This does not make materialize pass; what remains is a dropped AMD feature, written up on the issue with options for the ggml-org#2138 lead.

Change (test-only, tests/hrx-loom-jit-test.cpp, +8/−14)

AMD's KernelExecutableCache::materialize(context, ref, kernel, constants, launch) returns the launch geometry in an out-parameter. This line's materialize(context, ref, constants) returns it on the executable (KernelExecutable::launch, set at kernel-executable-cache.cpp:171, read by the executor at command-program-executor.cpp:1424). The test was adapted to the shorter call, but four sites kept asserting on local ggml_hrx_loom_jit_launch_config structs that nothing writes:

case was now
cache materialize launch.workgroup_count[0] > 0 executable->launch…
dynamic reuse (binary) first_launch… == 1, second_launch… == 2 first_executable->launch…, second_executable->launch…
dynamic reuse (generic) first_launch… > 0, second_launch… > 0 the same, on the executables
targeted launch.workgroup_count[0] == 151936 executable->launch…

The dead locals (and an unused launch_for_prepare) are removed.

Measured (device, one gpu-hold ticket, e1be68d + this, no amdgpu reset)

hrx-loom-jit-test --hrx-loom-jit-test-case materialize: the first failure moves from :416 launch.workgroup_count[0] > 0 (base) to :454 first_ref.entry == second_ref.entry, so the cache-materialize sub-case now passes on real geometry. :454 fails because this line's cache ignores WorkloadSpecialization::Dynamic, which AMD 9bf5871 keys out (:106-107, specialize_workload at :176). That is a feature port, not a test fix, and is on engine#2404.

🤖 Generated with Claude Code

…here this line's materialize() returns it (engine#2404)

AMD's materialize(context, ref, kernel, constants, launch) fills an out-parameter. This line's materialize(context, ref,
constants) returns the geometry on KernelExecutable::launch. The test was adapted to the shorter call, but four sites kept
asserting on local ggml_hrx_loom_jit_launch_config structs that nothing writes, so `workgroup_count[0] > 0` could not
hold whatever the kernel did. They now read executable->launch, and the dead locals are gone.

On the device, materialize's first sub-case now passes. The case still fails, next at :454: this line's
KernelExecutableCache does not share a Dynamic-workload executable (AMD's does); that is tracked on engine#2404 and is
not a test change.

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

Copy link
Copy Markdown
Author

ready for review at 61c7150

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY -- "this does not make materialize pass" is the scoping a reviewer needs

The first sentence is the review: "the test-drift half of its materialize case. This does not make materialize pass; what remains is a dropped AMD feature, written up on the issue with options for the ggml-org#2138 lead." A PR that says what it does not fix, names what remains and where the decision sits, is one nobody has to reverse-engineer -- and it is the difference between a test-drift cleanup and an implied claim that the case is working.

That distinction matters for the same reason the known-fail on #367 does: after both land, the suite's state should be "these cases assert what this line actually does, and this one feature is missing", not "all green". The +8/-14 shape is exactly right for drift -- more deletion than addition, because the old expectation was AMD's.

One ask: if materialize is left asserting something, make the assertion match what the line does now with the missing feature named in a comment, so the next person reading it learns the feature gap from the test rather than from an issue that will close. Same rule as the label on #367: name the defect, not the ticket.

Nothing else: test-only, and it defers the design decision to the right owner instead of taking it in a test PR.

@bong-water-water-bong

Copy link
Copy Markdown
Author

VERDICT: READY 61c7150

The most trustworthy line in this PR is the one that says what it does not do: "This does not make materialize pass; what remains is a dropped AMD feature, written up on the issue." A test-drift fix that leaves a real failure standing, and says so, is worth more than one that quietly turns the case green by weakening it.

The change is the right half to take: test drift — the expectation tracking an older shape of the API — is separable from a dropped AMD feature, and separating them means the remaining failure has exactly one cause instead of two. +8/-14 reads like the expectation shrinking to the API's actual surface, which is the correct direction for drift: the test should describe what the code does, and disagreement about what it should do belongs on the issue.

One ask, small and this is the second time tonight it has come up: record in the case a comment naming which assertion now stands for the dropped feature — so when the feature lands, the person reading the failure knows whether to re-tighten the expectation or delete it. #368 and #367 touch the same suite; between them the suite's remaining red should be traceable to one labelled reason per case, and a reader should not have to reconstruct that from two PR descriptions.

Nothing else to change: +8/-14 with no assertion deleted outright (the net is 6 lines fewer but the case still checks something) is the shape I would ask for.

@bong-water-water-bong
bong-water-water-bong merged commit 1c436c2 into 1bit/hrx-vulkan-patched Nov 14, 2026
@bong-water-water-bong
bong-water-water-bong deleted the cl-npuperf/2404-materialize-launch branch November 14, 2026 06:13
bong-water-water-bong pushed a commit that referenced this pull request Nov 14, 2026
…ailing on it (engine#2404)

After #365 and #368 the one failure left is materialize's first_ref.entry ==
second_ref.entry: AMD's KernelExecutableCache shares one executable across
sizes for a Dynamic dispatch, ours keys every workload value. The dynamic
sub-cases move to dynamic-materialize, labelled known-fail; materialize keeps
the exact and targeted-export checks. Measured on 11-14: the only Dynamic
dispatch seen (ggml_rope_f32 on LFM2.5-1.2B / Qwen2.5-0.5B) costs ~2.7 ms per
new length, so the path is recorded rather than ported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bong-water-water-bong added a commit that referenced this pull request Nov 14, 2026
…ailing on it (engine#2404) (#367)

After #365 and #368 the one failure left is materialize's first_ref.entry ==
second_ref.entry: AMD's KernelExecutableCache shares one executable across
sizes for a Dynamic dispatch, ours keys every workload value. The dynamic
sub-cases move to dynamic-materialize, labelled known-fail; materialize keeps
the exact and targeted-export checks. Measured on 11-14: the only Dynamic
dispatch seen (ggml_rope_f32 on LFM2.5-1.2B / Qwen2.5-0.5B) costs ~2.7 ms per
new length, so the path is recorded rather than ported.

Co-authored-by: bong-water-water-bong <bong-water-water-bong@1bit.gg>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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