[Mlir-commits] [mlir] [Mesh] initialize mesh dialect (PR #68007)

Mehdi Amini llvmlistbot at llvm.org
Tue Oct 3 11:06:02 PDT 2023


================
@@ -28,12 +29,25 @@ def Mesh_Dialect : Dialect {
   }];
 
   let dependentDialects = [
-    "arith::ArithDialect"
+    "arith::ArithDialect" // For materializeConstant()
   ];
 
   let useDefaultAttributePrinterParser = 1;
   let hasConstantMaterializer = 1;
 }
+//===----------------------------------------------------------------------===//
+// Mesh Enums.
+//===----------------------------------------------------------------------===//
+
+def Mesh_Partial : I32EnumAttr<"Partial", "partial type of a distributed tensor", [
+  I32EnumAttrCase<"Sum", 0, "partial_sum">,
+  I32EnumAttrCase<"Max", 1, "partial_max">,
+  I32EnumAttrCase<"Min", 2, "partial_min">,
+  I32EnumAttrCase<"Generic", 100, "partial_generic">
----------------
joker-eph wrote:

I suspect we don't need to repeat `partial_` prefix here. 
If it is useful, is can be contextually added in the assembly format where it is used.

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


More information about the Mlir-commits mailing list