-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[mlir] Add ContractionOpInterface utility functions for vector matrix multiplication #68945
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,24 @@ bool isColumnMajorMatmul(ArrayAttr indexingMaps); | |
/// the reduction. | ||
bool isRowMajorBatchMatmul(ArrayAttr indexingMaps); | ||
|
||
/// Tests whether the given maps describe a vector matrix multiplication. The | ||
/// test is permutation-invariant. Note that this only checks the affine maps | ||
/// from an operation, so does not perform any checks on the math being | ||
/// performed within the reduction. | ||
bool isVecmat(ArrayAttr indexingMaps); | ||
|
||
/// Tests whether the given maps describe a matrix vector multiplication. The | ||
/// test is permutation-invariant. Note that this only checks the affine maps | ||
/// from an operation, so does not perform any checks on the math being | ||
/// performed within the reduction. | ||
bool isMatvec(ArrayAttr indexingMaps); | ||
|
||
/// Tests whether the given maps describe a batch matrix vector multiplication. | ||
/// The test is permutation-invariant. Note that this only checks the affine | ||
/// maps from an operation, so does not perform any checks on the math being | ||
/// performed within the reduction. | ||
bool isBatchMatvec(ArrayAttr indexingMaps); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: rename to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My I kept them as vecmat/matvec since that's what the Linalg op is called. I agree that your version is clearer, but I'm not sure if it's better to stay consistent. Wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, fair enough. Thanks! |
||
|
||
/// Return positions in `iteratorTypes` that match `iteratorTypeName`. | ||
inline void findPositionsOfType(ArrayRef<utils::IteratorType> iteratorTypes, | ||
utils::IteratorType iteratorTypeName, | ||
|
Uh oh!
There was an error while loading. Please reload this page.