summaryrefslogtreecommitdiff
path: root/mlir/lib/ExecutionEngine/SparseTensor/File.cpp
AgeCommit message (Collapse)Author
2024-02-23[mlir][sparse] remove very thin header file from sparse runtime support (#82820)Aart Bik
2023-10-03[mlir][sparse] minor edits in runtime lib Cpp files (#68165)Aart Bik
2023-02-13[mlir][sparse] Extend readCOOIndices to support overhead types beyond ↵bixia1
index_type. This is to prepare for implementing the C API for reading a COO tensor to the given buffers for indices and values. Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D143861
2022-12-02[mlir][sparse] Breaking up openSparseTensor to better support non-permutationswren romano
This commit updates how the `SparseTensorConversion` pass handles `NewOp`. It breaks up the underlying `openSparseTensor` function into two parts (`SparseTensorReader::create` and `SparseTensorReader::readSparseTensor`) so that the pass can inject code for constructing `lvlSizes` between those two parts. Migrating the construction of `lvlSizes` out of the runtime and into the pass is a necessary first step toward fully supporting non-permutations. (The alternative would be for the pass to generate a `FuncOp` for performing the construction and then passing that to the runtime; which doesn't seem to have any benefits over the design of this commit.) And since the pass now generates the code to call these two functions, this change also removes the `Action::kFromFile` value from the enum used by `_mlir_ciface_newSparseTensor`. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D138363
2022-11-14[mlir][sparse] Making way for SparseTensorRuntime to support non-permutationswren romano
Systematically updates the SparseTensorRuntime to properly distinguish tensor-dimensions from storage-levels (and their associated ranks, shapes, sizes, indices, etc). With a few exceptions which are noted in the code, this ensures the runtime has all the **semantic** changes necessary to support non-permutations. (Whereas **operationally**, since we're still using `std::vector<uing64_t>` to represent the mappings, there's no way to pass in any interesting non-permutations. Changing the representation to `std::function` will be done in a separate differential.) Depends On D137680 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137681
2022-10-10[mlir][sparse] Rename SparseTensorFile to SparseTensorReader.bixia1
This is to prepare for adding SparseTensorWriter. Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D135477
2022-10-05[mlir][sparse] Case coverage fix no errorhandlingNathaniel McVicar
Restores the fix from D134925 for MSVC without breaking cpu runner. Differential Revision: https://reviews.llvm.org/D135304
2022-10-05Revert "[mlir][sparse] Restore case coverage warning fix"Vitaly Buka
Breaks https://lab.llvm.org/buildbot/#/builders/168/builds/9288 This reverts commit 83839700c32996c58ddebc0c74e3dc4970e005bc.
2022-10-04[mlir][sparse] Restore case coverage warning fixNathaniel McVicar
This restores the fix from D134925 to make MSVC and clang happy. Reviewed By: stella.stamenova Differential Revision: https://reviews.llvm.org/D135126
2022-09-30[mlir] Fix warningsKazu Hirata
This patch fixes: mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp:1348:31: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare] mlir/lib/ExecutionEngine/SparseTensor/File.cpp:110:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
2022-09-30[mlir][sparse] SparseTensorUtils post-refactoring cleanupwren romano
This differential corrects a few minor rebasing errors from the recent slew of differentials for factoring out the mlir_sparsetensor_utils library. Reviewed By: aartbik, Peiming Differential Revision: https://reviews.llvm.org/D134985
2022-09-29[mlir][sparse] Fixing case coverage warningwren romano
Followup to D133835 for fixing the warning on LLVM's Windows buildbot Reviewed By: aartbik, Peiming, stella.stamenova Differential Revision: https://reviews.llvm.org/D134925
2022-09-29[mlir][sparse] Cleaning up SparseTensorFile::readMMEHeaderwren romano
This is a followup to the refactoring of D133462, D133830, D133831, and D133833. Depends On D133833 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133837
2022-09-29[mlir][sparse] Factoring out SparseTensorFile::canReadAs predicatewren romano
This is a followup to the refactoring of D133462, D133830, D133831, and D133833. Depends On D133833 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133835
2022-09-29[mlir][sparse] refactoring SparseTensorUtils: (4 of 4) documentationwren romano
Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only exposed a C-API for accessing it. Now we are factoring out that C++ core into a standalone C++ library so that it can be used directly by downstream clients (per request of one such client). This refactoring has been decomposed into a stack of differentials in order to simplify the code review process, however the full stack of changes should be considered together. * D133462: Part 1: split one file into several * D133830: Part 2: Reorder chunks within files * D133831: Part 3: General code cleanup * (this): Part 4: Update documentation This part updates existing documentation, adds new documentation, and reflows the test for some existing documentation. Depends On D133831 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133833
2022-09-29[mlir][sparse] refactoring SparseTensorUtils: (3 of 4) code-cleanupwren romano
Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only exposed a C-API for accessing it. Now we are factoring out that C++ core into a standalone C++ library so that it can be used directly by downstream clients (per request of one such client). This refactoring has been decomposed into a stack of differentials in order to simplify the code review process, however the full stack of changes should be considered together. * D133462: Part 1: split one file into several * D133830: Part 2: Reorder chunks within files * (this): Part 3: General code cleanup * D133833: Part 4: Update documentation This part performs some general code cleanup including: * making more things `const`, especially for the targets of pointers * using preincrement wherever possible ([[ https://llvm.org/docs/CodingStandards.html#prefer-preincrement | per LLVM style guide ]]) * adding messages to most `assert` statments. * moving argument casting from the core function/method definitions to the CPP wrappers Depends On D133830 Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133831
2022-09-29[mlir][sparse] refactoring SparseTensorUtils: (1 of 4) file-splittingwren romano
Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only exposed a C-API for accessing it. Now we are factoring out that C++ core into a standalone C++ library so that it can be used directly by downstream clients (per request of one such client). This refactoring has been decomposed into a stack of differentials in order to simplify the code review process, however the full stack of changes should be considered together. * (this): Part 1: split one file into several * D133830: Part 2: Reorder chunks within files * D133831: Part 3: General code cleanup * D133833: Part 4: Update documentation This part aims to make no changes other than the 1:N file splitting, and things which are forced to accompany that change. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133462