[Mlir-commits] [mlir] [mlir][sparse] simplify reader construction of new sparse tensor (PR #69036)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Oct 13 17:38:01 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 f2b79ed9c6c858426b15a0374103ab901b5b2ef3 da85ab48e4c835a51d508ca6722e283e5a2c921b -- mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h 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/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
index 638475a80343..73f5e3eeb7d5 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
@@ -352,8 +352,8 @@ public:
dimShapesValues, dimSizesBuffer);
// Use the `reader` to parse the file.
Value tensor = NewCallParams(rewriter, loc)
- .genBuffers(stt, dimShapesValues, dimSizesBuffer)
- .genNewCall(Action::kFromReader, reader);
+ .genBuffers(stt, dimShapesValues, dimSizesBuffer)
+ .genNewCall(Action::kFromReader, reader);
// Free the memory for `reader`.
createFuncCall(rewriter, loc, "delSparseTensorReader", {}, {reader},
EmitCInterface::Off);
diff --git a/mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp b/mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
index fbd98f6cf183..74ab65c143d6 100644
--- a/mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
+++ b/mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
@@ -142,7 +142,7 @@ extern "C" {
assert(ptr && "Received nullptr for SparseTensorReader object"); \
SparseTensorReader &reader = *static_cast<SparseTensorReader *>(ptr); \
return static_cast<void *>(reader.readSparseTensor<P, C, V>( \
- lvlRank, lvlSizes, lvlTypes, dim2lvl, lvl2dim)); \
+ lvlRank, lvlSizes, lvlTypes, dim2lvl, lvl2dim)); \
} \
case Action::kToCOO: { \
assert(ptr && "Received nullptr for SparseTensorStorage object"); \
``````````
</details>
https://github.com/llvm/llvm-project/pull/69036
More information about the Mlir-commits
mailing list