From 244bd24a075e902a1ac0c065570443f1d86a3a49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xinan=20Jiang=28=E5=A7=9C=E6=9B=A6=E6=A5=A0=29?= Date: Fri, 12 Apr 2024 10:47:40 +0800 Subject: [PATCH] fix --- lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp index d1a299e38..cfff048fb 100644 --- a/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp +++ b/lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp @@ -819,8 +819,9 @@ public: }); // Get the selected item directly from the concat operand. - Value replace; - for (int64_t sum = 0, i = 0; i < elements.size(); ++i) { + Value replace = op.getResult(); + int64_t sum = 0; + for (unsigned i = 0; i < elements.size(); ++i) { // Unsupported unknown dim size if (elementWidths[i] == kUnknownSize) return failure();