[Mlir-commits] [mlir] [mlir] Rewrites for I2 to I8 signed and unsigned extension (PR #121298)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Jan 9 07:18:33 PST 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 6cbc64ed922cc69bc292d394ba5c681fa309f404 d543d5ae7a6246e4cd2302254a1c025b3f5129c7 --extensions cpp -- mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
index 9238db4a5d..98e45c7d30 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
@@ -1186,7 +1186,8 @@ static Value bitcastSubByteVectorToI8(PatternRewriter &rewriter, Location loc,
Value subByteVec) {
auto srcVecType = cast<VectorType>(subByteVec.getType());
int64_t srcBitwidth = srcVecType.getElementType().getIntOrFloatBitWidth();
- assert(8 % srcBitwidth == 0 && "Unsupported sub-byte type (not a divisor of i8)");
+ assert(8 % srcBitwidth == 0 &&
+ "Unsupported sub-byte type (not a divisor of i8)");
int64_t bitwidthFactor = 8 / srcBitwidth;
SmallVector<int64_t> vecShape(srcVecType.getShape());
// Adjust last dimension of the vector, so the total size remains the same.
``````````
</details>
https://github.com/llvm/llvm-project/pull/121298
More information about the Mlir-commits
mailing list