This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor][transform] Register tensor dialect patterns
ClosedPublic

Authored by springerm on Jun 2 2023, 3:22 AM.

Diff Detail

Event Timeline

springerm created this revision.Jun 2 2023, 3:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2023, 3:22 AM
springerm requested review of this revision.Jun 2 2023, 3:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2023, 3:22 AM
ftynse accepted this revision.Jun 2 2023, 5:45 AM

It would be nice to find a way to document these. Maybe update docs/Dialects/Transform.md to include a newly created docs/Dialects/TransformTensor.md, which itself contains a textual description of these pattern sets followed by include docs/Dialect/<generated_doc>.md.

This revision is now accepted and ready to land.Jun 2 2023, 5:45 AM

It would be nice to find a way to document these. Maybe update docs/Dialects/Transform.md to include a newly created docs/Dialects/TransformTensor.md, which itself contains a textual description of these pattern sets followed by include docs/Dialect/<generated_doc>.md.

I'm wondering if there's a way to place the documentation somewhere next to the implementation and auto-generate the .md. So that docs and code don't start to diverge... The registrations here could also be used for pattern tests. I.e., having a pass such as -test-registered-patterns="tensor.reassociative_reshape_folding" instead of Option<bool> testReassociativeReshapeFolding{ etc. in TestTensorTransforms.cpp.