Skip to content

bench_picks: the MXFP8 plane pair has a name, so clippy's type_complexity ratchet holds at 0 - #1159

Merged
juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-bench-picks-clippy
Nov 4, 2026
Merged

juliankang4 merged 1 commit into
midagedev:mainfrom
juliankang4:dgx-spark-q38-fix-bench-picks-clippy

Conversation

@juliankang4

Copy link
Copy Markdown
Collaborator

bench_picks의 MXFP8 plane 튜플에 타입 이름을 붙여 clippy type_complexity 경고를 0으로 되돌렸습니다.

What and why

clippy::type_complexity fires on the (DeviceTensor<u32>, DeviceTensor<u32>) pair in crates/gpu-gates/src/bin/bench_picks.rs (mxfp8_planes, line 394 on main), which pushes the ^warning: count above the ratchet in tools/lint-ratchet.txt (0). This names the pair Mxfp8Planes and uses the name in the two places that spelled the tuple out, mxfp8_enq and mxfp8_planes. Behavior does not change. One file, +5/-2.

Release notes: internal: clippy's type_complexity warning in bench_picks is gone, so the lint ratchet holds at 0.

Code shape

The review reads these first. A box left unticked needs one line of why.

  • No second copy. Logic two models (or two call sites) share has one common owner; I lifted it there instead of
    copying it (AGENTS.md "Common code first", docs/rust-quality.md R14). Where I found an existing copy, I
    named it below.
  • Model code holds only architecture facts. A model's own files carry only what its architecture forces
    (tensor shapes, the attention kind, the quant). A common owner gained no per-model branch, flag or trait method.
  • Dead code is gone. Nothing I made unused is left behind (functions, flags, gate clauses, docs).
  • No silent failure. Undefined input is a named error or panic, never a defined-looking output.
  • Comments state what is true now. No dates, issue numbers or how a bug was found (tools/check-comments.sh).
  • No relaxed gate. No band, tolerance or lint moved to make a check pass; a re-pin carries PIN(YYYY-MM-DD):
    and its reason.
  • cargo fmt and cargo clippy are clean on what I touched; the lint count did not go up. Skipped (explicit phase skip)

Duplication found or removed (path:line), or "none": none. The tuple was spelled twice in this file and both uses now share the alias.

What I ran

Tested on upstream base 04950bfff and PR head c70bccdb6d7545d31a0f2493f0dd28ff25035dd7.

nice -n 10 tools/mac-check.sh fmt-check
mac-check: fmt-check rc 0

nice -n 10 tools/mac-check.sh lint
mac-check: lint ^warning: 0 = the ratchet 0 in tools/lint-ratchet.txt; target .../target, 40 bloomery crates checked or compiled
LINT=0

lint runs cargo clippy --target x86_64-unknown-linux-gnu --workspace --all-targets with the workspace feature set of the lint recipe, using rustc 1.99.1 and rustfmt 1.10.0-stable.

Hardware (if the change is for a machine)

Not a machine change: a type alias in a gate binary, with no kernel or gate behavior touched.

AI help

AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.

@github-actions github-actions Bot added gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card labels Nov 4, 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 type alias preserves both signatures and changes no executable code.

Checked

Duplicates: 1 new type checked; no duplicate owner found. No dryer pairs were available.
Complexity: no function bodies or control flow changed.
Silent failure: 0 new sites.
Tests: no tests changed; mutation checks do not apply. Expanding Mxfp8Planes and removing its declaration reproduces the base file exactly. No build or runtime tests were run during this review.
Gates: no tests, pins, thresholds, or lint levels changed.
Escape catalog: no patterns matched.

Notes

dryer did not run; crapper failed because its Python module was missing.

Card check: needs-gpu. This pull request changes crates/gpu-gates/src/bin/bench_picks.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)

@juliankang4

Copy link
Copy Markdown
Collaborator Author

The review is done and the contribution check passed, so I'm merging this.

@juliankang4
juliankang4 merged commit c446bc7 into midagedev:main Nov 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gpu The card engine: crates/gpu*, crates/app needs-gpu Changes code a card must check, and carries no gate run on a card

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant