[Mlir-commits] [mlir] [mlir][sparse] Update verifier for block sparsity and singleton (PR #69389)

Aart Bik llvmlistbot at llvm.org
Wed Oct 18 12:36:17 PDT 2023


================
@@ -173,6 +173,14 @@ AffineMap inferLvlToDim(AffineMap dimToLvl, MLIRContext *context);
 /// Asserts on failure (so only use when known to succeed).
 AffineMap inverseBlockSparsity(AffineMap dimToLvl, MLIRContext *context);
 
+/// Given the dimToLvl map, returns the block size in a vector.
+/// For instance, a 2x3 block will return [2, 3].
----------------
aartbik wrote:

perhaps also document that unblocked dimensions are 0 (or perhaps 1, but we should reserve that for explicit "blocking" by 1. So the length of the vector is DimRank and we have 0 is that dimension is not blocked or != if blocked. 

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


More information about the Mlir-commits mailing list