[Mlir-commits] [mlir] [mlir][spirv] Add 6 Element Binary operators to TOSA Ext Inst Set (PR #179627)

Jakub Kuderski llvmlistbot at llvm.org
Tue Feb 10 06:48:00 PST 2026


================
@@ -62,6 +62,19 @@ class SPIRV_TosaOpWithComplexResult<string mnemonic, int opcode, list<Trait> tra
   }];
 }
 
+class SPIRV_TosaElementwiseBinaryOp<string mnemonic, int opcode, list<Trait> traits = []> :
+  SPIRV_TosaOpWithResult<mnemonic, opcode, traits> {
+
+  let extraClassDeclaration = extraBaseClassDeclaration#[{
+    ::mlir::spirv::TensorArmType getInput1Type() {
+      return cast<::mlir::spirv::TensorArmType>(getInput1().getType());
+    }
+    ::mlir::spirv::TensorArmType getInput2Type() {
----------------
kuhar wrote:

Maybe call these lhs and rhs instead?

https://github.com/llvm/llvm-project/pull/179627


More information about the Mlir-commits mailing list