[PATCH] D78149: Use index for shape.to_extent_tensor
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 14 13:31:33 PDT 2020
silvas created this revision.
silvas added a reviewer: jpienaar.
Herald added subscribers: llvm-commits, frgossen, grosul1, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, rriddle, mehdi_amini, arphaman.
Herald added a reviewer: rriddle.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.
Also,
- add IndexTensor to OpBase.td
- fix typo in the op name. It was mistakenly `to_tensor` instead of `to_extent_tensor`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D78149
Files:
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
mlir/include/mlir/IR/OpBase.td
Index: mlir/include/mlir/IR/OpBase.td
===================================================================
--- mlir/include/mlir/IR/OpBase.td
+++ mlir/include/mlir/IR/OpBase.td
@@ -582,6 +582,7 @@
def I16Tensor : TensorOf<[I16]>;
def I32Tensor : TensorOf<[I32]>;
def I64Tensor : TensorOf<[I64]>;
+def IndexTensor: TensorOf<[Index]>;
def BF16Tensor : TensorOf<[BF16]>;
def F16Tensor : TensorOf<[F16]>;
Index: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
===================================================================
--- mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
+++ mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
@@ -181,7 +181,7 @@
let results = (outs Shape_ShapeType:$result);
}
-def Shape_ToExtentTensorOp : Shape_Op<"to_tensor", []> {
+def Shape_ToExtentTensorOp : Shape_Op<"to_extent_tensor", []> {
let summary = "Creates a dimension tensor from a shape";
// TODO: Think more about the error situation. Perhaps factor out the
// error detection into a separate op so downstream consumers can control
@@ -197,7 +197,7 @@
}];
let arguments = (ins Shape_ShapeType:$input);
- let results = (outs I32Tensor:$result);
+ let results = (outs IndexTensor:$result);
}
def Shape_JoinOp : Shape_Op<"join", []> {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78149.257474.patch
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200414/2efa35d2/attachment.bin>
More information about the llvm-commits
mailing list