[Mlir-commits] [mlir] [mlir][sparse] support sparsifying batch levels (PR #83898)

Aart Bik llvmlistbot at llvm.org
Mon Mar 4 14:11:04 PST 2024


================
@@ -33,7 +33,8 @@ static void convTypes(TypeRange types, SmallVectorImpl<Type> &convTypes,
     }
     // Convert the external representation of the values array.
     const SparseTensorType stt(cast<RankedTensorType>(type));
-    auto shape = {ShapedType::kDynamic};
+    auto shape = stt.getBatchLvlShape();
----------------
aartbik wrote:

I love how cleverly this works!

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


More information about the Mlir-commits mailing list