[PATCH] D79541: [mlir] Simplify and better document std.view semantics
Tim Shen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 14:09:11 PDT 2020
timshen added inline comments.
================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:2910
let description = [{
- The "view" operation converts a 1-D memref with i8 element type,
- to an N-D memref with arbitrary element type. In addition, the ViewOp
- supports the following arguments:
- *) A single dynamic offset operand can be specified which represents a
- a dynamic offset within the base 1-D memref at which to create the
- resulting memref view.
- *) A dynamic size operand must be specified for each dynamic dimension
+ The "view" operation extracts an N-D contiguous memref (i.e. with empty or
+ identity layout map) with arbitrary element type from a 1-D contiguous
----------------
nicolasvasilache wrote:
> timshen wrote:
> > "contiguous memref" -> "slice"? To me "contiguous" means "no gaps between the accessed bytes", but it doesn't imply identity layout. Coming from Python/C++ background, "slice" implies identity layout.
> `slice` has potential conflicts in MLIR, there is a rank-reducing slice op in Linalg that is likely to be ported to std or to be folded within subview.
>
> How about `"contiguous memref with empty or identity layout"` ?
Sure, but other occurrences of "contiguous" will have to be lengthened with "empty or identity layout" as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79541/new/
https://reviews.llvm.org/D79541
More information about the llvm-commits
mailing list