Skip to content

[mlir][sparse] remove sparse2sparse path in library #69247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ enum class Action : uint32_t {
kEmpty = 0,
kEmptyForward = 1,
kFromCOO = 2,
kSparseToSparse = 3,
kFromReader = 4,
kToCOO = 5,
kPack = 7,
Expand Down
264 changes: 2 additions & 262 deletions mlir/include/mlir/ExecutionEngine/SparseTensor/Storage.h

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ extern "C" {
/// kEmpty - STS, empty
/// kEmptyForward - STS, empty, with forwarding COO
/// kFromCOO COO STS, copied from the COO source
/// kSparseToSparse STS STS, copied from the STS source
/// kToCOO STS COO, copied from the STS source
/// kPack buffers STS, from level buffers
/// kSortCOOInPlace STS STS, sorted in place
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/ExecutionEngine/SparseTensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
add_mlir_library(MLIRSparseTensorRuntime
File.cpp
MapRef.cpp
NNZ.cpp
Storage.cpp

EXCLUDE_FROM_LIBMLIR
Expand Down
79 changes: 0 additions & 79 deletions mlir/lib/ExecutionEngine/SparseTensor/NNZ.cpp

This file was deleted.

13 changes: 1 addition & 12 deletions mlir/lib/ExecutionEngine/SparseTensor/Storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,10 @@ SparseTensorStorageBase::SparseTensorStorageBase( // NOLINT
}
}

// Helper macro for generating error messages when some
// `SparseTensorStorage<P,I,V>` is cast to `SparseTensorStorageBase`
// and then the wrong "partial method specialization" is called.
// Helper macro for wrong "partial method specialization" errors.
#define FATAL_PIV(NAME) \
MLIR_SPARSETENSOR_FATAL("<P,I,V> type mismatch for: " #NAME);

#define IMPL_NEWENUMERATOR(VNAME, V) \
void SparseTensorStorageBase::newEnumerator( \
SparseTensorEnumeratorBase<V> **, uint64_t, const uint64_t *, uint64_t, \
const uint64_t *) const { \
FATAL_PIV("newEnumerator" #VNAME); \
}
MLIR_SPARSETENSOR_FOREVERY_V(IMPL_NEWENUMERATOR)
#undef IMPL_NEWENUMERATOR

#define IMPL_GETPOSITIONS(PNAME, P) \
void SparseTensorStorageBase::getPositions(std::vector<P> **, uint64_t) { \
FATAL_PIV("getPositions" #PNAME); \
Expand Down
7 changes: 0 additions & 7 deletions mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,6 @@ extern "C" {
return SparseTensorStorage<P, C, V>::newFromCOO( \
dimRank, dimSizes, lvlRank, lvlTypes, dim2lvl, lvl2dim, coo); \
} \
case Action::kSparseToSparse: { \
assert(ptr && "Received nullptr for SparseTensorStorage object"); \
auto &tensor = *static_cast<SparseTensorStorageBase *>(ptr); \
return SparseTensorStorage<P, C, V>::newFromSparseTensor( \
dimRank, dimSizes, lvlRank, lvlSizes, lvlTypes, dim2lvl, lvl2dim, \
dimRank, tensor); \
} \
case Action::kFromReader: { \
assert(ptr && "Received nullptr for SparseTensorReader object"); \
SparseTensorReader &reader = *static_cast<SparseTensorReader *>(ptr); \
Expand Down
1 change: 0 additions & 1 deletion utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8795,7 +8795,6 @@ cc_library(
srcs = [
"lib/ExecutionEngine/SparseTensor/File.cpp",
"lib/ExecutionEngine/SparseTensor/MapRef.cpp",
"lib/ExecutionEngine/SparseTensor/NNZ.cpp",
"lib/ExecutionEngine/SparseTensor/Storage.cpp",
],
hdrs = [
Expand Down