add qmm mxu#473
Open
eugenebokhan wants to merge 15 commits into
Open
Conversation
uuuvn
requested changes
May 30, 2026
Comment on lines
+45
to
+72
|
|
||
| template <typename T> | ||
| static METAL_FUNC void apply_output_random_hadamard_transform( | ||
| device T* output_block, | ||
| const device int32_t* rht_factors_block, | ||
| ushort tile_block_rows, | ||
| ushort tile_block_cols, | ||
| uint leading_dimension_d, | ||
| ushort simdgroup_count, | ||
| const thread ThreadContext& thread_context | ||
| ) { | ||
| const ushort stripes_per_row = tile_block_cols / METAL_SIMD_SIZE; | ||
| const ushort simd_lane = thread_context.simd_lane_id; | ||
| const uint total_work = uint(tile_block_rows) * uint(stripes_per_row); | ||
| for (uint cell = thread_context.simdgroup_index; cell < total_work; | ||
| cell += simdgroup_count) { | ||
| const ushort row_local = ushort(cell / stripes_per_row); | ||
| const ushort stripe = ushort(cell % stripes_per_row); | ||
| const ushort col_local = stripe * ushort(METAL_SIMD_SIZE) + simd_lane; | ||
| const size_t output_index = | ||
| size_t(row_local) * size_t(leading_dimension_d) + size_t(col_local); | ||
| output_block[output_index] = simdgroup_output_random_hadamard_transform( | ||
| simd_lane, | ||
| output_block[output_index], | ||
| rht_factors_block[col_local] | ||
| ); | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
Matmul-specific indexing shouldn't be in common hadamard header
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.
No description provided.