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

Transpose parameter in matmul/linear op #1750

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

azecevicTT
Copy link
Contributor

TTNN supports tranpose_a and transpose_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 removed test/ttmlir/Dialect/TTIR/matmul/matmul_tests_positive.mlir because there is the same matmul_tests_positive.mlir in TTNN directory and TTIR checks are done entirely as a part of that test.

Canonicalization pattern is added that transforms matmul(tranpose(lhs), rhs, transpose_lhs, transpose_rhs) to matmul(lhs, rhs, !transpose_lhs, transpose_rhs). Same for the rhs 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

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.

Add support for transpose input parameters for matmul and linear
1 participant