[Mlir-commits] [mlir] [mlir][tosa] Fix ability to expand ranks with dynamic shape support (PR #128037)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Feb 20 09:46:06 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-tosa
@llvm/pr-subscribers-mlir
Author: Jerry-Ge (Jerry-Ge)
<details>
<summary>Changes</summary>
Fix ability to expand ranks with dynamic shape support
---
Full diff: https://github.com/llvm/llvm-project/pull/128037.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp (+2-2)
``````````diff
diff --git a/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp b/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
index d1a8732dac212..9ade05c8f095b 100644
--- a/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
+++ b/mlir/lib/Dialect/Tosa/Utils/ConversionUtils.cpp
@@ -88,9 +88,9 @@ computeReshapeOutput(ArrayRef<int64_t> higherRankShape,
higherRankDim = higherRankShape[i];
lowerRankDim = lowerRankShape[j];
- if (lowerRankDim == 1 && higherRankDim > 1)
+ if (lowerRankDim == 1 && higherRankDim != 1)
reshapeOutputShape[i] = 1;
- else if ((lowerRankDim > 1 && higherRankDim == 1) ||
+ else if ((lowerRankDim != 1 && higherRankDim == 1) ||
(lowerRankDim == higherRankDim))
reshapeOutputShape[i] = lowerRankDim;
else if (higherRankDim != lowerRankDim)
``````````
</details>
https://github.com/llvm/llvm-project/pull/128037
More information about the Mlir-commits
mailing list