[Mlir-commits] [mlir] ca1bcdf - [mlir] Add to shape.is_broadcastable description
Tres Popp
llvmlistbot at llvm.org
Tue Nov 3 01:25:00 PST 2020
Author: Tres Popp
Date: 2020-11-03T10:23:55+01:00
New Revision: ca1bcdff4b866b1baa9a7b89ff0d11f8e36d4e52
URL: https://github.com/llvm/llvm-project/commit/ca1bcdff4b866b1baa9a7b89ff0d11f8e36d4e52
DIFF: https://github.com/llvm/llvm-project/commit/ca1bcdff4b866b1baa9a7b89ff0d11f8e36d4e52.diff
LOG: [mlir] Add to shape.is_broadcastable description
Added:
Modified:
mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
index 9998788568fc..a602d82fbd8c 100644
--- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
+++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
@@ -188,6 +188,11 @@ def Shape_IsBroadcastableOp : Shape_Op<"is_broadcastable", [Commutative]> {
they are broadcastable. This broadcastable follows the same logic as what
shape.broadcast documents.
+ Concretely, shape.is_broadcastable returning true implies that
+ shape.broadcast will not give an error, and shape.cstr_broadcastable will
+ not result in an assertion failure. Similarly, false implies an error or
+ assertion failure.
+
Example:
```mlir
%true = shape.is_broadcastable [2,2], [3,1,2]
@@ -199,7 +204,7 @@ def Shape_IsBroadcastableOp : Shape_Op<"is_broadcastable", [Commutative]> {
Shape_ShapeOrExtentTensorType:$rhs);
let results = (outs I1:$result);
- let assemblyFormat = "$lhs `,` $rhs `:` type($lhs) `,` type($rhs) attr-dict";
+ let assemblyFormat = "$lhs `,` $rhs attr-dict `:` type($lhs) `,` type($rhs)";
}
def Shape_RankOp : Shape_Op<"rank", [NoSideEffect]> {
More information about the Mlir-commits
mailing list