This is an archive of the discontinued LLVM Phabricator instance.

[mlir][gpu] Relax restriction on MMA store op to allow chain of mma ops.
ClosedPublic

Authored by ThomasRaoux on May 24 2021, 7:01 AM.

Details

Summary

In order to allow large matmul operations using the MMA ops we need to chain operations this is not possible unless "DOp" and "COp" type have matching layout so remove the "DOp" layout and force accumulator and result type to match.
Added a test for the case where the MMA value is accumulated.

Diff Detail

Event Timeline

ThomasRaoux created this revision.May 24 2021, 7:01 AM
ThomasRaoux requested review of this revision.May 24 2021, 7:01 AM

Note that I was also considering just removing the "DOp" altogether and have it always use "COp" but I didn't know if it was consistent with the direction you have in mind. This would be a good step in the direction of potentially removing those operands altogether.
Let me know what you think.

Note that I was also considering just removing the "DOp" altogether and have it always use "COp" but I didn't know if it was consistent with the direction you have in mind. This would be a good step in the direction of potentially removing those operands altogether.
Let me know what you think.

Hi @ThomasRaoux, It Seems like DOp is redundant. Everyone(performance-centric) would use the ops in the pattern you have in the test case. So it would be good if we could simply drop DOp and use COp instead.

ThomasRaoux edited the summary of this revision. (Show Details)

Note that I was also considering just removing the "DOp" altogether and have it always use "COp" but I didn't know if it was consistent with the direction you have in mind. This would be a good step in the direction of potentially removing those operands altogether.
Let me know what you think.

Hi @ThomasRaoux, It Seems like DOp is redundant. Everyone(performance-centric) would use the ops in the pattern you have in the test case. So it would be good if we could simply drop DOp and use COp instead.

Sounds good. Please take another look.

navdeepkk accepted this revision.May 27 2021, 8:53 AM

This is a great addition.

mlir/include/mlir/Dialect/GPU/GPUDialect.h
116

nit: extra angle bracket.

This revision is now accepted and ready to land.May 27 2021, 8:53 AM

remove extra > and rebase.

ThomasRaoux marked an inline comment as done.May 27 2021, 9:13 AM
This revision was landed with ongoing or failed builds.May 27 2021, 9:14 AM
This revision was automatically updated to reflect the committed changes.