[Mlir-commits] [mlir] [mlir][sparse] Return actual identity map instead of null map (PR #70365)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 26 11:55:35 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 f7de49840367f44a5a88cab2c652e84f7efbf8b0 de7cf5cc49bd8fc4463180c461b50b8d16def6a3 -- mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp b/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp
index cc10f0b7238d..6a81a11a932f 100644
--- a/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp
+++ b/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp
@@ -313,7 +313,7 @@ AffineMap DimLvlMap::getDimToLvlMap(MLIRContext *context) const {
lvlAffines.reserve(getLvlRank());
for (const auto &lvlSpec : lvlSpecs)
lvlAffines.push_back(lvlSpec.getExpr().getAffineExpr());
- auto map = AffineMap::get(getDimRank(), getSymRank(), lvlAffines, context);
+ auto map = AffineMap::get(getDimRank(), getSymRank(), lvlAffines, context);
return map;
}
diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
index 904cc2e4f8e6..778a177502cb 100644
--- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
+++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
@@ -291,8 +291,8 @@ SparseTensorEncodingAttr
SparseTensorEncodingAttr::withDimToLvl(AffineMap dimToLvl) const {
assert(getImpl() && "Uninitialized SparseTensorEncodingAttr");
return SparseTensorEncodingAttr::get(getContext(), getLvlTypes(), dimToLvl,
- AffineMap(),
- getPosWidth(), getCrdWidth());
+ AffineMap(), getPosWidth(),
+ getCrdWidth());
}
SparseTensorEncodingAttr
``````````
</details>
https://github.com/llvm/llvm-project/pull/70365
More information about the Mlir-commits
mailing list