This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Add a pattern to fold tensor.cast into scf.forall.
ClosedPublic

Authored by pifon2a on Mar 21 2023, 1:10 PM.

Diff Detail

Event Timeline

pifon2a created this revision.Mar 21 2023, 1:10 PM
pifon2a requested review of this revision.Mar 21 2023, 1:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2023, 1:10 PM
tyb0807 accepted this revision.Mar 21 2023, 1:31 PM
tyb0807 added a subscriber: tyb0807.

LGTM! Thanks!

mlir/test/Dialect/SCF/canonicalize.mlir
1656

Nit: forall instead?

1681

Same nit comment

This revision is now accepted and ready to land.Mar 21 2023, 1:31 PM
herhut accepted this revision.Mar 22 2023, 2:48 AM

Just some minor nits.

mlir/lib/Dialect/SCF/IR/SCF.cpp
1598

Please add a comment what this does and/or use a better name. FoldTensorCastOfOutputIntoForallOp maybe?

1615

nit: that that and then -> than

1653

So these were updated to the casted bblock args, right? And this wires them back? Maybe say that in the comment a bit more explicitly so that this detail (the double update) is easier to get later.

pifon2a updated this revision to Diff 507315.Mar 22 2023, 4:56 AM
pifon2a marked 5 inline comments as done.

Address the comments.

This revision was landed with ongoing or failed builds.Mar 22 2023, 5:26 AM
This revision was automatically updated to reflect the committed changes.