[PATCH] D78690: [mlir][Standard] Allow select to use an i1 for vector and tensor values
Sean Silva via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 21:01:23 PDT 2020
silvas added inline comments.
================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1934
+ // Element-wise vector selection.
+ %vx = std.select" %vcond, %vtrue, %vfalse : vector<42xi1>, vector<42xf32>
+
----------------
mehdi_amini wrote:
> rriddle wrote:
> > mehdi_amini wrote:
> > > It almost seems like an entirely different operation to me compared to the simple selection of one input or the other. Should we have a vselect or something?
> > vselect sounds weird given that it also supports tensors, but I agree that the semantics are kind of different. The optional predication is the only thing that removes this from solely being a "simple" select.
> Do you plan to followup on looking into splitting this in two different ops?
+1. maybe `select_value` for the one that is not describable as a pure elementwise vector/tensor op?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78690/new/
https://reviews.llvm.org/D78690
More information about the llvm-commits
mailing list