Repository navigation
Lint the wasm32 build in CI; fix its three clippy lints - #5
Merged
Merged
Conversation
clippy 1.99 (chunks_exact_to_as_chunks) rejects chunks_exact with a constant size in the simd128 dot_q4_0, dot_q8_0 and dot_q6_k loops, which only compile for wasm32. Same rewrite already applied to the scalar and NEON kernels: as_chunks::<N>().0.iter() yields the same blocks and drops the same remainder.
The native clippy step never compiles the wasm32-only code (the simd128 dot kernels, the web bindings), so lints there went unnoticed. The workspace .cargo/config.toml enables +simd128 for wasm32, so this step covers the simd128 module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI ran clippy only for the native build, so three lints in the wasm32 simd128 kernels went unnoticed on main (
clippy::chunks_exact_to_as_chunksincrates/lean/src/cpu_kernels.rs).as_chunksinstead ofchunks_exact(N = 18, 34, 210). Outputs are bitwise identical to the previous code over 30,000 random Q4_0 / Q8_0 / Q6_K calls in a wasm32 +simd128 build.webfeature, so the browser build is linted too.