[Mlir-commits] [mlir] [MLIR][Mesh] Add sharding propagation pass (PR #69665)

Kunwar Grover llvmlistbot at llvm.org
Thu Nov 2 21:48:22 PDT 2023


================
@@ -235,6 +235,19 @@ AffineMap AffineMap::getPermutationMap(ArrayRef<unsigned> permutation,
   return permutationMap;
 }
 
+AffineMap AffineMap::getMultiDimMapWithTargets(unsigned numDims,
+                                               ArrayRef<int64_t> targets,
+                                               MLIRContext *context) {
+  AffineMap result =
+      AffineMap::get(/*dimCount=*/numDims, /*symbolCount=*/0, context);
----------------
Groverkss wrote:

You don't need to pass numDims here. You can just infer it. See getProjectedMap

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


More information about the Mlir-commits mailing list