Collapsing / expanding a splatted value can be replaced with a single tensor.splat operation. Replace
these cases with a simple tensor.splat operation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Please use exact wording in the commit description. It helps with a lot of things, including drawing attention of relevant reviewers (some get a hundred of review emails per day). Specifically, this patch canonicalizes expand/collapse_shape + splat, *not* reshape + splat as its title misleadingly suggests. ReshapeOp is merely a name of the template argument in the implementation and has nothing to do in the commit title, but it misleads the reader into thinking the patch is related to tensor.reshape (https://mlir.llvm.org/docs/Dialects/TensorOps/#tensorreshape-mlirtensorreshapeop).