[PR #3920] [CLOSED] [Engine] hip: skip the APR trellis synthetics when this ggml has no host quantizer for them #4834

Closed
opened 2026-11-07 15:39:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3920
Author: @xyzzing
Created: 10/24/2026
Status: ❌ Closed

Base: main ← Head: pr/mmq-trellis-guard


📝 Commits (1)

  • 3248142 tests: skip the APR trellis synthetics when this ggml has no host quantizer for them

📊 Changes

1 file changed (+8 additions, -0 deletions)

View changed files

📝 tests/hip/prefill_mmq_parity.cpp (+8 -0)

📄 Description

The title must start with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], for example "[Engine] fix decode stop on long prompts" or "[GUI] keep the model list after a tab switch".

Problem and result

With the default STRATA_MMQ_TQ_OVERLAY=ON against the pinned llama.cpp, the HIP MMQ parity screen fails after printing clean device results: STRATA_MMQ_TQ_OVERLAY compiles the APR trellis MMQ instances (so supported() is true for types 144-146) but the host quantizer for those ids (ggml_get_type_traits(t)->from_float_ref) exists only in a ggml that has the trellis types - the pinned upstream ggml does not. make_q2_matrix throws and the throw takes the whole screen with it, reporting the passing Q2_0 coverage as a failure:

synthetic-Q2_0-GU-pass0: type=42 rows=7 experts=3 ref_rms=1.98041 rel_l2=0.00106754 ...  (device results, clean)
...
MMQ parity screen failed: host quantizer unavailable

After this change the block is skipped with a named line and the screen passes:

type 145: no host quantizer in this ggml (trellis types are not in it) - skipped
type 146: no host quantizer in this ggml (trellis types are not in it) - skipped
type 144: no host quantizer in this ggml (trellis types are not in it) - skipped
MMQ parity screen passed

This is the same fact #3358 already guards for the type name; the quantizer's absence follows from it, and this covers that consumer.

#3358 (the null-name guard on the same "this ggml has no trellis types" condition).

Approach

Test-only, 8 lines in tests/hip/prefill_mmq_parity.cpp: inside the trellis-synthetic loop, after the existing supported() skip, skip with a printed reason when ggml_get_type_traits(t)->from_float_ref is null. No tolerance is moved, no engine code is touched, and a ggml with the trellis types (STRATA_GGML_DIR = a fork carrying them) still runs the synthetics - the guard only fires when the quantizer is absent. The skipped block covers nothing real on the configuration this was found on (the pack carries gu 18/22/20, down 20/42 - no trellis types).

Validation

Passed:

  • hip_prefill_mmq_parity, gfx1100 (RX 7900 XTX), TheRock 10.2 nightly, default TQ-overlay config: on the unguarded file the screen fails with the throw above after clean Q2_0 device results; with the guard it passes with the three named skip lines (MMQ parity screen passed, ctest Passed). The test file on this branch is byte-identical (sha256 d935c641...) to the one those runs used.
  • This branch (rebased onto current main 870aedd9, engine 0.1.54 — single commit replayed with 0 conflicts, the test file byte-identical per the sha256 above) builds hip_prefill_mmq_parity clean against upstream's own tree with the default overlay (Release, HIP gfx1100, ROCm 10.2 nightly SDK, STRATA_MMQ_TQ_OVERLAY=ON + STRATA_NATIVE_EXPERTS=ON — the same configuration the on-card run above used).

Failed:

  • none observed

Not run:

  • CUDA, SYCL, Metal builds: no hardware/software for them here; the change is in a HIP-only test file.
  • A ggml with the trellis types (STRATA_GGML_DIR agention fork): not installed here; the guard is written to leave that configuration untouched (skip only fires on a null quantizer).

Limits

None known. If a future pinned llama.cpp gains the trellis host quantizers, the guard stops firing on its own.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3920 **Author:** [@xyzzing](https://github.com/xyzzing) **Created:** 10/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/mmq-trellis-guard` --- ### 📝 Commits (1) - [`3248142`](https://github.com/Niko1221/Strata/commit/3248142328c069177df22acac1808d8d3ea8a5ab) tests: skip the APR trellis synthetics when this ggml has no host quantizer for them ### 📊 Changes **1 file changed** (+8 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/hip/prefill_mmq_parity.cpp` (+8 -0) </details> ### 📄 Description **The title must start with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], for example "[Engine] fix decode stop on long prompts" or "[GUI] keep the model list after a tab switch".** ## Problem and result With the default `STRATA_MMQ_TQ_OVERLAY=ON` against the pinned llama.cpp, the HIP MMQ parity screen **fails after printing clean device results**: `STRATA_MMQ_TQ_OVERLAY` compiles the APR trellis MMQ instances (so `supported()` is true for types 144-146) but the host quantizer for those ids (`ggml_get_type_traits(t)->from_float_ref`) exists only in a ggml that has the trellis types - the pinned upstream ggml does not. `make_q2_matrix` throws and the throw takes the whole screen with it, reporting the passing Q2_0 coverage as a failure: ``` synthetic-Q2_0-GU-pass0: type=42 rows=7 experts=3 ref_rms=1.98041 rel_l2=0.00106754 ... (device results, clean) ... MMQ parity screen failed: host quantizer unavailable ``` After this change the block is skipped with a named line and the screen passes: ``` type 145: no host quantizer in this ggml (trellis types are not in it) - skipped type 146: no host quantizer in this ggml (trellis types are not in it) - skipped type 144: no host quantizer in this ggml (trellis types are not in it) - skipped MMQ parity screen passed ``` This is the same fact #3358 already guards for the type *name*; the quantizer's absence follows from it, and this covers that consumer. ## Related discussion #3358 (the null-name guard on the same "this ggml has no trellis types" condition). ## Approach Test-only, 8 lines in `tests/hip/prefill_mmq_parity.cpp`: inside the trellis-synthetic loop, after the existing `supported()` skip, skip with a printed reason when `ggml_get_type_traits(t)->from_float_ref` is null. No tolerance is moved, no engine code is touched, and a ggml **with** the trellis types (`STRATA_GGML_DIR` = a fork carrying them) still runs the synthetics - the guard only fires when the quantizer is absent. The skipped block covers nothing real on the configuration this was found on (the pack carries gu 18/22/20, down 20/42 - no trellis types). ## Validation **Passed:** - `hip_prefill_mmq_parity`, gfx1100 (RX 7900 XTX), TheRock 10.2 nightly, default TQ-overlay config: on the unguarded file the screen fails with the throw above after clean Q2_0 device results; with the guard it passes with the three named skip lines (`MMQ parity screen passed`, ctest Passed). The test file on this branch is byte-identical (sha256 d935c641...) to the one those runs used. - This branch (rebased onto current main `870aedd9`, engine 0.1.54 — single commit replayed with 0 conflicts, the test file byte-identical per the sha256 above) builds `hip_prefill_mmq_parity` clean against upstream's own tree with the default overlay (Release, HIP gfx1100, ROCm 10.2 nightly SDK, `STRATA_MMQ_TQ_OVERLAY=ON` + `STRATA_NATIVE_EXPERTS=ON` — the same configuration the on-card run above used). **Failed:** - none observed **Not run:** - CUDA, SYCL, Metal builds: no hardware/software for them here; the change is in a HIP-only test file. - A ggml with the trellis types (STRATA_GGML_DIR agention fork): not installed here; the guard is written to leave that configuration untouched (skip only fires on a null quantizer). ## Limits None known. If a future pinned llama.cpp gains the trellis host quantizers, the guard stops firing on its own. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:39:21 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4834
No description provided.