Page MenuHomePhabricator

[mlir][Linalg] Add canonicalization for init_tensor -> subtensor op.
ClosedPublic

Authored by mravishankar on Jan 24 2021, 12:29 AM.

Diff Detail

Event Timeline

mravishankar created this revision.Jan 24 2021, 12:29 AM
mravishankar requested review of this revision.Jan 24 2021, 12:29 AM
nicolasvasilache accepted this revision.Jan 26 2021, 1:12 PM
This revision is now accepted and ready to land.Jan 26 2021, 1:12 PM
asaadaldien accepted this revision.Jan 26 2021, 1:52 PM

LGTM!

mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
909

should it be a failure in case of not zero offset and or not unit strides ?

913

Is that guaranteed to have static sizes ?

mravishankar added inline comments.Jan 26 2021, 3:26 PM
mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
909

I think it doesnt matter. The size is all that is needed. Thats the semantics of init_tensor.

913

It will return -1 when it is static.