[llvm-branch-commits] [mlir] 79cb594 - [mlir][sparse] remove unused COO method (#73595)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Nov 27 17:37:29 PST 2023
Author: Aart Bik
Date: 2023-11-27T17:26:45-08:00
New Revision: 79cb594fdf15c4bb8fc357b615210e6e57eb1c26
URL: https://github.com/llvm/llvm-project/commit/79cb594fdf15c4bb8fc357b615210e6e57eb1c26
DIFF: https://github.com/llvm/llvm-project/commit/79cb594fdf15c4bb8fc357b615210e6e57eb1c26.diff
LOG: [mlir][sparse] remove unused COO method (#73595)
step closer towards moving all type related methods into encoding and/or
sparse tensor type class
Added:
Modified:
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
Removed:
################################################################################
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");
More information about the llvm-branch-commits
mailing list