This is an archive of the discontinued LLVM Phabricator instance.

[mlir] integration tests for transform dialect matchers
ClosedPublic

Authored by ftynse on Jul 4 2023, 6:14 AM.

Details

Summary

Add integration tests exercising transform dialect matchers for slightly
larger compositions of structured ops, namely reductions and matrix
multiplications with optional leading and trailing elementwise
operations.

Diff Detail

Event Timeline

ftynse created this revision.Jul 4 2023, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 6:14 AM
ftynse requested review of this revision.Jul 4 2023, 6:14 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 4 2023, 6:14 AM
qcolombet accepted this revision.Jul 4 2023, 6:34 AM

LGTM with nits on the descriptions to make things easier to understand.

Maybe wait for someone else review before landing.

mlir/include/mlir/Dialect/Linalg/TransformOps/LinalgMatchOps.td
276

Could you add an example for all three cases?
E.g., (Making things up)

func input(...) {
  %arg1, %arg2 = some_op ...
  linalg.matmul (ins %arg1, ...)
}
%match = match.matmul
match.structured.input %match[0] : ...
  1. gives %arg1 in case 1
  2. gives some_op in case 2
  3. gives %arg1's affine_map in the matmul in case 3
316

I don't see what the difference with the input matcher.
What is a init operand?
The outs for destination passing style operations?

This revision is now accepted and ready to land.Jul 4 2023, 6:34 AM
This revision was automatically updated to reflect the committed changes.
ftynse marked 2 inline comments as done.