Skip to content

Commit 79cb594

Browse files
authored
[mlir][sparse] remove unused COO method (#73595)
step closer towards moving all type related methods into encoding and/or sparse tensor type class
1 parent 17ec364 commit 79cb594

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,10 @@ bool isUniqueCOOType(Type tp);
102102
/// the level-rank.
103103
Level getCOOStart(SparseTensorEncodingAttr enc);
104104

105-
/// Helpers to setup a COO type.
105+
/// Helper to setup a COO type.
106106
RankedTensorType getCOOFromTypeWithOrdering(RankedTensorType src,
107107
AffineMap ordering, bool ordered);
108108

109-
RankedTensorType getCOOFromType(RankedTensorType src, bool ordered);
110-
111109
/// Returns true iff MLIR operand has any sparse operand.
112110
inline bool hasAnySparseOperand(Operation *op) {
113111
return llvm::any_of(op->getOperands().getTypes(), [](Type t) {

mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ Level mlir::sparse_tensor::getCOOStart(SparseTensorEncodingAttr enc) {
878878
return lvlRank;
879879
}
880880

881-
// Helpers to setup a COO type.
881+
// Helper to setup a COO type.
882882
RankedTensorType sparse_tensor::getCOOFromTypeWithOrdering(RankedTensorType rtt,
883883
AffineMap lvlPerm,
884884
bool ordered) {
@@ -911,13 +911,6 @@ RankedTensorType sparse_tensor::getCOOFromTypeWithOrdering(RankedTensorType rtt,
911911
return RankedTensorType::get(src.getDimShape(), src.getElementType(), enc);
912912
}
913913

914-
RankedTensorType sparse_tensor::getCOOFromType(RankedTensorType src,
915-
bool ordered) {
916-
return getCOOFromTypeWithOrdering(
917-
src, AffineMap::getMultiDimIdentityMap(src.getRank(), src.getContext()),
918-
ordered);
919-
}
920-
921914
Dimension mlir::sparse_tensor::toDim(SparseTensorEncodingAttr enc, Level l) {
922915
if (enc) {
923916
assert(enc.isPermutation() && "Non permutation map not supported");

0 commit comments

Comments
 (0)