[PATCH] D80705: [MLIR] Add TensorFromElementsOp to Standard ops.
Stephan Herhut via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 03:13:04 PDT 2020
herhut added a comment.
Thanks for cleaning this up!
================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1532
+def TensorFromElementsOp : Std_Op<"tensor_from_elements",
+ [NoSideEffect, SameOperandsElementType]> {
+ string summary = "tensor from elements operation.";
----------------
Maybe use `SameOperandsAndResultElementType`?
================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1556
+ }]>];
+
+ let hasCanonicalizer = 1;
----------------
Would `let assemblyFormat = "`(` $elements `)` attr-dict `:` type($result)";` work?
================
Comment at: mlir/lib/Dialect/StandardOps/IR/Ops.cpp:1713
+ APInt index;
+ if (!matchPattern(*extract.indices().begin(), m_ConstantInt(&index))) {
+ return failure();
----------------
Remove extra '{' '}'.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80705/new/
https://reviews.llvm.org/D80705
More information about the llvm-commits
mailing list