[Mlir-commits] [mlir] [mlir][tosa] Add fp16 support to `tosa.resize` (PR #73019)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 21 09:20:08 PST 2023
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 219d029490429cf5e1b87b716d9e4c59551bd2c2 940946969672d151eada200b840a7212f499c802 -- mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
index c07fd47d7d..c75aa10622 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
@@ -1504,7 +1504,7 @@ public:
auto resultETy = resultTy.getElementType();
bool floatingPointMode = resultETy.isF16() || resultETy.isF32();
- auto floatTy = resultETy.isF16() ? b.getF16Type() : b.getF32Type();
+ auto floatTy = resultETy.isF16() ? b.getF16Type() : b.getF32Type();
auto imageH = inputTy.getShape()[1];
auto imageW = inputTy.getShape()[2];
@@ -1682,7 +1682,8 @@ public:
input, ValueRange{batch, y1, x1, channel});
if (floatingPointMode) {
- auto oneVal = b.create<arith::ConstantOp>(b.getFloatAttr(floatTy, 1.0f));
+ auto oneVal =
+ b.create<arith::ConstantOp>(b.getFloatAttr(floatTy, 1.0f));
auto interpolate = [&](Value val0, Value val1, Value delta,
int inputSize,
ImplicitLocOpBuilder &b) -> Value {
``````````
</details>
https://github.com/llvm/llvm-project/pull/73019
More information about the Mlir-commits
mailing list