This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Linalg] Better builders for transform ops
ClosedPublic

Authored by nicolasvasilache on Dec 14 2022, 3:37 AM.

Details

Summary

Also adopt DenseI64ArrayAttr in those transform ops.

Diff Detail

Event Timeline

nicolasvasilache requested review of this revision.Dec 14 2022, 3:37 AM
nicolasvasilache added inline comments.
mlir/test/Dialect/Linalg/transform-tile-reduction.mlir
20–21

Can't see offhand how to avoid modifying the parser so taking the test IR change .. I'd rather not ..
The doc says: https://mlir.llvm.org/docs/Dialects/Builtin/#densearrayattr

When a specific subclass is used as argument of an operation, the declarative assembly will omit the type and print directly:

[1, 2, 3]

How do I enable this? Does this work w/Optional ? @Mogball

mlir/test/Dialect/Linalg/transform-tile-reduction.mlir
20–21

I meant w/DefaultValued, not Optional, sorry..

ftynse accepted this revision.Dec 14 2022, 5:49 AM
ftynse added inline comments.
mlir/test/Dialect/Linalg/transform-tile-reduction.mlir
20–21

I think this only happens when the attribute is used in the op syntax, not as part of attr-dict.

This revision is now accepted and ready to land.Dec 14 2022, 5:49 AM
nicolasvasilache marked an inline comment as done.Dec 14 2022, 6:22 AM
nicolasvasilache added inline comments.
mlir/test/Dialect/Linalg/transform-tile-reduction.mlir
20–21

Good point, thanks!

This revision was automatically updated to reflect the committed changes.
nicolasvasilache marked an inline comment as done.