Skip to content

Allocations clean up#403

Merged
uuuvn merged 3 commits into
mainfrom
matmul-allocations-cleanup
May 14, 2026
Merged

Allocations clean up#403
uuuvn merged 3 commits into
mainfrom
matmul-allocations-cleanup

Conversation

@LuckyIYI
Copy link
Copy Markdown
Contributor

Moved variables closer to where they are used
Separated scratch from inputs allocations, removing them from arguments

@LuckyIYI LuckyIYI requested a review from eugenebokhan May 13, 2026 04:59
Comment on lines 56 to 60
MoePassATileCountsArguments {
expert_offsets: args.expert_offsets,
tile_counts: &mut *args.tile_counts,
e: args.e,
h_blocks,
},
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.

Very small struct, I think it's going to be cleaner if the 3 arguments are just arguments of the function instead of one argument with a 3-field struct

Comment on lines 65 to 67
MoePassATileScanArguments {
tile_counts: &*args.tile_counts,
tile_offsets: &mut *args.tile_offsets,
total_tiles: &mut *args.total_tiles,
tile_counts: &tile_counts,
e: args.e,
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.

Very small struct, I think it's going to be cleaner if the 2 arguments are just arguments of the function instead of one argument with a 2-field struct

Same in a bunch of places below too, won't spam comments on each one

@uuuvn uuuvn enabled auto-merge (squash) May 14, 2026 08:39
@uuuvn uuuvn merged commit 4b1eab1 into main May 14, 2026
7 checks passed
@uuuvn uuuvn deleted the matmul-allocations-cleanup branch May 14, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants