[Mlir-commits] [mlir] [mlir][tosa] Add TOSA RESHAPE_BLOCK_SCALED support (PR #191149)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Apr 14 01:57:22 PDT 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/Dialect/Tosa/IR/TosaOps.cpp mlir/lib/Dialect/Tosa/Transforms/TosaValidation.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/Dialect/Tosa/IR/TosaOps.cpp b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
index 621e6c2b7..35ffe6c9e 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -2906,7 +2906,7 @@ llvm::LogicalResult tosa::ReshapeBlockScaledOp::verify() {
 
   if (inputList.size() == 2) {
     if (blockSize != BlockSizeAttr::getBlockSizeValue(BlockSize::BLOCK_SIZE_32))
-        return emitOpError("expect block size to be 32, got ") << blockSize;
+      return emitOpError("expect block size to be 32, got ") << blockSize;
     if (llvm::any_of(inputList, [](Value v) {
           const auto input = cast<ShapedType>(v.getType());
           return input.hasRank() && input.getRank() == 0;
@@ -4217,7 +4217,7 @@ LogicalResult Conv2DBlockScaledOp::verify() {
 
   const uint32_t blockSize = BlockSizeAttr::getBlockSizeValue(getBlockSize());
   if (blockSize != BlockSizeAttr::getBlockSizeValue(BlockSize::BLOCK_SIZE_32))
-      return emitOpError("expect block size to be 32, got ") << blockSize;
+    return emitOpError("expect block size to be 32, got ") << blockSize;
   // Verify IC is a multiple of block size
   if (ShapedType::isStatic(IC) && IC % blockSize != 0)
     return emitOpError("expect IC to be a multiple of block size, got IC=")

``````````

</details>


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


More information about the Mlir-commits mailing list