[Mlir-commits] [mlir] [mlir][sparse] fix stack overflow due to alloca instruction inside loops (PR #69765)

Yinying Li llvmlistbot at llvm.org
Fri Oct 20 13:42:49 PDT 2023


================
@@ -589,14 +589,23 @@ class SparseTensorInsertConverter : public OpConversionPattern<InsertOp> {
     const auto stt = getSparseTensorType(op.getTensor());
     const auto elemTp = stt.getElementType();
     const Level lvlRank = stt.getLvlRank();
+    // We need an alloca scope here as the InsertOp is always generated inside a
+    // loop, which lead to stack overflow.
----------------
yinying-lisa-li wrote:

leads?

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


More information about the Mlir-commits mailing list