Repository navigation
gpu-gates: reuse shared rounding bounds in chain FFN gate - #276
Conversation
Fixes midagedev#239. Import rounding::{U, gamma} and delete the gate's duplicate definitions. A standalone smoke matched the removed arithmetic bit-for-bit over 100005 counts; the actual feature-enabled gate type-checks. No gate band changes.
There was a problem hiding this comment.
Verdict: CLEAN: The shared definitions preserve the gate's arithmetic and checks.
Non-blocking
⚠ Missing move evidence: crates/gpu-gates/src/bin/gate_deepseek41_chain_ffn.rs:127. The PR reports no PTX identity scan or owning GPU gate run.
Attach matching base/head no-JIT just ptx-scan tables and just gate-gpu-ds41-chain-ffn output with the card evidence required by CONTRIBUTING.md. Capture this evidence before landing to verify the feature-enabled device program.
Checked
Duplicates: 0 new definitions; both imported items reuse the existing rounding owner. No dryer pairs were available.
Complexity: crapper flagged no functions; no branching was added.
Silent failure: 0 new fallback sites; rounding bounds still reach the existing waiver and failure checks.
Tests: none added or changed; mutation review is not applicable. Source comparison verified identical gamma bodies and unchanged consumers; no build or GPU execution was performed.
Gates: no bands, clauses, cases or pins changed. Both U definitions are exactly 2^-24; zero, the singular boundary and large counts retain the same arithmetic.
Escape catalog: C1–C4 do not match. The shared module is public and unconditional; the bin retains its required feature.
Notes
Dryer did not run, as reported by diagnostics.md.
Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/gate_deepseek41_chain_ffn.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)
Filed outside this PR: #279
|
@Burntgogi Thanks for the contribution. The review is done, so I'm merging this. |
What and why
Closes #239. Import
bloomery_gpu_gates::rounding::{U, gamma}in the chain FFN gate and remove its two duplicate definitions, following the existing chain-glue convention.Release notes: Under the hood — chain FFN error bounds use the existing shared rounding owner; numerical bands and arithmetic are unchanged.
Code shape
cargo fmtandcargo clippyclean: formatting and actual-target type-check pass; strict integrated lint is blocked as described below.Duplication removed: gate-local
Uandgammaingate_deepseek41_chain_ffn.rs; the owner iscrates/gpu-gates/src/rounding.rs.What I ran
Base
22c65407; independent fix branch.A standalone executable calls the production shared rounding module and compares it bit-for-bit with the removed expression:
Uand 100,005 gamma counts match, including zero, model widths, the singular boundary andusize::MAX. This is arithmetic equivalence, not a timing claim. No permanent forwarding/copy test was added.The actual feature-enabled target passes static checking:
cargo check --locked --offline --target x86_64-unknown-linux-gnu -p bloomery-gpu-gates --features deepseek41 --bin gate_deepseek41_chain_ffnFormatting passed. This is metadata/type-check evidence with CUDA headers; no device executable was linked with plain cargo. NVIDIA execution of the owning gate and PTX identity were not run here and remain maintainer evidence before landing.
Strict integrated host lint (changed host library packages,
--no-default-features --lib -- -D warnings) exits 101 on unchangedrefset/src/nemotron.rs:213(chunks_exact_to_as_chunks) andmodel/src/ops.rs:5546(collapsible_if). It does not complete the gate target's lint. No allowances or unrelated fixes were added.bash tools/affected-gates.sh origin/main..fix/chain-ffn-rounding-owner --no-boxselects onlygate-gpu-ds41-chain-ffnplus always-static checks, with no weekly trigger and no unmapped path.Integrated host verification
On combined validation commit
573d1e3a(all five independent fixes and their fixture corrections),LC_ALL=C bash tools/contrib-check.sh --tier t0exits 0:DONE tier=t0 total=83 red=0 wall=306sIncludes whole-tree formatting, all T0 host packages/tool self-tests, check-arch, check-comments, check-emb2, check-recipes and check-records. This is one combined run, not five independent full T0 runs. It does not establish CUDA execution or a clean strict Clippy run.