[Mlir-commits] [mlir] [mlir][sparse] Populate lvlToDim (PR #68937)

Aart Bik llvmlistbot at llvm.org
Tue Oct 17 10:28:11 PDT 2023


================
@@ -159,6 +159,13 @@ inline bool hasAnySparseOperandOrResult(Operation *op) {
   return hasAnySparseOperand(op) || hasAnySparseResult(op);
 }
 
+//
+// Inference.
+//
+
+AffineMap inferLvlToDim(AffineMap dimToLvl, MLIRContext *context);
----------------
aartbik wrote:

Add doc to both methods, for example

/// Given the dimToLvl map, infers the lvlToDim map, or returns empty Affine when inference fails.

and

/// Returns the lvlToDim map for the given dimToLvl map specific to the block sparse cases. Asserts on failure (so only use when known to succeed).

Or something like that

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


More information about the Mlir-commits mailing list