ConstantOp and TensorCastOp are part of std, so it makes sense for their
bufferizations to live there.
Also, add a couple TODO's for cases that don't work yet: rank-0 tensor
constants and tensor constants with an extent that is 0.
Paths
| Differential D89916
[mlir][linalg] Move some bufferization patterns to std AbandonedPublic Authored by silvas on Oct 21 2020, 4:49 PM.
Details
Summary ConstantOp and TensorCastOp are part of std, so it makes sense for their Also, add a couple TODO's for cases that don't work yet: rank-0 tensor
Diff Detail
Event Timelineherhut added inline comments.
This revision now requires changes to proceed.Oct 22 2020, 4:26 AM Comment Actions Note that this is just moving code with some light touch-up. We don't need to block on architectural discussion for the pattern itself.
silvas added inline comments. herhut added inline comments.
Revision Contents
Diff 299825 mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td
mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
mlir/lib/Dialect/StandardOps/Transforms/Bufferize.cpp
mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
mlir/test/Dialect/Linalg/bufferize.mlir
mlir/test/Dialect/Standard/bufferize.mlir
|
Wouldn't the most straight-forward way be to just allocate a size-0 memref?