-
Notifications
You must be signed in to change notification settings - Fork 30
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
[KernelDispatch] Refactor the pass for generic ops and utils for matmul_transpose_b ops #991
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few nits
if (!bodyMatcherForMatmulLikeOps(yieldVal, body)) { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!bodyMatcherForMatmulLikeOps(yieldVal, body)) { | |
return false; | |
} | |
if (!bodyMatcherForMatmulLikeOps(yieldVal, body)) return false; |
@@ -215,6 +234,22 @@ bool isMatmul(linalg::LinalgOp linalgOp) { | |||
match6DLinalgGenericMatmul(linalgOp); | |||
} | |||
|
|||
/// Utility to indentify whether a linalg op is a matmul_transpose_b op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Utility to indentify whether a linalg op is a matmul_transpose_b op. | |
/// Utility to identify whether a linalg op is a matmul_transpose_b op. |
@@ -48,6 +48,9 @@ FailureOr<unsigned> getTilingScaleFactor(Type elemType); | |||
/// Utility to indentify whether a linalg op is a matmul op. | |||
bool isMatmul(linalg::LinalgOp linalgOp); | |||
|
|||
/// Utility to indentify whether a linalg op is a matmul_transpose_b op. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Utility to indentify whether a linalg op is a matmul_transpose_b op. | |
/// Utility to identify whether a linalg op is a matmul_transpose_b op. |
24e0320
to
10a33ad
Compare
This PR refactored and simplified the root config setting in
KernelDispatch.cpp
for the following aspects:setTransposeLikeOpRootConfig
and flagisMatmulTranspseB
. Instead, directly go throughsetRootConfig
for generic version as well as the named op version ofmatmul_transpse_b
. This will be easier when we extend the support to covermatmul_transpose_a
.isMatmulTransposeB
utils toUtils.cpp
and reuse/merge with the existing utils for matmul ops.matmul
andmatmul_transpose_b
.