[PATCH] D80705: [MLIR] Add TensorFromElementsOp to Standard ops.
Alexander Belyaev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 28 06:30:31 PDT 2020
pifon2a marked an inline comment as not done.
pifon2a added inline comments.
================
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.";
----------------
herhut wrote:
> Maybe use `SameOperandsAndResultElementType`?
Thanks, that's a new trait and a useful one. didn't know about it.
================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1556
+ }]>];
+
+ let hasCanonicalizer = 1;
----------------
herhut wrote:
> Would `let assemblyFormat = "`(` $elements `)` attr-dict `:` type($result)";` work?
no, it wouldn't. It would need to know the elements type to parse it. Can I use assemblyFormat for printing only and a custom parser?
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