Skip to content

gpu: support ordinary IQ4_XS shared sites - #782

Merged
midagedev merged 18 commits into
midagedev:mainfrom
Burntgogi:contrib/flint-iq4-site-j8zgorsr
Oct 27, 2026
Merged

midagedev merged 18 commits into
midagedev:mainfrom
Burntgogi:contrib/flint-iq4-site-j8zgorsr

Conversation

@Burntgogi

@Burntgogi Burntgogi commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Current head: maintainer review fixes present; new-head disposition required

Current 56b15d0 is maintainer-authored and retains the maintainer's main merge and review corrections. The latest review requested restoration of the dense-family table test and refusal reasons on 1a76bcd4; the maintainer subsequently added 56b15d0d restoring those areas. GitHub's last observed review decision is CHANGES_REQUESTED from the older head; no approval of 56b15d0d is claimed. Please review/disposition the exact current head. The earlier contributor GPU run below is for cd034285, not this later head. The maintainer independently reported real-tier execution in the existing PR comment.

Historical source-scoped evidence through cd03428

Historical cd03428 status at its review

Current component cd03428 is the documentation descendant of 5abe1ae, ordinarily merged with pinned upstream 95a483f. Native formatting/all-target Clippy, model561+5 ignored, placement198 and ownership checks passed on5abe. Actual oxide-linked block metadata consumers passed 5/0/0,34 filtered. These are host cases, not NVIDIA execution.

The typed projected-file consumer at b0fc05e passed 1/0/0,430 filtered. Canonical b0fc05e versus cb8d92e covered4bins/8carriers:1657 identical,0 reordered/different/one-sided, non-JIT rows equal. The separate exact cd03428 versus95a483fc comparison is now complete: 4bins/8carriers,1657 identical,0 reordered/different/one-sided,non-JIT rows equal, base/head528s each. It scanned the named commits, not the dirty working tree; no Driver-JIT columns were compared.

Upstream95a added real split-to-f32-down support. The obsolete split-down negative cases are removed rather than re-pinned; gate/up-form mismatches retain semantic Shape/caller/type refusals. IQ4's q8x128 rule now owns both row dispatch and writes_h, including GLM's real prompt-scratch consumer. No fake f32 row allocation or redundant quantization path is introduced.

Untouched current source cd03428 has now executed on GPU0: DS41 library39 passed,0 failed/ignored/filtered,26.78s; the oxide-linked projected-file metadata case 1 passed,0 failed/ignored,430 filtered. Both original step exits and the terminal are0. Independent full static review of this exact head found no must-fix/warn. The historical5c1 approval remains dismissed, not current GitHub approval; a new bot review of this exact head has now returned APPROVED/CLEAN,must_fix0,warn1; maintainer merge remains.

Scope and compatibility repair

Ordinary IQ4_XS shared sites reuse existing QROWS/layout/dense/site owners, original packed GGUF block words, selected GEMV and grouped GEMM. The current-main merge retains the selected _sel dispatch on the passed stream, upstream NVFP4 stream handling, and IQ4's token-major q8_1 launch accounting.

Upstream added plan38::projected_shape/site::PROJECTED as a real loader consumer. IQ4_XS is now included there, matching the already admitted projected-site contract. The existing typed GGUF fixture exercises actual PROJECTED admission, not merely ALL. Qwen3.8 projected sites accept IQ4 while its K=640 shared down stays refused, as do other unsupported types/shapes. This is an existing-consumer compatibility repair, not a new model implementation. The redundant metadata-copy/label table guard is deleted in favor of that file-level behavior fixture.

No new kernel, precision mode, IQ4 tolerance/activation-band relaxation, tie change or whole-model oracle waiver. Upstream's newly implemented BF16 behavior/math fixture is retained; it is not an IQ4 band adjustment.

Earlier review dispositions retained

  • Incompatible activation and file-site refusals check semantic Shape/caller/tensor data, not an English sentence.
  • Historical unrelated NVFP4/MXFP8/FP8_B128 pins keep their provenance. The IQ4 pin is dated2026-10-26UTC; subsequent upstream BF16 implementation has its own provenance.
  • Uniform nibble-code weights do not establish nibble decode order; the permanent documentation no longer claims that.
  • Source-text/copy wiring guards are not restored. The independent mathematical act_rule transcription stays independent of dispatch metadata, so a metadata error cannot silently move implementation and oracle together.
  • Permanent docs hold contracts/evidence scope, not request credentials/private workspaces/Ready operations.

Exact historical execution — not relabeled as current source

Source Observed result
5c1c67a Real GPU0 DS41 library 38 passed,0 failed/ignored/filtered,26.63s, including IQ4 load/narrow/columns/wide replay and incompatible-form refusal.
Same5c1 Typed common file-site refusal consumer 1 passed,0 failed/ignored,426 filtered.
Same5c1 T0/lint passed; complete bot review APPROVED/CLEAN,must_fix0,warn0, explicitly accepting the independent-oracle disposition. This approval predates the current-main merge.
Original203f5125 contribution Canonical4bins/8carriers:1657 identical,0 reordered/different/one-sided; non-JIT resource rows equal. It is not a new canonical/JIT comparison of b0fc05e.

Pinned runtime tooling remains Rust1.99.1 / cuda-oxide9df9e7ce / repository backend patch31ab6a1d3f58. No SDK reinstall or model-specific compiler setting; repository bounds unchanged.

The configured5c1 request0a58b62b-42b7-47ea-b372-f0fe51c41a8e timed out at transport; original terminal/stages0 were recovered by read-only994599d7-54df-4075-881b-5119d4123338, with no remaining owned process and GPU1 active/healthy. Credential cleanup remained unconfirmed. The earlier de5fe112 compile-only124 executed no test and was not replayed blindly.

No claim of every model/residency workload, whole-model FlInt acceptance, physical cc12.1 resources, ROCm support or performance. Current-source NVIDIA and the newest exact-source canonical result are now both observed, not inferred.

Current-head CI cd03428 / PR-check40435533802 has now completed: T0 37/37,red0; lint success. This is host/CI and the exact-commit no-JIT comparison above, separate from the current-head NVIDIA execution reported below.

Current untouched-head card evidence

Source: cd034285a0354eba35d82c82b50905a365b8f113. Selected GPU0 inventory observed on the same device UUID:

NVIDIA GeForce RTX 3090, GPU-c5869563-1739-bc9c-0d22-cce082431ca9, 8.6, 595.91.07, 24576 MiB

Actual owning command (existing pinned Rust1.99.1 / oxide9df9e7ce + backend patch31ab6a1d3f58 / LLVM21.1.8):

CUDA_VISIBLE_DEVICES=GPU-c5869563-1739-bc9c-0d22-cce082431ca9 \
  bash tools/gate.sh --gpu --oxide --release -p bloomery-gpu-deepseek41 --lib -- --include-ignored
test shared_routed::tests::hw_iq4_shared_loads_and_runs_narrow_columns_and_wide_replay ... ok
test result: ok. 39 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 26.78s

The metadata-only site::tests::iq4_sites_keep_shape_and_launch_admission_separate also passed1/0/0,430filtered through tools/gate.sh --oxide --release -p bloomery-gpu --lib -- --exact ...; it is not a second GPU case. Original request transport exceeded its SSH deadline, so the original logs/results were recovered read-only, not replayed. Both steps and terminal exit0; no owned process remained; GPU1 stayed active and healthy. Credential cleanup is separately unconfirmed and not called confirmed.

The current-head bot review has now APPROVED/CLEAN,must_fix0,warn1 oncd034285. The nonblocking warning concerns permanent-document history, not a code failure; acknowledged here without moving the verified/approved code head. All component code/CI/card gates are evidenced. Maintainer merge remains because this contributor has read-only upstream permissions. No whole-model FlInt numerical or physical-cc12.1 acceptance is claimed.

@github-actions github-actions Bot added documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement labels Oct 24, 2026
@Burntgogi
Burntgogi marked this pull request as ready for review October 26, 2026 20:54
github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: CLEAN: no failure path survived; the Iq4Xs arms follow the existing K-quant owners, and the points below are non-blocking.

Non-blocking

⚠ The only tie between site_rel and SiteEntry::reads is deleted: act_rule.rs:1047. site_rel hard-codes the form each launch reads (ours), and this PR adds IQ4_XS there. The removed test turned red when a launch moved to another form. The PR body gives a dated reason, but nothing replaces the guard. A behavioral check needs no source text:

#[test]
fn site_rel_ours_follows_the_dense_entry_form() {
    use gguf::card::SiteAct;
    for row in gguf::QROWS {
        if row.ty.card().dense.is_some_and(|e| e.reads() == SiteAct::Q8x128) {
            assert_eq!(site_rel(row.ty, Arm::Gemv).map(|r| r.ours), Some(q8_rel(Q8_1_BLOCK)), "{}", row.ty);
        }
    }
}

⚠ Pin dates and history: kernels.rs:637 and kernels.rs:746 carry PIN(2026-10-27); the PR body dates the work 2026-10-26. Moving dense_admits_exactly_the_pinned_pairs also deleted the PIN lines of 2026-10-16, 10-19 and 10-20 (why NVFP4, MXFP8, FP8_B128 and BF16 entered the table). Keep them above the test and add the IQ4_XS line.

⚠ Weaker refusal tests: block.rs:704 checks only GpuError::Shape; the removed refused helper also checked the message names the types. site.rs:1750 (iq4_sites_keep_shape_and_launch_admission_separate) checks only is_err(), so a refusal for the wrong reason stays green. Assert one phrase per case.

⚠ Stale text: site.rs:1096 says "a K-quant's GEMM type" for an arm that now also runs IQ4_XS.

⚠ The new hw test uses uniform weights (shared_routed.rs:1228: every nibble 8). It pins loading, layout and replay, not IQ4_XS decode order, which stays with the iq4_xs gemv/GEMM gates. Say so in the PR body.

Checked

  • Duplicates: 3 new items checked, none duplicated; dryer 0 pairs. The SelDown construction repeats the Q5_K arm; two short copies cost less than a helper.
  • Complexity: kgemv 17 → 19, one match arm.
  • Silent failure: 6 sites followed; each refuses by name or behaves as before.
  • Tests: hw-test mutants (row-major order, q32 scratch, stale replay scratch) turn red.
  • Gates: no band, tolerance or KNOWN_DIVERGENCE changed.
  • Hot path: one _sel launch per site, as Q5_K; no allocation, lock or sync added.
  • Escape catalog: no match.

Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

github-actions[bot]
github-actions Bot previously approved these changes Oct 26, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: CLEAN: the new commits only edit docs/research/flint-attach.md; no failure path exists in a docs change.

Since the last review: all five ⚠ items are still open. No code file changed, so none of them is fixed (act_rule.rs:1047 guard test, kernels.rs:637 and :746 PIN lines, block.rs:704 and site.rs:1750 weak refusal asserts, site.rs:1096 stale text, uniform-weight hw test note). The author did not answer them. The first two are the most useful to fix before merge.

Non-blocking

⚠ Doc text that stops being true at merge: flint-attach.md:89 to L102. The paragraph says "#782 is review-ready, not merged", "Later documentation-only commits are not a new GPU execution", and names a credential-cleanup status, an execution request id and a contributor's workspace directory. These are PR status and history. They are false after the merge, and the request id and directory point to evidence nobody else can read. The commit message and PR body already hold this. Keep one stable sentence: the executed command, card, driver, test counts and the "not model admission, no performance claim" boundary.

Checked

  • Duplicates: 0 new code items in these commits; dryer 0 pairs.
  • Complexity: kgemv 17 → 19 was in the earlier commits (one match arm); nothing new.
  • Silent failure: no code changed in these commits.
  • Tests: none added or changed in these commits; earlier mutation result stands.
  • Gates: no band, tolerance or KNOWN_DIVERGENCE moved.
  • Escape catalog: no match.

Card check: gpu-evidence. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@github-actions github-actions Bot added gpu-evidence Verified on the author's card: the pull request carries the gate run and its output and removed needs-gpu Changes code a card must check, and carries no gate run on a card labels Oct 26, 2026
@Burntgogi
Burntgogi marked this pull request as draft October 26, 2026 22:58
@Burntgogi
Burntgogi marked this pull request as ready for review October 27, 2026 00:03
github-actions[bot]
github-actions Bot previously approved these changes Oct 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: CLEAN: the new commits tighten two refusal tests, restore PIN history and trim the docs; no failure path was found.

Since the last review:

  • Weak refusal asserts (block.rs:704, site.rs:1750): fixed. Both tests now require the Shape variant, the caller context and the offending type or tensor name. I read of_types, shaped and file_site: each case reaches an error that carries those values.
  • Stale text site.rs:1096: fixed. The failure context no longer says "K-quant".
  • PIN lines (kernels.rs:637, :746): fixed. The 2026-10-16/19/20 entries are back and the IQ4_XS entry is dated 2026-10-26.
  • Uniform-weight note: fixed in flint-attach.md:83. It says uniform codes do not detect nibble decode order.
  • Doc status text (flint-attach.md:89 to L102): fixed. The request id, the credential status and the workspace path are gone. The remaining paragraph names source, card, driver and counts.
  • act_rule.rs guard test: answered by the author in the PR body (an independent oracle is kept on purpose). I accept it.

Checked

  • Duplicates: 0 new code items in these commits; dryer 0 pairs.
  • Complexity: kgemv 17 → 19 is one match arm from the earlier commits; even growth.
  • Silent failure: 0 new defaults; the two edited tests now fail on a wrong error variant.
  • Tests: mutation check on block.rs:714. If Iq4Xs, Iq4Xs, Q8_0 were admitted, the let Err panics. If the detail dropped the down type, the contains assert fails. Same for site.rs:1751 with a changed shape or a dropped tensor name.
  • Gates: no band or tolerance moved. PIN dates restored.
  • Escape catalog: no match.

Notes

  • The PR body states the canonical comparison is from 203f5125, not from this head. The later delta is tests, PIN comments and docs.

Card check: gpu-evidence. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

github-actions[bot]
github-actions Bot previously approved these changes Oct 27, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: CLEAN: the new commits merge upstream, make IQ4_XS follow the shared q8x128 predicate and add a file-level projected-site test; I found no failure path.

Since the last review: the previous review had no must-fix and no ⚠ item. The author's reply on the act_rule.rs oracle stays accepted. The new commits remove the split-to-q8_0/f32 down refusals (upstream now supports them), admit IQ4_XS in site::PROJECTED, and add docs.

Non-blocking

⚠ Permanent doc carries PR history: flint-attach.md:87 to L108 name merge commits, per-source pass counts and "subsequently adds" steps. That is commit-message and PR-body content, and it is stale after the next merge. Keep the contract (what PROJECTED admits, the K=640 refusal, the writes_h rule) and move the run counts to the PR body.

Checked

  • Duplicates: 9 new items checked (q128, the IQ4 arm of kgemv_on, BF16_REL, the new tests, iq4_shared_file, check_shared_rows), none duplicated. The Q5_K and IQ4_XS arms of kgemv_on share a SelDown literal, but the launchers differ, and two short copies cost less than a new owner. dryer: 0 pairs.
  • Complexity: kgemv_on 17 → 19 is one match arm (even growth). No split asked.
  • Silent failure: 5 sites followed. q128 false for a down now routes to the f32 h path (block.rs:509, scratch gu is allocated for Split). projected_shape refuses K not a multiple of 256, so the Qwen3.8 K=640 shared down stays refused. glm5next's wide_ty refuses IQ4_XS by name, so dense_forms using kquant() does not size a front for it. The _sel launch checks sel.len() and y.len() (iq_sel.rs:1273).
  • Tests: the_plan_is_the_types_dispatch, a_row_leaves_f32_h_unless_a_split_pair_feeds_q8x128_down. If writes_h ignored the down's form, [Q6K,Q6K,Q8_0] or [Iq4Xs,Iq4Xs,Iq4Xs] turns red. iq4_sites_keep_shape_and_launch_admission_separate: if PROJECTED dropped IQ4_XS, the Some(Iq4Xs) assert fails; a dropped tensor name in the detail fails contains. hw_iq4_shared_...: a gate/up swap changes the 0.5 versus 0.25 row ratio and fails the relative bound. Nibble order is not covered, and the doc says so.
  • Gates: the IQ4_XS PINs are dated 2026-10-26. The coverage.rs:3605 IQ4 text sits under the 2026-10-26 PIN block. No band or tolerance moved.
  • Escape catalog: no pattern matched (no shell or tool files in the diff).

Notes

  • The PR body carries the nvidia-smi line, the command and the output for cd034285 on an RTX 3090. It makes no speed claim.
  • Tool access: the diff since the last review (1.1 MB) mostly holds the upstream merge. I read the PR's own files in PR_TREE and did not review upstream hunks.

Card check: gpu-evidence. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

midagedev and others added 3 commits October 27, 2026 15:22
# Conflicts:
#	docs/research/flint-attach.md
…Q4_XS as a site family; the Qwen3.8 dense pins read IQ4_XS through q8_1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…agedev#782's own coverage pin and site tests stand

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

Copy link
Copy Markdown
Owner

Thank you. I merged main (now with #781) into this branch and added one maintainer commit, so it can land in 0.3.10:

  • act_rule.rs: site_rel_reads_the_forms_the_launches_name is back, its expected line now naming SiteEntry::Iq4xs with a PIN(2026-10-27).
  • site.rs: the header test is back under its old name with the allowed-list, shape and message checks; the refused no-launch type is IQ3_S now, since IQ4_XS is a site family.

Your newer coverage pin and the restored every_family_is_the_tables_dense_row_of_one_type were already on this branch, so I kept yours. Box: just check and just lint 0 warnings, gate-ops green, hw_iq4_shared_loads_and_runs_narrow_columns_and_wide_replay green on the real tier. I marked it ready and will squash-merge after CI.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: MUST_FIX: the merge renamed the site test, and the permanent doc still names the old test as the evidence for PROJECTED admission.

Since the last review: the earlier ⚠ on PR history in flint-attach.md is still open (see below). The new commits merge upstream and reconcile the site test and the form-text guard.

Must fix

1. The doc names a test that no longer exists

flint-attach.md:141-146 says iq4_sites_keep_shape_and_launch_admission_separate passed. The merge renamed it to a_site_type_comes_from_the_header_and_a_type_with_no_launch_is_refused (site.rs:2068). Grep finds the old name only in this doc. A reader who looks for the test finds nothing. Fix it now: the next merge adds more drift.
Fix: replace L141-146 with the contract, with no run history:

The typed GGUF test `a_site_type_comes_from_the_header_and_a_type_with_no_launch_is_refused`
reads an IQ4_XS shared site through `PROJECTED`, not merely `ALL`. It refuses IQ3_S, another
shape and a type outside the allowed list by name. It is metadata-only and creates no CUDA context.

Non-blocking

⚠ Permanent doc still carries PR history: flint-attach.md:135-163 names merge commits, per-source pass counts and "subsequently adds" steps. That belongs in the PR body and commit messages. Keep what PROJECTED admits, the K=640 refusal and the writes_h rule.

Checked

  • Duplicates: 6 new items checked (the merged site test, the Iq4xs arm in SiteEntry::reads, the act_rule text guard line, the qwen3moe_dense exclusion, PROJECTED, the PINs), none duplicated. dryer: 0 pairs.
  • Complexity: kgemv_on 17 → 19 is one match arm (even growth). No split asked.
  • Silent failure: 4 sites followed. file_site refuses IQ3_S, a wrong shape and a type outside allowed as ChainError::Shape with the tensor name (chain/site.rs:207). qwen3moe_dense returns None for Iq4xs, so a qwen3moe file is refused at load. The upstream Q5_0 and leg_card_format changes do not touch the IQ4_XS arms (down(IQ4_XS) stays KQuant).
  • Tests: a_site_type_comes_from_the_header_...: if PROJECTED dropped IQ4_XS, the Some(Iq4Xs) assert fails. If IQ3_S were admitted, the unsupported row fails. site_rel_reads_the_forms_the_launches_name: if SiteEntry::Iq4xs left the Q8x128 arm of card.rs:322, the text assert fails. Fixture byte sizes match the block sizes of each type.
  • Gates: the new PIN(2026-10-27) lines carry a reason. No band or tolerance moved.
  • Escape catalog: no pattern matched (no shell or tool files in the PR's own changes).

Notes

  • The card run in the PR body is for cd034285. Head 1c8dbbef merges main afterwards. The body says so. It makes no speed claim.
  • The incremental diff is mostly upstream (handoff, Metal gates, Q5_0 relu²). I read the PR's own files in PR_TREE and did not review upstream hunks.

Card check: gpu-evidence. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

… history

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: MUST_FIX: the diff deletes the only test that holds PROJECTED and SiteTy::ALL to the kernel table, and weakens two refusal tests, with no dated reason.

Must fix

1. A deleted test and a stale comment (kind B)

Evidence: the diff removes every_family_is_the_tables_dense_row_of_one_type from crates/gpu/src/site.rs (now near site.rs:2211). It was the only place that checked, for every file type: SiteTy::of_ggml against kernels::dense, BY_NAME against dense_by_name, PROJECTED against dense_projected, and kgemv_order against Form::Q8x128. Grep finds no other user of dense_projected in a test and no other check of BY_NAME. The PR body calls it "redundant" and gives no dated reason. The doc comment at site.rs:239 still says "A unit test holds the list to placement::accepts::dense_projected". That is now false.
Mutant: drop SiteTy::Q6K from PROJECTED, or add a SiteTy to ALL with no PROJECTED entry. The coverage census still admits Q6_K (dense_projected), and no unit test turns red. The new file_site(.., &PROJECTED) case only covers IQ4_XS.
Cost: the test already needs only one new row for IQ4_XS, so restoring it is cheaper than the gap.
Fix: restore the function from base (crates/gpu/src/site.rs:2186 in BASE_TREE) and its imports (Order, GemmWeight, model::placement::kernels). Append the new row last in expected, because SiteTy::ALL ends with Iq4Xs:
(SiteTy::Iq4Xs, GgmlType::IQ4_XS, "IQ4_XS", Some(GemmWeight::Iq4Xs)),
Add assert_eq!(kgemv_order(SiteTy::Iq4Xs), Some(Order::TokenMajor));.

2. Refusal assertions removed without a dated reason (kind B)

Evidence: coverage.rs:3644 and coverage.rs:3657 lose the starts_with(...) checks ("{ty} shared expert ..." and "{ty} shared expert down (K = 640 ..."). Only got.len() == 1 is left. The K=640 shared-down test now passes if IQ4_XS is refused for a different reason (type instead of shape). The change to the admission lists carries no dated PIN(YYYY-MM-DD): line in the coverage test. The existing PIN(2026-10-26) comment is extended with undated text.
Cost: the K=640 refusal is the one claim the PR body makes about Qwen3.8; it should stay pinned by its reason.
Fix: restore the two assert!(got[0].starts_with(...)) lines (keep what in the tuple, as in base). Add // PIN(2026-10-27): IQ4_XS moved from refused to q8_1; it reads q8_1 through the selected one-expert dispatch. above the_qwen38_dense_pins_read_the_projected_sites.

Non-blocking

⚠ Permanent doc holds history and run logs: flint-attach.md:1306-1354 lists commit hashes, test counts, run times and "subsequently adds" narration. Keep the contract (what the site reads, what stays refused, what the gate covers). Move the run records to the commit message.
⚠ Stale doc comment: accepts.rs:281 (dense_projected) still lists "the K-quants, NVFP4" and omits IQ4_XS.

Checked

  • Duplicates: 6 new items checked (q128, SiteTy::Iq4Xs, SiteEntry::Iq4xs, the kgemv_on arm, hw_ test, check_shared_rows), none duplicated. The kgemv_on IQ4 arm repeats the Q5_K SelDown build, but the callee differs. Dryer: 0 pairs.
  • Complexity: kgemv_on 17 to 19, one more match arm (even growth, harmless).
  • Silent failure: 4 sites followed. q128 replaces kquant() in block.rs. GLM prefill.rs:376-391 uses reads() and writes_h(), which agree. GLM dense_forms (prefill.rs:1310, place.rs:606) still uses kquant(), but GATED_BLOCK refuses IQ4_XS for GLM and mimo2 at the census, so that path is unreachable.
  • Tests: hw_iq4_shared_... is #[ignore]d. Swapping gate and up turns it red, because the scales differ. Uniform nibble codes do not detect decode order, and the doc says so.
  • Gates: pins moved in kernels.rs, act_rule.rs and site.rs carry dates. The coverage pin does not (item 2).
  • Hot path: the decode shared-expert launch count equals the Q5_K arm (one quantize, one gemv); no new term.
  • Escape catalog: no match.

Notes

  • The PR body evidence (RTX 3090 line, tools/gate.sh commands, results) is for cd034285. This head is 1a76bcd. I could not check what changed between them.

Card check: gpu-evidence. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries a gate run on the author's card, which counts as verified.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

…ype with IQ4_XS's row and the refusal reasons, IQ4_XS's move dated

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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: CLEAN: I built no failure path for the IQ4_XS shared site that the code, a type guard or a census pin does not already block.

Non-blocking

⚠ GLM dense forms still key on kquant(): prefill.rs:1310 and DenseForms::with_block in model/src/arch/glm5next/place.rs. BlockPlan::of_file (body.rs:2304) now accepts IQ4_XS, and the plan reads q8_1/128 for its down. dense_forms would size the scratch as q8_0 blocks. Today GATED_BLOCK (coverage.rs:1032) refuses IQ4_XS for glm5next and mimo2 first, so this is latent. The doc says the GLM consumer follows the q8x128 rule; this site does not. Direction: derive with_block's two flags from the same predicate as q128, or state that the census pin is the guard.

⚠ Weaker refusal test: block.rs:737. The old assertions gate is Q8_0 and up is Q4_K are gone, with no dated PIN. Mutant: the message prints gate is {up} and up is {gate}. The test stays green, because each type name is still in detail. Direction: assert format!("gate is {}", types[0]) and format!("up is {}", types[1]).

⚠ Run history in a permanent doc: flint-attach.md:155. The paragraph holds commit hashes, run times and a canonical comparison of a past source. It goes stale at the next commit. Keep the contract and move the run record to the PR body. Also, passed5 cases,0 failed lacks spaces.

Checked

  • Duplicates: 8 new items checked (q128, SiteTy::Iq4Xs, SiteEntry::Iq4xs, the kgemv_on and gemm arms, the fixture writer, check_shared_rows, the of_resident filter). None duplicated. dryer: 0 pairs.
  • Complexity: kgemv_on 17 → 19 is one match arm, even growth.
  • Silent failure: 6 sites followed (of_resident, wide_ty, admit_dense, qwen3moe_dense, SiteWeight::check, file_site). Each gives a named refusal.
  • Tests: I planted a dropped q128 in the writes_h path; a_row_leaves_f32_h_unless_a_split_pair_feeds_q8x128_down turns red. A flipped nibble order stays green, because the weights are uniform. The PR text says so.
  • Gates: pins moved with dated PIN lines. No tolerance or band changed.
  • Escape catalog: no match.

Notes

  • GPU evidence: the card line and the run are for cd034285, not this head 56b15d0.
  • The PR body's claims about approvals and dismissed reviews were not used as evidence.

Card check: needs-gpu. This pull request changes crates/gpu-deepseek41/src/block.rs, crates/gpu-deepseek41/src/shared_routed.rs, crates/gpu-gates/src/act_rule.rs … and carries no gate run on a card (CONTRIBUTING's evidence list); a maintainer adds gpu-verified after one.

🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)

@github-actions github-actions Bot added needs-gpu Changes code a card must check, and carries no gate run on a card and removed gpu-evidence Verified on the author's card: the pull request carries the gate run and its output labels Oct 27, 2026
@midagedev
midagedev merged commit 63836db into midagedev:main Oct 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation gpu The card engine: crates/gpu*, crates/app model The CPU engine and model files: crates/model, models, hf, gguf, tokenizer, jinja needs-gpu Changes code a card must check, and carries no gate run on a card placement Placement planning: crates/placement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants