[Mlir-commits] [mlir] [mlir][spirv] Lower mapped TOSA custom ops to ExperimentalML.Call (PR #202581)

Davide Grohmann llvmlistbot at llvm.org
Wed Jun 10 00:01:06 PDT 2026


================
@@ -1437,6 +1437,13 @@ def TosaToSPIRVTosa : Pass<"tosa-to-spirv-tosa"> {
     lowering supported TOSA ops to `spirv.Tosa.*`, and rewriting TOSA tensor
     and shape types to the corresponding SPIR-V ARM tensor types.
   }];
+  let options = [
+    ListOption<"customOpDomainToOpcode", "custom-op-domain-to-opcode",
+               "std::pair<std::string, int32_t>",
+               "Map TOSA custom op domains to spirv.ExperimentalML.Call "
+               "opcodes. Entries use <domain>:<opcode> and can be specified "
+               "multiple times.">
----------------
davidegrohmann wrote:

To simplify the code you can specify the same domain name multiple times, the last configuration wins. See the comment at mlir/lib/Conversion/TosaToSPIRVTosa/TosaToSPIRVTosaPass.cpp:171

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


More information about the Mlir-commits mailing list