History log of /llvm-project/mlir/lib/ExecutionEngine/SparseTensor/Storage.cpp (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3
# dc4cfdbb 29-Mar-2024 Aart Bik <ajcbik@google.com>

[mlir][sparse] provide an AoS "view" into sparse runtime support lib (#87116)

Note that even though the sparse runtime support lib always uses SoA
storage for COO storage (and provides correct code

[mlir][sparse] provide an AoS "view" into sparse runtime support lib (#87116)

Note that even though the sparse runtime support lib always uses SoA
storage for COO storage (and provides correct codegen by means of views
into this storage), in some rare cases we need the true physical SoA
storage as a coordinate buffer. This PR provides that functionality by
means of a (costly) coordinate buffer call.

Since this is currently only used for testing/debugging by means of the
sparse_tensor.print method, this solution is acceptable. If we ever want
a performing version of this, we should truly support AoS storage of COO
in addition to the SoA used right now.

show more ...


Revision tags: llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4
# 1c2456d6 23-Feb-2024 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] remove very thin header file from sparse runtime support (#82820)


# f8ce460e 23-Feb-2024 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] cleanup sparse runtime library (#82807)

remove some obsoleted APIs from the library that have been fully
replaced with actual direct IR codegen


Revision tags: llvmorg-18.1.0-rc3
# e5924d64 08-Feb-2024 Yinying Li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Implement parsing n out of m (#79935)

1. Add parsing methods for block[n, m].
2. Encode n and m with the newly extended 64-bit LevelType enum.
3. Update 2:4 methods names/comments t

[mlir][sparse] Implement parsing n out of m (#79935)

1. Add parsing methods for block[n, m].
2. Encode n and m with the newly extended 64-bit LevelType enum.
3. Update 2:4 methods names/comments to n:m.

show more ...


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 6fb7c2d7 30-Nov-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] bug fix on all-dense lex insertion (#73987)

Fixes a bug that appended values after insertion completed. Also slight
optimization by avoiding all-Dense computation for every lexInsert

[mlir][sparse] bug fix on all-dense lex insertion (#73987)

Fixes a bug that appended values after insertion completed. Also slight
optimization by avoiding all-Dense computation for every lexInsert call

show more ...


Revision tags: llvmorg-17.0.6
# 1944c4f7 27-Nov-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] rename DimLevelType to LevelType (#73561)

The "Dim" prefix is a legacy left-over that no longer makes sense, since
we have a very strict "Dimension" vs. "Level" definition for sparse

[mlir][sparse] rename DimLevelType to LevelType (#73561)

The "Dim" prefix is a legacy left-over that no longer makes sense, since
we have a very strict "Dimension" vs. "Level" definition for sparse
tensor types and their storage.

show more ...


Revision tags: llvmorg-17.0.5, llvmorg-17.0.4
# e6005d5a 23-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] support 2:4 structured sparsity and loose compressed (#69968)

This adds library support for these two new level formats.


# 306f4c30 18-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] implement non-permutation MapRef encoding (#69406)

This enables reading block sparse from file using libgen! (and soon also
direct IR codegen)


Revision tags: llvmorg-17.0.3
# 233c3e6c 16-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

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

This cleans up all external entry points that will have to deal with
non-permutations, making any subsequent refactoring much more local

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

This cleans up all external entry points that will have to deal with
non-permutations, making any subsequent refactoring much more local to
the lib files.

show more ...


# 2045cca0 13-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] add a forwarding insertion to SparseTensorStorage (#68939)


# db1d40f3 11-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] refactor dim2lvl/lvl2dim passing into MapRef (#68649)

This revision refactors all "swiss army knife" entry points to pass
dim2lvl/lvl2dim mapping, so that the callee can construct a

[mlir][sparse] refactor dim2lvl/lvl2dim passing into MapRef (#68649)

This revision refactors all "swiss army knife" entry points to pass
dim2lvl/lvl2dim mapping, so that the callee can construct a MapRef
(shown for SparseTensorStorage class). This is a next step towards
completely centralizing mapping code into a single MapRef class.

show more ...


# ab6334dd 09-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] add expanded size to API (#68614)

Used for asserting we do not run out of bounds on the expanded access
pattern.


# 427f120f 03-Oct-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] minor edits in runtime lib Cpp files (#68165)


Revision tags: llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4
# 84cd51bb 06-Mar-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Renaming "pointer/index" to "position/coordinate"

The old "pointer/index" names often cause confusion since these names clash with names of unrelated things in MLIR; so this change re

[mlir][sparse] Renaming "pointer/index" to "position/coordinate"

The old "pointer/index" names often cause confusion since these names clash with names of unrelated things in MLIR; so this change rectifies this by changing everything to use "position/coordinate" terminology instead.

In addition to the basic terminology, there have also been various conventions for making certain distinctions like: (1) the overall storage for coordinates in the sparse-tensor, vs the particular collection of coordinates of a given element; and (2) particular coordinates given as a `Value` or `TypedValue<MemRefType>`, vs particular coordinates given as `ValueRange` or similar. I have striven to maintain these distinctions
as follows:

* "p/c" are used for individual position/coordinate values, when there is no risk of confusion. (Just like we use "d/l" to abbreviate "dim/lvl".)

* "pos/crd" are used for individual position/coordinate values, when a longer name is helpful to avoid ambiguity or to form compound names (e.g., "parentPos"). (Just like we use "dim/lvl" when we need a longer form of "d/l".)

I have also used these forms for a handful of compound names where the old name had been using a three-letter form previously, even though a longer form would be more appropriate. I've avoided renaming these to use a longer form purely for expediency sake, since changing them would require a cascade of other renamings. They should be updated to follow the new naming scheme, but that can be done in future patches.

* "coords" is used for the complete collection of crd values associated with a single element. In the runtime library this includes both `std::vector` and raw pointer representations. In the compiler, this is used specifically for buffer variables with C++ type `Value`, `TypedValue<MemRefType>`, etc.

The bare form "coords" is discouraged, since it fails to make the dim/lvl distinction; so the compound names "dimCoords/lvlCoords" should be used instead. (Though there may exist a rare few cases where is is appropriate to be intentionally ambiguous about what coordinate-space the coords live in; in which case the bare "coords" is appropriate.)

There is seldom the need for the pos variant of this notion. In most circumstances we use the term "cursor", since the same buffer is reused for a 'moving' pos-collection.

* "dcvs/lcvs" is used in the compiler as the `ValueRange` analogue of "dimCoords/lvlCoords". (The "vs" stands for "`Value`s".) I haven't found the need for it, but "pvs" would be the obvious name for a pos-`ValueRange`.

The old "ind"-vs-"ivs" naming scheme does not seem to have been sustained in more recent code, which instead prefers other mnemonics (e.g., adding "Buf" to the end of the names for `TypeValue<MemRefType>`). I have cleaned up a lot of these to follow the "coords"-vs-"cvs" naming scheme, though haven't done an exhaustive cleanup.

* "positions/coordinates" are used for larger collections of pos/crd values; in particular, these are used when referring to the complete sparse-tensor storage components.

I also prefer to use these unabbreviated names in the documentation, unless there is some specific reason why using the abbreviated forms helps resolve ambiguity.

In addition to making this terminology change, this change also does some cleanup along the way:
* correcting the dim/lvl terminology in certain places.
* adding `const` when it requires no other code changes.
* miscellaneous cleanup that was entailed in order to make the proper distinctions. Most of these are in CodegenUtils.{h,cpp}

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D144773

show more ...


Revision tags: llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5
# c518745b 09-Nov-2022 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Making way for SparseTensorRuntime to support non-permutations

Systematically updates the SparseTensorRuntime to properly distinguish tensor-dimensions from storage-levels (and their

[mlir][sparse] Making way for SparseTensorRuntime to support non-permutations

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

show more ...


Revision tags: llvmorg-15.0.4, llvmorg-15.0.3
# 461c461a 07-Oct-2022 bixia1 <bixia@google.com>

[mlir][sparse] Rename SparseTensorFile to SparseTensorReader.

This is to prepare for adding SparseTensorWriter.

Reviewed By: wrengr

Differential Revision: https://reviews.llvm.org/D135477


Revision tags: working, llvmorg-15.0.2
# 0011c0a1 30-Sep-2022 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Renaming x-macros for better hygiene

Now that mlir_sparsetensor_utils is a public library, this differential renames the x-macros to help avoid namespace pollution issues.

Reviewed B

[mlir][sparse] Renaming x-macros for better hygiene

Now that mlir_sparsetensor_utils is a public library, this differential renames the x-macros to help avoid namespace pollution issues.

Reviewed By: aartbik, Peiming

Differential Revision: https://reviews.llvm.org/D134988

show more ...


# 329f2f10 29-Sep-2022 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] refactoring SparseTensorUtils: (3 of 4) code-cleanup

Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only e

[mlir][sparse] refactoring SparseTensorUtils: (3 of 4) code-cleanup

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

show more ...


# 0fca5c5f 29-Sep-2022 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] refactoring SparseTensorUtils: (1 of 4) file-splitting

Previously, the SparseTensorUtils.cpp library contained a C++ core implementation, but hid it in an anonymous namespace and only

[mlir][sparse] refactoring SparseTensorUtils: (1 of 4) file-splitting

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

show more ...