[Mlir-commits] [llvm] [clang] [mlir] [mlir][verifyMemref] Fix bug and support more types for verifyMemref (PR #77682)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jan 10 12:24:18 PST 2024
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 2dde029df8f9e3b2ece6899dc73bea226f227d11 abb4cfff1b74a34f074e3feccb5c03598ba48e64 -- mlir/include/mlir/ExecutionEngine/Float16bits.h mlir/include/mlir/ExecutionEngine/RunnerUtils.h mlir/lib/ExecutionEngine/Float16bits.cpp mlir/lib/ExecutionEngine/RunnerUtils.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
index 965dff8381..9a748370c3 100644
--- a/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
+++ b/mlir/include/mlir/ExecutionEngine/RunnerUtils.h
@@ -331,9 +331,9 @@ int64_t verifyMemRef(const DynamicMemRefType<T> &actual,
}
// Return the number of errors.
int64_t printCounter = 0;
- return MemRefDataVerifier<T>::verify(
- std::cerr, actual.data, expected.data, actual.rank, actual.offset,
- actual.sizes, actual.strides, printCounter);
+ return MemRefDataVerifier<T>::verify(std::cerr, actual.data, expected.data,
+ actual.rank, actual.offset, actual.sizes,
+ actual.strides, printCounter);
}
/// Verify the equivalence of two unranked memrefs and return the number of
diff --git a/mlir/lib/ExecutionEngine/Float16bits.cpp b/mlir/lib/ExecutionEngine/Float16bits.cpp
index 2ac9c18b68..841610e3c1 100644
--- a/mlir/lib/ExecutionEngine/Float16bits.cpp
+++ b/mlir/lib/ExecutionEngine/Float16bits.cpp
@@ -150,13 +150,9 @@ std::ostream &operator<<(std::ostream &os, const bf16 &d) {
return os;
}
-bool operator==(const f16 &f1, const f16 &f2) {
- return f1.bits == f2.bits;
-}
+bool operator==(const f16 &f1, const f16 &f2) { return f1.bits == f2.bits; }
-bool operator==(const bf16 &f1, const bf16 &f2) {
- return f1.bits == f2.bits;
-}
+bool operator==(const bf16 &f1, const bf16 &f2) { return f1.bits == f2.bits; }
// Mark these symbols as weak so they don't conflict when compiler-rt also
// defines them.
diff --git a/mlir/lib/ExecutionEngine/RunnerUtils.cpp b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
index d93ec2b7af..eaa83bfc69 100644
--- a/mlir/lib/ExecutionEngine/RunnerUtils.cpp
+++ b/mlir/lib/ExecutionEngine/RunnerUtils.cpp
@@ -221,7 +221,7 @@ _mlir_ciface_printMemref1dC64(StridedMemRefType<impl::complex64, 1> *M) {
extern "C" int64_t
_mlir_ciface_verifyMemRefI8(UnrankedMemRefType<int8_t> *actual,
- UnrankedMemRefType<int8_t> *expected) {
+ UnrankedMemRefType<int8_t> *expected) {
return impl::verifyMemRef(*actual, *expected);
}
@@ -251,7 +251,7 @@ _mlir_ciface_verifyMemRefF16(UnrankedMemRefType<f16> *actual,
extern "C" int64_t
_mlir_ciface_verifyMemRefBF16(UnrankedMemRefType<bf16> *actual,
- UnrankedMemRefType<bf16> *expected) {
+ UnrankedMemRefType<bf16> *expected) {
return impl::verifyMemRef(*actual, *expected);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/77682
More information about the Mlir-commits
mailing list