[Mlir-commits] [mlir] [mlir][sparse] remove unused COO method (PR #73595)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Nov 27 16:59:22 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Aart Bik (aartbik)
<details>
<summary>Changes</summary>
step closer towards moving all type related methods into encoding and/or sparse tensor type class
---
Full diff: https://github.com/llvm/llvm-project/pull/73595.diff
2 Files Affected:
- (modified) mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h (+1-3)
- (modified) mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp (+1-8)
``````````diff
diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
index f102f0270154264..517c286e0206997 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
@@ -102,12 +102,10 @@ bool isUniqueCOOType(Type tp);
/// the level-rank.
Level getCOOStart(SparseTensorEncodingAttr enc);
-/// Helpers to setup a COO type.
+/// Helper to setup a COO type.
RankedTensorType getCOOFromTypeWithOrdering(RankedTensorType src,
AffineMap ordering, bool ordered);
-RankedTensorType getCOOFromType(RankedTensorType src, bool ordered);
-
/// Returns true iff MLIR operand has any sparse operand.
inline bool hasAnySparseOperand(Operation *op) {
return llvm::any_of(op->getOperands().getTypes(), [](Type t) {
diff --git a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
index c4a828a20465a80..ff2930008fa093f 100644
--- a/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
+++ b/mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
@@ -878,7 +878,7 @@ Level mlir::sparse_tensor::getCOOStart(SparseTensorEncodingAttr enc) {
return lvlRank;
}
-// Helpers to setup a COO type.
+// Helper to setup a COO type.
RankedTensorType sparse_tensor::getCOOFromTypeWithOrdering(RankedTensorType rtt,
AffineMap lvlPerm,
bool ordered) {
@@ -911,13 +911,6 @@ RankedTensorType sparse_tensor::getCOOFromTypeWithOrdering(RankedTensorType rtt,
return RankedTensorType::get(src.getDimShape(), src.getElementType(), enc);
}
-RankedTensorType sparse_tensor::getCOOFromType(RankedTensorType src,
- bool ordered) {
- return getCOOFromTypeWithOrdering(
- src, AffineMap::getMultiDimIdentityMap(src.getRank(), src.getContext()),
- ordered);
-}
-
Dimension mlir::sparse_tensor::toDim(SparseTensorEncodingAttr enc, Level l) {
if (enc) {
assert(enc.isPermutation() && "Non permutation map not supported");
``````````
</details>
https://github.com/llvm/llvm-project/pull/73595
More information about the Mlir-commits
mailing list