Repository navigation
hrx-backend-test: drop the use of the deleted dispatch-symmetric-i4.h (#422) - #103
Closed
bong-water-water-bong wants to merge 3 commits into
Closed
bong-water-water-bong wants to merge 3 commits into
bong-water-water-bong wants to merge 3 commits into
Conversation
…#422) f2099e9 deleted ggml/src/ggml-hrx/dispatch_registration/common/dispatch-symmetric-i4.h (its route was already disabled), but tests/hrx-backend-test.cpp kept the include and kept calling common_symmetric_i4_lowrow_mul_mat_eligible(), so the test target cannot compile at the tip: "'dispatch_registration/common/dispatch-symmetric-i4.h' file not found". The header held only that predicate and a route switch that returned false, and the test used the predicate to restate that a disabled route is never eligible. Drop the include, the loop over the qualified input's consumers and the two values that existed only for it. The case keeps what still means something: the scheduler must not emit loom_libs:ggml_rmsnorm_binary_symmetric_i4_k32 for these consumer shapes, and the q8_publication expectations are untouched. Checked on CPU against the target's own include paths (clang++ -fsyntax-only with -Iggml/include -Iggml/src -Iggml/src/ggml-hrx -Iggml/src/ggml-hrx/kernel-corpus): the fatal error is gone. The same unit then hits unrelated API drift from the AMD-core re-head, listed in the PR. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oduced (#422) With the deleted header gone, the same translation unit reached 20 more errors from f2099e9 / 53d443c, which re-headed ggml-hrx onto AMD's core. Three removals to follow: - KernelSpecialization lost workload_specialization (4 sites: 3298, 5191, 7352, 7547). Drop the marker assertion; each case keeps the property it was checking - an aligned dynamic kernel still pins no fixed ggml.workload.token_capacity (3298 keeps that line), and the copy/conv/epilogue cases keep their kernel identity and integer parameters. - CommandPlanMetadata lost activation_publication_diagnostics(). The published alternate value is still in alternate_values(), so the two cases assert graph_value, alternate_value and type == GGML_TYPE_Q8_1 instead of the removed diagnostic's source_value / alternate_value / publication_stage / requested_format (6328, 10894). - DispatchMatchContext no longer has the registry as its last member (9564): drop that initializer element; match() is still called on the registry. Checked with the target's own include paths (clang++ -fsyntax-only, the ggml-hrx and kernel-corpus include dirs plus the pinned hrx-system headers): 0 errors, no new warnings. Not in this commit: tests/test-hrx-ops.cpp (9 sites) and tests/test-hrx-loom-jit.cpp (4 sites) use the same removed members. In loom-jit the assignments exist to make two specializations distinct for the JIT disk cache, so they need a different discriminator rather than deletion; that is a separate change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Engine #445's ruling (table accepted as posted) says these plan changes are equivalent or better, so their expectations follow. Each change cites its #445 row. Deliberately still red: the 9 REGRESSION rows (publication dropped whole in f2099e9, the symmetric-i4 route re-enabled in aadd602) and the NEEDS-DEVICE row (qwen_router_top8_dispatch). - gdn_native_projection_pair_dispatch: the epilogue element count is the compile parameter llm.gated_delta_net.epilogue_element_count (dispatch-gated-delta-net.cpp:794), not an integer parameter. - iq2_codebook_resource_reuse: the IQ2 codebook path is AMD's generic loom_libs:ggml_kquant_mul_mat_decode_f32 now, which carries no codebook tables, so there is no constant initialization and no transient grid to reuse. - qwen_token_embedding_dispatch: IQ3_S and IQ4_NL manual token-embedding graphs are claimed now, running as the get_rows + matmul the supported types already used. - swiglu_q8_output: the q8-output publish kernel is gone; the shape is the kquant swiglu decode feeding the kquant matmul decode, which reads f32, so no alternate exists. - rmsnorm_gate_q8_output: publication still happens, through ggml_rmsnorm_gate_f32_q8_1_x4. Not updated yet (each has further variants whose current plan needs checking first): gather_add_dispatch, generic_swiglu_k16_publication_edges, rmsnorm_gate_packed_output, qwen_flash_attention_dispatch. Suite here: 41 pass / 44 fail (was 36 / 49); the 10 REGRESSION and NEEDS-DEVICE cases are untouched and still red. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#422:
tests/hrx-backend-test.cppstill includesdispatch_registration/common/dispatch-symmetric-i4.h, which f2099e9 deleted, so the test target cannot compile at the branch tip:The header held only
common_symmetric_i4_lowrow_route_enabled()(which returned false) andcommon_symmetric_i4_lowrow_mul_mat_eligible().run_symmetric_i4_consumer_qualification_checks()called the predicate on every consumer of the qualified input, which only restated that a disabled route is never eligible - the "same treatment" the header got.This drops the include, the call and the two values that existed only for it. The rest of the case stays: the scheduler must still not emit
loom_libs:ggml_rmsnorm_binary_symmetric_i4_k32for these consumer shapes, and theq8_publicationexpectations are untouched.Reproduced and checked on CPU, no GPU, with the target's own include paths (
clang++ -std=c++17 -fsyntax-only -Iggml/include -Iggml/src -Iggml/src/ggml-hrx -Iggml/src/ggml-hrx/kernel-corpus ..., plus the HRX headers):error: 'dispatch_registration/common/dispatch-symmetric-i4.h' file not foundA second commit ports the three removals the re-head left behind in this file (
KernelSpecialization.workload_specializationx4,CommandPlanMetadata.activation_publication_diagnosticsx2 blocks, the staleDispatchMatchContextinitializer), keeping the observable property each case still has. With that, the target builds:cmake --build ... --target hrx-backend-testlinks, and the binary runs.The suite is not green, and this PR does not claim it is. Now with the per-case classification: engine issue 1bit-MONSTER/engine#445.
On CPU here (85 host cases, 14 device cases skipped without an HRX device): 36 PASS, 49 FAIL. Evidence for each failure is the plan the case actually produced (temporary dump of
plan.dispatcheswith kernel names) plus whether the kernel a case expects still exists in the corpus and indispatch_registration/. Grouped:scale_add_f32_dispatch: 1 expected, 2 actualggml_scale_f32+ggml_binary_f32; same forrmsnorm_two_binary,get_rows_*,rope_set_rows,generic_ssm_conv_binary, ...).common.mul_mat_swiglu.tiled_pair_f32_f32;llm_attention_v_matmul_set_rows_vector_f32_f32->..._decode_f32_f32;ggml_mul_mat_vector_q6_f32_f32->ggml_mul_mat_q6_k_packed_token1_f16_wmma; the iq/iq3_xxs codebook kernels ->ggml_kquant_mul_mat_decode_f32).append_alternate_valuesites), but these shapes get a different producer kernel or no alternate.symmetric_i4_consumer_qualificationnow dispatchesloom_libs:ggml_rmsnorm_binary_symmetric_i4_k32, the route f2099e9 deleted as a numerical/perf regression, and the case exists to assert it is never selected;gdn_rmsnorm_gate_dispatchexpectsggml_rmsnorm_gate_f32_publish(in the corpus, not registered);iq2_codebook_resource_reusesees no constant initializations;qwen_router_top8_dispatchbinding length changed;qwen_token_embedding_dispatchasserts a graph is unsupported and it now is supported;gather_add_dispatchis missing a compile parameter;qwen_flash_attention_dispatchandgdn_native_projection_pair_dispatchabort withstd::out_of_range: map::at.Deliberately not done here: writing the current plan back into the expectations. For class 1-3 that would bless a plan that may be worse than the one the test was written to protect, without anyone deciding it is fine; for class 4 it would erase the finding. The build is what this PR restores, and #445 says exactly what is still red and why.
Ruling applied (engine #445, "table accepted as posted")
ebeb0e0e, each change citing its hrx: the fused F16 routed-FFN decodes the table with the layout it was written with (engine#2861) #445 row -gdn_native_projection_pair_dispatch,iq2_codebook_resource_reuse,qwen_token_embedding_dispatch,swiglu_q8_output,rmsnorm_gate_q8_output. Suite: 41 pass / 44 fail (was 36 / 49).finding, not a stale expectation. Filed as engine hrx: the add-on identity covers every file the add-on builds from, and is checked by every build (engine#2935) #449 (consumer-driven activation publication dropped
whole in f2099e9: 7 class C rows plus
gdn_rmsnorm_gate_dispatch) and engine hrx: flash attention over several KV streams runs on HRX (engine#2918) #450 (symmetric-i4consumer route re-enabled by AMD's aadd602 after our f2099e9 removed it, with the deferred on/off device
measurement).
gather_add_dispatch,generic_swiglu_k16_publication_edges,rmsnorm_gate_packed_output,qwen_flash_attention_dispatch. Each has further variants beyond the onethat failed first, and each needs its own plan dump before an expectation is written; see the hrx: the fused F16 routed-FFN decodes the table with the layout it was written with (engine#2861) #445
follow-up comment for exactly what is outstanding on each. Guessing them would encode whatever the backend
happens to do, which is what the ruling was for.