[Mlir-commits] [mlir] [mlir][spirv] Introduce base classes for Integer and Bool elementwise binary ops (PR #185904)
Davide Grohmann
llvmlistbot at llvm.org
Thu Mar 12 01:09:21 PDT 2026
davidegrohmann wrote:
> Maybe we could pass a type directly to `SPIRV_TosaElementwiseBinaryOp`? For example:
>
> ```
> def SPIRV_TosaBitwiseAndOp : SPIRV_TosaElementwiseBinaryOp<"SPIRV_TosaInteger_TensorArm", "BitwiseAnd", 16, [Pure]>
> ```
>
> That is assuming we can generalise it well, otherwise lgtm as it is.
If you are thinking of using that pattern for all elementwise binary ops that does not generalize well - there are several exceptions with ops having extra attribute. We could use that pattern for the specific Bool/Integer cases in here (and maybe others) if preferred though.
https://github.com/llvm/llvm-project/pull/185904
More information about the Mlir-commits
mailing list