[Mlir-commits] [mlir] [mlir][tosa] Use Tosa_I32EnumAttr to represent Tosa enumerations (PR #155695)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Aug 27 14:14:09 PDT 2025
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/TosaToArith/TosaToArith.cpp mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp mlir/lib/Dialect/Tosa/IR/TosaCanonicalizations.cpp mlir/lib/Dialect/Tosa/IR/TosaOps.cpp mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
``````````
: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 60c1954f7..8e0fcec06 100644
--- a/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+++ b/mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
@@ -306,7 +306,8 @@ ParseResult parseAttrEntryWithEnumHandling(OpAsmParser &parser,
return success();
}
}
- // special handling: nan_mode accepts a *bare* NanPropagationMode enum keyword.
+ // special handling: nan_mode accepts a *bare* NanPropagationMode enum
+ // keyword.
if constexpr (std::is_same_v<EnumType, tosa::NanPropagationMode>) {
if (name == "nan_mode" && succeeded(parser.parseOptionalKeyword(&kw))) {
auto sym = symbolizeNanPropagationMode(kw);
``````````
</details>
https://github.com/llvm/llvm-project/pull/155695
More information about the Mlir-commits
mailing list