Repository navigation
Move tensor L2 normalize kernel out of its dispatch macro - #11526
Merged
Merged
Conversation
cargo-mutants does not mutate code inside macro invocations, so the per-row L2 normalization loop written inside the match_each_float_ptype! body in L2Normalize::execute was never mutation tested. Move the loop into a private generic `normalize_rows<T>` that builds the normalized values and per-row norms, and leave the macro as a thin dispatch that resolves `T` and calls it. The non-generic array construction (FixedSizeList, Extension and Struct arrays) now runs after the dispatch. Floating-point operation order is unchanged. vortex-mask moves from dev-dependencies to dependencies so the helper can take the validity `Mask` by reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
joseph-isaacs
enabled auto-merge (squash)
November 17, 2026 13:27
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
robert3005
approved these changes
Nov 18, 2026
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.
cargo-mutants can't mutate code inside macros, so the L2-normalize row loop was never mutation tested. This moves it out of
match_each_float_ptype!into a genericnormalize_rows<T>.🤖 Generated with Claude Code
https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM