[Mlir-commits] [mlir] [mlir][linalg] Morphism across linalg named, category and generic ops. (PR #148424)

Renato Golin llvmlistbot at llvm.org
Wed Jul 23 07:39:03 PDT 2025


================
@@ -0,0 +1,82 @@
+//===- MorphOps.cpp - conversion between named,category and generic ops ---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements conversions between:
+//    named <--> category (elementwise, contraction, ..) <--> generic ops.
+//
+// For example, a named op such `linalg.add` can also be re-written as an
+// equivalent category op `linalg.elementwise` and also as a `linalg.generic`.
+//
+// Generic is a bigger set than named ops and so not all generics can be
+// converted to single category-op or named-op. Similarly, category-ops
+// are bigger in representational possiblities than named ops e.g.
----------------
rengolin wrote:

Maybe not have the same docs as in the table-gen file here?

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


More information about the Mlir-commits mailing list