[Mlir-commits] [mlir] [mlir][acc] Fix build error for tiling API return value (PR #171546)

Razvan Lupusoru llvmlistbot at llvm.org
Tue Dec 9 16:46:33 PST 2025


https://github.com/razvanlupusoru created https://github.com/llvm/llvm-project/pull/171546

The build error looks like:
error: could not convert 'newLoops' from 'SmallVector<[...],3>' to 'SmallVector<[...],6>'
  310 |   return newLoops;

The fix is to remove the explicit size in the local declaration for the SmallVector being returned.

>From d2d6f063bab488befdab03008cd7a829131926cf Mon Sep 17 00:00:00 2001
From: Razvan Lupusoru <rlupusoru at nvidia.com>
Date: Tue, 9 Dec 2025 16:43:40 -0800
Subject: [PATCH] [mlir][acc] Fix build error for tiling API return value

The build error looks like:
error: could not convert 'newLoops' from 'SmallVector<[...],3>' to
'SmallVector<[...],6>'
  310 |   return newLoops;

The fix is to remove the explicit size in the local declaration
for the SmallVector being returned.
---
 mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsTiling.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsTiling.cpp b/mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsTiling.cpp
index bf82d247028b9..0b344ba2f8316 100644
--- a/mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsTiling.cpp
+++ b/mlir/lib/Dialect/OpenACC/Utils/OpenACCUtilsTiling.cpp
@@ -253,7 +253,7 @@ llvm::SmallVector<mlir::acc::LoopOp>
 mlir::acc::uncollapseLoops(mlir::acc::LoopOp origLoop, unsigned tileCount,
                            unsigned collapseCount,
                            mlir::RewriterBase &rewriter) {
-  llvm::SmallVector<mlir::acc::LoopOp, 3> newLoops;
+  llvm::SmallVector<mlir::acc::LoopOp> newLoops;
   llvm::SmallVector<mlir::Value, 3> newIVs;
   mlir::Location loc = origLoop.getLoc();
   llvm::SmallVector<bool> newInclusiveUBs;



More information about the Mlir-commits mailing list