This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tensor] Enhance tensor.pad result shape deduction
Changes PlannedPublic

Authored by antiagainst on Jan 11 2022, 5:51 AM.

Details

Summary

This is a preliminary pattern to expose static information to enable
further transformations on tensor.pad like vectorization.

Depends On D117019

Diff Detail

Event Timeline

antiagainst created this revision.Jan 11 2022, 5:51 AM
antiagainst requested review of this revision.Jan 11 2022, 5:51 AM
mravishankar requested changes to this revision.Feb 7 2022, 9:52 AM
mravishankar added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
957

I am not sure we want to do it this way. This is effectively shape propagation. This is explicitly why this interface is for https://github.com/llvm/llvm-project/blob/5a7235769717eb7f0046465e823f93f110478710/mlir/include/mlir/Interfaces/InferTypeOpInterface.td#L151 .

You should be able to get that trigger with this pass https://github.com/llvm/llvm-project/blob/5a7235769717eb7f0046465e823f93f110478710/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td#L148 . Is this not working?

This revision now requires changes to proceed.Feb 7 2022, 9:52 AM
antiagainst marked an inline comment as done.Feb 7 2022, 10:29 AM
antiagainst added inline comments.
mlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
957

No, it's not covering the case I want to handle here. I can move this pattern to also use the above interface if that's better.

antiagainst marked an inline comment as done.

Address comments

antiagainst retitled this revision from [mlir][linalg] Add a pattern to concretize PadTensorOp result shapes to [mlir][tensor] Enhance tensor.pad result shape deduction.Feb 10 2022, 9:26 AM
antiagainst edited the summary of this revision. (Show Details)
mravishankar resigned from this revision.Mar 7 2022, 8:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2022, 8:14 PM
antiagainst planned changes to this revision.Mar 18 2022, 1:52 PM