[Mlir-commits] [mlir] [MLIR][TOSA] Guard scatter lowering against unranked operand (PR #178188)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Jan 27 04:20:11 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp b/mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp
index 9b1fb90d3..6b9186b7c 100644
--- a/mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp
+++ b/mlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp
@@ -101,9 +101,9 @@ public:
auto input = scatter.getInput();
auto loc = scatter.getLoc();
- auto valuesType = dyn_cast<RankedTensorType>(valuesIn.getType());
+ auto valuesType = dyn_cast<RankedTensorType>(valuesIn.getType());
auto indicesType = dyn_cast<RankedTensorType>(indices.getType());
- auto inputType = dyn_cast<RankedTensorType>(input.getType());
+ auto inputType = dyn_cast<RankedTensorType>(input.getType());
if (!valuesType || !indicesType || !inputType ||
valuesType.getRank() != 3 || inputType.getRank() != 3 ||
indicesType.getRank() != 2)
``````````
</details>
https://github.com/llvm/llvm-project/pull/178188
More information about the Mlir-commits
mailing list