Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/cmma generalize #94

Closed
wants to merge 49 commits into from
Closed

Refactor/cmma generalize #94

wants to merge 49 commits into from

Conversation

louisfd
Copy link
Member

@louisfd louisfd commented Sep 4, 2024

Generalized the cmma algorithm to allow

I reduced the complexity of all the different parameters (block sizes, cube dims and other comptime info) to two degrees of liberty only: one must choose B_MN which is both block size for m and n, and B_K (block size for k), with the additional constraints that these parameters must be divisible by the tile size, and that B_MN must be divisible by B_K. This allows for only a few combinations of B_MN, B_K.

The combination (32, 32) weirdly adds 0s if tensors are not small, so I ignored it. I don't intend to fix it in the short term because it's not likely an important combination.

The combination (128, 16) creates a 128x128 shared memory at the write output stage. With the other shared memories this will bust most SMEMs. I will work on removing the need for a final shared memory, as mentioned in #15 .

In the short term I will also work on #13

@louisfd
Copy link
Member Author

louisfd commented Sep 6, 2024

See #101 instead

@louisfd louisfd closed this Sep 6, 2024
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.

Matmul CMMA: support other vectorizations (or none)
1 participant