Transpose parameter in matmul/linear op #1750
Open
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.
TTNN supports
tranpose_a
andtranspose_b
paramaters as default valued boolean (false) parameter for matmul and linear op. Some frontends also have this parameter. This PR introduces it. I have also refactored verifiers in some places. I have removedtest/ttmlir/Dialect/TTIR/matmul/matmul_tests_positive.mlir
because there is the samematmul_tests_positive.mlir
inTTNN
directory andTTIR
checks are done entirely as a part of that test.Canonicalization pattern is added that transforms
matmul(tranpose(lhs), rhs, transpose_lhs, transpose_rhs)
tomatmul(lhs, rhs, !transpose_lhs, transpose_rhs)
. Same for therhs
and linear op.I have also updated runtime to reflect a change in
tt-metal
tenstorrent/tt-metal#15285.I have opened a separate issue regarding a "Adding an op" doc, because matmul is used as an example there. #1749
Closes #1305