Repository navigation
Conversation
|
Independent clean-target Clippy and GPU comparison check at AI-assisted with OpenAI Codex (GPT-6). |
KelboLive
left a comment
There was a problem hiding this comment.
Checked the clippy claims by running both configurations rather than reading the body:
| tree | --workspace |
--workspace --all-targets |
|---|---|---|
PR base 21e6bbf4b |
4 | 10 |
PR head 118118191 |
0 | 0 |
origin/main 3e7b34a52 |
5 | 11 |
| PR merged into today's main (clean merge) | 1 | 1 |
So the four targeted warnings are genuinely gone, and the behaviour hunks are safe: Stages keeps the amplify, ms, ps evaluation order and regroups only Copy fields, let _ = places.insert(..) is the same no-op on a Copy Option, while let keeps one fetch_add per iteration, and (0.0..1e9).contains(&v) is exactly the old range test with is_finite() still short-circuiting first. leonida-gpu 627/0/58 and leonida-shader 409/0/5.
Two corrections:
- The body's
--all-targetsnumber does not reproduce: at the stated base the unique total is 10 (4 lib + 6 test), not 15. The diff addresses exactly those ten. - "0" is true at the head, not on today's main:
maingained anunused_mutatcrates/leonida-gpu/src/host.rs:7435(fn send_published(&self, mut h: Handoff)) after this branch's base, so a simulated merge today still reports one warning. Rebase (or drop thatmut) or the claim is stale on landing.
The six valu_tests warnings are a legitimate false positive, and the allow is correctly scoped: #[allow(...)] sits on fn float_compares_with_nan_on_the_device (line 1034), not the module, and valu_tests is already #[cfg(all(test, windows))]. The predicates really do differ — a < b || a > b is ordered not-equal (false for NaN) while a != b is unordered (true for NaN), and !(a >= b) etc. are true when either operand is NaN. Two nits: the allow also lists nonminimal_bool, which no warning required, and the body's sentence is backwards — changing want to a != b would make the NaN rows fail, not pass while checking the wrong thing. The argument that the predicates differ is still right.
Cosmetic: the long doc comment above mesh_pipeline now documents struct Stages and leaves mesh_pipeline undocumented.
|
Follow-up on the remaining In that combination, replacing MEASURED, AI-assisted (Codex). |
VERIFY-2877 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game filesVerdict: PASS, with two things to know: it conflicts with #2873, and the Head 1. What it fixesFour clippy warnings that came back after #2681 and #2682 landed, and six more in
struct Stages { amplify: Option<D3D12_SHADER_BYTECODE>, ms: D3D12_SHADER_BYTECODE, ps: D3D12_SHADER_BYTECODE }
fn mesh_pipeline(device: …, root: …, code: Stages, g: …, depth_bounds: bool, name: Option<&str>) -> …so it takes six arguments, and the body destructures it on its first line. Only the four call sites change shape.
2. The
|
|
Verified on Windows 11, Rust 1.98.1, no GPU and no game files. The claim holds on the pull request's own base. The warnings were counted from the compiler's own JSON messages (one per line), so the count is what the compiler reported and not a summary line's word for it:
The four the report names are all there on the base, and all four are gone on the head:
and the six in Two things the report should say, because both are measured and neither blocks the change. 1. The base's counts are five and sixteen, not "four and fifteen". The fifth warning on the base is 2. What happens when it lands on the current
So a merge that brings this pull request's commits onto the current One note on the Not checked: the warnings on a Linux host (clippy's lints are the same, but only Windows was run here); the crates outside the workspace. |
3d412f6 to
3e7b0c5
Compare
|
All four reviews read, and four things changed because of them. Head is now The fn send_published(&self, h: Handoff) {
// The lists and the stamp are added to `h` only with `diagnostics`.
#[cfg(feature = "diagnostics")]
let mut h = h;which is the shape merzleckeier measured.
The doc (Neutron-0): the stream-forms doc goes back on
And the sentence you caught, KelboLive: "the test would pass while checking the wrong thing" is backwards, as you say - changing On the counts (KelboLive): your 10 at I have not touched #2873, which overlaps in three files; my reading of the thread is the same as yours - the two are versions of one change, and this one's comments and allow plus that one's test is the right combination. That is a maintainer's call and I am not going to make it by rebasing over someone else's branch. Measured at Written with an AI assistant. |
The four fixes this branch started with are on main already, from the other version of them (ProjectLeonida#2873): `let _ = places.insert(..)`, `while let` in `pipeline/known.rs`, `(0.0..1e9).contains(&v)` in `glyphs/live.rs` and the `MeshStages` struct for `mesh_pipeline`. What is left is the part that commit did not carry: - the six `--all-targets` warnings in `emit/valu_tests.rs`: clippy wants `a != b` for `a < b || a > b`, and in a table of RDNA2's sixteen f32 compare predicates those are not the same function - with a NaN the first is false and the second is true. The two lints are allowed on that one test, with the reason above it. - `unused_mut` on `send_published`'s `Handoff`: what writes it is behind `diagnostics`, so the parameter loses `mut` and keeps a `let mut h = h;` under that feature. Measured on main 1fff691, before and after: cargo clippy --workspace 2 warnings -> 0 cargo clippy --workspace --all-targets 10 warnings -> 0 cargo test -p leonida-shader float_compares_with_nan 1 passed cargo test -p leonida-gpu --lib -- --test-threads=1 643 passed; 1 failed, descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in, which fails the same way on main without this change With --features diagnostics nothing new appears: the one warning in `leonida-gpu/src/host.rs` under that feature is at line 4677, not here. Written with an AI assistant.
3e7b0c5 to
f98e8cc
Compare
Reduced to what
mainstill has. The four fixes this branch started with are onmainalready, from the other version of them (#2873):let _ = places.insert(..),while letinpipeline/known.rs,(0.0..1e9).contains(&v)inglyphs/live.rs, and a struct formesh_pipeline's shader bytecodes (MeshStagesthere). That is why the branch had goneDIRTY: it was re-applying what had landed.What is left, and is only here:
1. The six
--all-targetswarnings inemit/valu_tests.rs. Clippy wantsa != bfora < b || a > b, and in a table of RDNA2's sixteenf32compare predicates those are not the same function:The two lints (
neg_cmp_op_on_partial_ord,double_comparisons) are allowed on that one test, with the reason in the doc comment above it.2.
unused_mutonsend_published'sHandoff. What writes it is behinddiagnostics, so the parameter losesmutand keeps the binding under that feature:Measured on
main1fff69129, before and after:The one that fails is
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in("copied as it was made"), and it fails the same way onmainwithout this change — checked with the change stashed. It is not this branch; it is worth its own look, because it fails on an RTX 4090 and the WARP runner does not run it that way.With
--features diagnosticsnothing new appears: the one warning inleonida-gpu/src/host.rsunder that feature is at line 4677, not here.AI-assisted: yes — DeepSeek v4.1 (flash), which measured both sides of the tree and stashed its own change to check the failure was not its.
Written with an AI assistant.