[Mlir-commits] [mlir] [mlir][spirv] Add 6 Element Binary operators to TOSA Ext Inst Set (PR #179627)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Feb 23 06:57:37 PST 2026
================
@@ -62,6 +62,39 @@ class SPIRV_TosaOpWithComplexResult<string mnemonic, int opcode, list<Trait> tra
}];
}
+class SPIRV_TosaBinaryOp<string mnemonic, int opcode, list<Trait> traits = []> :
+ SPIRV_TosaOpWithResult<mnemonic, opcode, !listconcat(traits, [
+ AllElementTypesMatch<["input1", "input2"]>,
+ AllRanksMatch<["input1", "input2", "output"]>,
+ MatchBroadcastableShapes<"input1", "input2", "output">])> {
+
+ let extraClassDeclaration = extraBaseClassDeclaration#[{
+ ::mlir::TypedValue<::mlir::spirv::TensorArmType> getLHS() {
+ return getInput1();
+ }
+ ::mlir::TypedValue<::mlir::spirv::TensorArmType> getRHS() {
+ return getInput2();
+ }
----------------
kuhar wrote:
Elsewhere in MLIR we capitalize it as `getLhs`/`getRhs`
https://github.com/llvm/llvm-project/pull/179627
More information about the Mlir-commits
mailing list