[GH-ISSUE #3217] [Engine] Current GGML override omits precision arguments in the trellis MMQ overlay #1308

Closed
opened 2026-11-04 01:50:13 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @Tsury on GitHub (Oct 19, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3217

Using a current upstream GGML through STRATA_GGML_DIR, the new trellis MMQ overlay still emits calls from the older precision API. The CUDA build fails before any model starts.

Environment: Strata e88ee39d1d6be6e3364183af3b39b62a7ed6f211 (engine 0.1.45.3), upstream llama.cpp 0ce8cd11416c8840498e6701bcbe39ad4b858c2b (b11739), Linux, CUDA 13.3, SM120.

This was reproduced in a maintained build with existing adapters for the other current-GGML MMQ callers. It is an override-compatibility report, not a claim that Strata's pinned 3cf03257 default is broken. No weights are required to reach the compile error.

The remaining callers are in cmake/strata_ggml_tq_overlay.cmake and third_party/ggml-tq/tq-mmq-tiles.cuh:

  • Generated DP4A and MMA write-back callbacks omit prec_src1.
  • The generated ggml_cuda_mmq_vec_dot_q8_0_16_q8_1_mma callback omits prec_src1.
  • The trellis loader calls ggml_cuda_mmq_get_nthreads, ggml_cuda_mmq_get_I, and ggml_cuda_mmq_get_sram_stride without the new precision argument. The current upstream IQ2_XS loader uses GGML_PREC_Q8 for these three calls.

Representative errors:

mmq.cuh: error: no instance of constructor ggml_cuda_mmq_util_funcs matches the argument list
  argument types are: (int, <unknown-type>, <unknown-type>, <unknown-type>)
tq-mmq-tiles.cuh: error: too few arguments in function call
  ggml_cuda_mmq_get_nthreads(type, J, fallback)

Locally, passing prec_src1 to the three generated callbacks and GGML_PREC_Q8 to the three loader helpers, alongside the existing adapters, lets the current-GGML text-engine target build. All failed attempts were retained. Both text and vision builds now complete. Selected native text, image-history recovery, Pi/Hermes image/tool writes, all eight tool-sanity cases, and 122K-input dispersed retrieval pass on this maintained SM120 build. These are brief checks; the selected model does not use trellis weights. HIP/SYCL builds, trellis inference, and compatibility with the pinned GGML remain untested. No performance claim follows.

A useful upstream fix could adapt the overlay to the actual GGML signature, or reject an incompatible override clearly during configuration. The current text anchors accept this source but do not catch the later signature mismatch.

Originally created by @Tsury on GitHub (Oct 19, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3217 Using a current upstream GGML through `STRATA_GGML_DIR`, the new trellis MMQ overlay still emits calls from the older precision API. The CUDA build fails before any model starts. Environment: Strata `e88ee39d1d6be6e3364183af3b39b62a7ed6f211` (engine 0.1.45.3), upstream llama.cpp `0ce8cd11416c8840498e6701bcbe39ad4b858c2b` (b11739), Linux, CUDA 13.3, SM120. This was reproduced in a maintained build with existing adapters for the other current-GGML MMQ callers. It is an override-compatibility report, not a claim that Strata's pinned `3cf03257` default is broken. No weights are required to reach the compile error. The remaining callers are in `cmake/strata_ggml_tq_overlay.cmake` and `third_party/ggml-tq/tq-mmq-tiles.cuh`: - Generated DP4A and MMA write-back callbacks omit `prec_src1`. - The generated `ggml_cuda_mmq_vec_dot_q8_0_16_q8_1_mma` callback omits `prec_src1`. - The trellis loader calls `ggml_cuda_mmq_get_nthreads`, `ggml_cuda_mmq_get_I`, and `ggml_cuda_mmq_get_sram_stride` without the new precision argument. The current upstream IQ2_XS loader uses `GGML_PREC_Q8` for these three calls. Representative errors: ```text mmq.cuh: error: no instance of constructor ggml_cuda_mmq_util_funcs matches the argument list argument types are: (int, <unknown-type>, <unknown-type>, <unknown-type>) tq-mmq-tiles.cuh: error: too few arguments in function call ggml_cuda_mmq_get_nthreads(type, J, fallback) ``` Locally, passing `prec_src1` to the three generated callbacks and `GGML_PREC_Q8` to the three loader helpers, alongside the existing adapters, lets the current-GGML text-engine target build. All failed attempts were retained. Both text and vision builds now complete. Selected native text, image-history recovery, Pi/Hermes image/tool writes, all eight tool-sanity cases, and 122K-input dispersed retrieval pass on this maintained SM120 build. These are brief checks; the selected model does not use trellis weights. HIP/SYCL builds, trellis inference, and compatibility with the pinned GGML remain untested. No performance claim follows. A useful upstream fix could adapt the overlay to the actual GGML signature, or reject an incompatible override clearly during configuration. The current text anchors accept this source but do not catch the later signature mismatch.
Author
Owner

@Niko1221 commented on GitHub (Oct 20, 2026):

Thanks, reproduced and fixed in 0.2.1. The overlay now reads the signatures of the ggml-cuda it patches: where mmq.cuh has the ggml_prec argument (your b11739) the generated write-back and MMA callbacks carry prec_src1 and the loader's three helper calls get GGML_PREC_Q8, as in upstream's IQ2_XS loader; on the pinned 3cf03257 the generated files are byte-identical to before. A ggml-cuda with neither signature turns the overlay off at configure time with a message (trellis prompts then take the FP16 path) instead of failing inside nvcc. I compiled the three trellis instances against upstream 0ce8cd11 (CUDA 12.6): the old overlay fails with "too few arguments", the new one compiles. This covers the overlay's own callers only; the other places where Strata calls the current MMQ API (your adapters) are not in this change.

This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1

<!-- gh-comment-id:6286736942 --> @Niko1221 commented on GitHub (Oct 20, 2026): Thanks, reproduced and fixed in 0.2.1. The overlay now reads the signatures of the ggml-cuda it patches: where mmq.cuh has the ggml_prec argument (your b11739) the generated write-back and MMA callbacks carry prec_src1 and the loader's three helper calls get GGML_PREC_Q8, as in upstream's IQ2_XS loader; on the pinned 3cf03257 the generated files are byte-identical to before. A ggml-cuda with neither signature turns the overlay off at configure time with a message (trellis prompts then take the FP16 path) instead of failing inside nvcc. I compiled the three trellis instances against upstream 0ce8cd11 (CUDA 12.6): the old overlay fails with "too few arguments", the new one compiles. This covers the overlay's own callers only; the other places where Strata calls the current MMQ API (your adapters) are not in this change. This is in Strata 0.2.1: https://github.com/Niko1221/Strata/releases/tag/v0.2.1
Author
Owner

@Tsury commented on GitHub (Oct 21, 2026):

Thanks Niko!

<!-- gh-comment-id:6309839748 --> @Tsury commented on GitHub (Oct 21, 2026): Thanks Niko!
Author
Owner

@Tsury commented on GitHub (Oct 21, 2026):

Latest-override maintenance follow-up, with a successful local build and native checks.

On Strata main 9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4 (source engine version 0.1.46.3), I rebased the maintained current-GGML build onto llama.cpp b11785 / 8baabd53b77d1c48c6ef8d3b620436292f3f6231.

The cbc0e329 replacement works for the overlay's generated callbacks and loader. I removed those local portions. The remaining MMQ precision/template/J_best caller adapters are still needed; this does not claim that the stock pinned GGML is broken.

The newer GGML also changed the pool factory declaration to:

static std::unique_ptr<ggml_cuda_pool> new_pool_for_device(
    ggml_backend_cuda_context & ctx, int device, int stream_no);

The old two-argument definition in src/prefill/ggml_cuda_host.cu:143 fails compilation against that header. Matching the current signature repairs this override build. Strata's existing caching-pool allocation/reuse behavior is unchanged; this update does not replace upstream GGML's graph-eviction fix.

Validation: CUDA 13.4.92, CMake 4.4.4, native SM120 build succeeds. The selected INT8/FP16-overlay, Q8/stream/snapshot and CPU/GPU expert parity checks all pass. All eight retained tool-sanity cases, code/image checks and affected native Pi/Hermes image/tool checks pass. These are focused setup observations, not broad reliability or speed claims. No HIP/SYCL build is claimed.

The Qwen-VL resize repair #30736 is now native in this GGML revision, so its local vision patch also retired. I kept the remaining current-GGML adapters separate from the upstream trellis replacement.

<!-- gh-comment-id:6310757520 --> @Tsury commented on GitHub (Oct 21, 2026): Latest-override maintenance follow-up, with a successful local build and native checks. On Strata main `9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4` (source engine version `0.1.46.3`), I rebased the maintained current-GGML build onto llama.cpp `b11785` / `8baabd53b77d1c48c6ef8d3b620436292f3f6231`. The `cbc0e329` replacement works for the overlay's generated callbacks and loader. I removed those local portions. The remaining MMQ precision/template/J_best caller adapters are still needed; this does not claim that the stock pinned GGML is broken. The newer GGML also changed the pool factory declaration to: ```cpp static std::unique_ptr<ggml_cuda_pool> new_pool_for_device( ggml_backend_cuda_context & ctx, int device, int stream_no); ``` The old two-argument definition in `src/prefill/ggml_cuda_host.cu:143` fails compilation against that header. Matching the current signature repairs this override build. Strata's existing caching-pool allocation/reuse behavior is unchanged; this update does not replace upstream GGML's graph-eviction fix. Validation: CUDA `13.4.92`, CMake `4.4.4`, native `SM120` build succeeds. The selected INT8/FP16-overlay, Q8/stream/snapshot and CPU/GPU expert parity checks all pass. All eight retained tool-sanity cases, code/image checks and affected native Pi/Hermes image/tool checks pass. These are focused setup observations, not broad reliability or speed claims. No HIP/SYCL build is claimed. The Qwen-VL resize repair #30736 is now native in this GGML revision, so its local vision patch also retired. I kept the remaining current-GGML adapters separate from the upstream trellis replacement.
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#1308
No description provided.