Page MenuHomePhabricator

[mlir][Linalg] Enable TileAndFusePattern to work with tensors.
ClosedPublic

Authored by mravishankar on Jan 12 2021, 10:11 AM.

Diff Detail

Event Timeline

mravishankar created this revision.Jan 12 2021, 10:11 AM
mravishankar requested review of this revision.Jan 12 2021, 10:11 AM
hanchung requested changes to this revision.Jan 12 2021, 10:25 PM
hanchung added inline comments.
mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
164 ↗(On Diff #316154)

auto

165 ↗(On Diff #316154)

I think src won't be nullptr, so if (definingOp == src) is enough?

176–177 ↗(On Diff #316154)

s/mixe/mixed

btw, is the assertion correct? After reading the message, I would expect either src.hasTensorSemantics() && dst.hasBufferSemantics() or a vice versa check.

mlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
97

Do you intend to test matmul + add + matmul? I only see matmul + add in the function.

This revision now requires changes to proceed.Jan 12 2021, 10:25 PM
mravishankar marked 2 inline comments as done.Jan 14 2021, 4:58 PM
mravishankar added inline comments.
mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
165 ↗(On Diff #316154)

I think so, but I prefer to leave it this way.

mlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
97

Both operands of add are the result of the matmul

hanchung added inline comments.Jan 15 2021, 6:35 AM
mlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
97

Oh I see, thanks!

Rebase on top of enhancements to LinalgDependenceGraph allowing
dependence tracking through results.

Removing errant function.

hanchung accepted this revision.Jan 27 2021, 6:49 AM
This revision is now accepted and ready to land.Jan 27 2021, 6:49 AM

Rebase and fix test