[Mlir-commits] [mlir] [mlir][sparse] implement non-permutation MapRef encoding (PR #69406)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 17 18:15:38 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 ae3ba725b7902ec9058a07de0db49f17419c6daa 20f86596420141e6d1867b7cda44625cdd83009b -- mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp mlir/lib/ExecutionEngine/SparseTensor/MapRef.cpp mlir/lib/ExecutionEngine/SparseTensor/Storage.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 5631b59ab..36e04d828 100644
--- a/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h
+++ b/mlir/include/mlir/ExecutionEngine/SparseTensor/MapRef.h
@@ -56,7 +56,8 @@ public:
//
// Map from dimRank in to lvlRank out.
- template <typename T> inline void pushforward(const T *in, T *out) const {
+ template <typename T>
+ inline void pushforward(const T *in, T *out) const {
if (isPermutation) {
for (uint64_t l = 0; l < lvlRank; l++) {
out[l] = in[dim2lvl[l]];
@@ -79,7 +80,8 @@ public:
//
// Map from lvlRank in to dimRank out.
- template <typename T> inline void pushbackward(const T *in, T *out) const {
+ template <typename T>
+ inline void pushbackward(const T *in, T *out) const {
if (isPermutation) {
for (uint64_t d = 0; d < dimRank; d++)
out[d] = in[lvl2dim[d]];
``````````
</details>
https://github.com/llvm/llvm-project/pull/69406
More information about the Mlir-commits
mailing list