Repository navigation
qdot: NVFP4_OFFSET is x86_64-only like its readers, so other targets build without dead_code - #798
Conversation
…build without dead_code
There was a problem hiding this comment.
Verdict: CLEAN: The constant now has the same architecture guard as its only executable reader, preserving x86_64 behavior.
Checked
Duplicates: 0 new items; dryer reported 0 candidate pairs.
Complexity: crapper flagged no functions; no function body changed.
Silent failure: 0 changed sites.
Tests: no tests changed; test mutation analysis does not apply. The author reports aarch64 clippy failing before the change and passing afterward.
Gates: no pins, thresholds, tests or lint levels moved.
Architecture: lib.rs:9094 matches the reader's guard at lib.rs:9137; documentation references also belong to guarded items.
Escape catalog: no patterns matched.
Notes
Static review only. Builds and gates were not run during this review.
🔨 Shingler, bloomery's review bot: approves a clean pull request and requests changes on a must-fix (how it works)
|
The review is done and the contribution check passed, so I'm merging this. |
x86_64가 아닌 target에서
cargo clippy -D warnings가 실패하던NVFP4_OFFSET상수의 dead_code 오류를 고칩니다.What and why
NVFP4_OFFSETincrates/qdot/src/lib.rsis read only by x86_64 code (thenvfp4_prep_avx2path), but the constant itself has nocfg. On any other target, such as aarch64, nothing reads it, socargo clippy -p bloomery-qdot --all-targets -- -D warningsstops witherror: constant NVFP4_OFFSET is never used. This adds#[cfg(target_arch = "x86_64")]to the constant, as its x86_64-only neighbours already carry. Its value and its readers are unchanged, so x86_64 builds behave as before.Release notes: Fixed:
bloomery-qdotbuilds without a dead_code error on targets other than x86_64.Code shape
alloworexpectis added.cargo fmtandcargo clippyare clean on what I touched; the lint count did not go up.Duplication found or removed (
path:line): none.What I ran
On an aarch64 Mac, on upstream main:
On this branch:
cargo fmtprints nothing.I did not build or run tests on an x86_64 machine. The change only removes the constant from non-x86_64 builds, and every reader of it is already x86_64-only.
Hardware (if the change is for a machine)
Not a machine change. It touches no device path and needs no GPU.
AI help
AI 코딩 에이전트가 코드를 작성한 후 설명을 썼고, 테스트를 마쳤습니다. diff 리뷰와 PR 초안 리뷰는 제가 직접 했습니다.