[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 15:14:05 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG483f2783ae01: Use index for shape.to_extent_tensor (authored by silvas).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78149/new/

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.257520.patch
Type: text/x-patch
Size: 1256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200414/91976c02/attachment.bin>


More information about the llvm-commits mailing list