[Mlir-commits] [mlir] [mlir][sparse] introduce MapRef, unify conversion/codegen for reader (PR #68360)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 5 15:04:40 PDT 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 d6254e1b2e6d1792d3a7085bd05d86adce15757e 6094912685a0cfa5c13e023e8ec97238a84fca2f -- mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h mlir/lib/ExecutionEngine/SparseTensor/MapRef.cpp mlir/include/mlir/ExecutionEngine/SparseTensor/File.h mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h
index 1c1555688..a1bd6798f 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h
@@ -38,7 +38,8 @@ public:
// Push forward maps from dimensions to levels.
//
- template <typename T> inline void pushforward(const T *in, T *out) const {
+ template <typename T>
+ inline void pushforward(const T *in, T *out) const {
switch (kind) {
case MapKind::kIdentity:
for (uint64_t i = 0; i < dimRank; ++i)
@@ -58,7 +59,8 @@ public:
// Push backward maps from levels to dimensions.
//
- template <typename T> inline void pushbackward(const T *in, T *out) const {
+ template <typename T>
+ inline void pushbackward(const T *in, T *out) const {
switch (kind) {
case MapKind::kIdentity:
for (uint64_t i = 0; i < lvlRank; ++i)
diff --git a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
index 37ad3c1b0..0dd23ac52 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h
@@ -229,7 +229,6 @@ private:
const std::vector<uint64_t> lvl2dim;
};
-
/// A memory-resident sparse tensor using a storage scheme based on
/// per-level sparse/dense annotations. This data structure provides
/// a bufferized form of a sparse tensor type. In contrast to generating
@@ -780,8 +779,7 @@ protected:
//===----------------------------------------------------------------------===//
template <typename P, typename C, typename V>
-class SparseTensorEnumerator final
- : public SparseTensorEnumeratorBase<V> {
+class SparseTensorEnumerator final : public SparseTensorEnumeratorBase<V> {
using Base = SparseTensorEnumeratorBase<V>;
using StorageImpl = SparseTensorStorage<P, C, V>;
``````````
</details>
https://github.com/llvm/llvm-project/pull/68360
More information about the Mlir-commits
mailing list