History log of /llvm-project/mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMap.cpp (Results 1 – 17 of 17)
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, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, 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 ...


# 1dd387e1 22-Nov-2023 Aart Bik <39774503+aartbik@users.noreply.github.com>

[mlir][sparse] change dim level type -> level type (#73058)

The "dimension" before "level" does not really make sense Note that
renaming the actual type DimLevelType to LevelType is still TBD, sinc

[mlir][sparse] change dim level type -> level type (#73058)

The "dimension" before "level" does not really make sense Note that
renaming the actual type DimLevelType to LevelType is still TBD, since
this is an externally visible change (e.g. visible to Python API).

show more ...


# 704c2247 17-Nov-2023 Yinying Li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Clean up parser (#72571)

Remove unused functions in parser.


Revision tags: llvmorg-17.0.5
# 1609f1c2 14-Nov-2023 long.chen <lipracer@gmail.com>

[mlir][affine][nfc] cleanup deprecated T.cast style functions (#71269)

detail see the docment: https://mlir.llvm.org/deprecation/

Not all changes are made manually, most of them are made through

[mlir][affine][nfc] cleanup deprecated T.cast style functions (#71269)

detail see the docment: https://mlir.llvm.org/deprecation/

Not all changes are made manually, most of them are made through a clang
tool I wrote https://github.com/lipracer/cpp-refactor.

show more ...


Revision tags: llvmorg-17.0.4
# b165650a 26-Oct-2023 Yinying Li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Return actual identity map instead of null map (#70365)

Changes:

1. For both dimToLvl and lvlToDim, always returns the actual map instead
of AffineMap() for identity map.
2. Upda

[mlir][sparse] Return actual identity map instead of null map (#70365)

Changes:

1. For both dimToLvl and lvlToDim, always returns the actual map instead
of AffineMap() for identity map.
2. Updated custom builder for encoding to have default values.
3. Non-inferable lvlToDim will still return AffineMap() during
inference, so it will be caught by verifier.

show more ...


# 34ed07e6 23-Oct-2023 Yinying Li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Parser cleanup (#69792)

Removed TODOs, FIXMEs and long notes that are more suited for design
doc.


# 7b9fb1c2 19-Oct-2023 Yinying Li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Update verifier for block sparsity and singleton (#69389)

Updates:
1. Verification of block sparsity.
2. Verification of singleton level type can only follow compressed or
loose_co

[mlir][sparse] Update verifier for block sparsity and singleton (#69389)

Updates:
1. Verification of block sparsity.
2. Verification of singleton level type can only follow compressed or
loose_compressed levels. And all level types after singleton should be
singleton.
3. Added getBlockSize function.
4. Added an invalid encoding test for an incorrect lvlToDim map that
user provides.

show more ...


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0
# c3160f86 11-Sep-2023 yinying-lisa-li <107574043+yinying-lisa-li@users.noreply.github.com>

[mlir][sparse] Fix bug in new syntax parser (#66024)

Currently, dimlvlmap with identity affine map will be treated as empty
affine map. But the new syntax would treat it as an actual identity
affi

[mlir][sparse] Fix bug in new syntax parser (#66024)

Currently, dimlvlmap with identity affine map will be treated as empty
affine map. But the new syntax would treat it as an actual identity
affine map such as {d0} -> {d0}. This mismatch could raise an error when
we are comparing sparse encodings.

show more ...


Revision tags: llvmorg-17.0.0-rc4
# 898bf539 01-Sep-2023 Yinying Li <yinyingli@google.com>

[mlir][sparse] Surface syntax change in parsing

Example: compressed(nonunique, nonordered) or compressed(nonordered, nonunique) instead of compressed_nu_no.

Reviewed By: aartbik

Differential Revis

[mlir][sparse] Surface syntax change in parsing

Example: compressed(nonunique, nonordered) or compressed(nonordered, nonunique) instead of compressed_nu_no.

Reviewed By: aartbik

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

show more ...


# f5b974b7 23-Aug-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Adding `{Var,DimLvlExpr,DimSpec,LvlSpec,DimLvlMap}::str` methods

These methods are needed for use with `Diagnostic::operator<<` etc.

The definitions follow the pattern of `Diagnostic

[mlir][sparse] Adding `{Var,DimLvlExpr,DimSpec,LvlSpec,DimLvlMap}::str` methods

These methods are needed for use with `Diagnostic::operator<<` etc.

The definitions follow the pattern of `Diagnostic::str` by simply wrapping the underlying `print(raw_ostream)` method. Although there is some overhead for constructing the `std::string`, this seems like the overall most-efficient option: since this overhead only occurs on the error path (under the current intended usage). An alternative approach would be to have one method construct a `Twine` directly, and then have the print method pass the twine to the stream; however, that would mean introducing the overhead of twine construction on the common/happy path of simply printing things out.

Reviewed By: aartbik

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

show more ...


# 78921a64 23-Aug-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Add more helper methods for converting DimLvlExpr to Var

These new methods help clean up some code for doing LvlExpr-analysis during DimExpr-inference.

Reviewed By: aartbik

Differen

[mlir][sparse] Add more helper methods for converting DimLvlExpr to Var

These new methods help clean up some code for doing LvlExpr-analysis during DimExpr-inference.

Reviewed By: aartbik

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

show more ...


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# fdbe9312 01-Aug-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Adding getters/setters to `DimLvlMap`

Depends On D156768

Reviewed By: aartbik

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


# 04959123 01-Aug-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Adding `LvlVar` forward-declarations to `DimLvlMap::print`

This commit makes `DimLvlMap::print` consistent with `DimLvlMapParser` with respect to both the forward-decls per se, as wel

[mlir][sparse] Adding `LvlVar` forward-declarations to `DimLvlMap::print`

This commit makes `DimLvlMap::print` consistent with `DimLvlMapParser` with respect to both the forward-decls per se, as well as the all-or-none constraint on LvlVar-bindings in LvlSpecs.

Reviewed By: aartbik

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

show more ...


# 3b00f448 31-Jul-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Marking off todos and updating commentary

Depends On D155999

Reviewed By: Peiming

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


# 497050c9 31-Jul-2023 wren romano <2998727+wrengr@users.noreply.github.com>

[mlir][sparse] Fixes bug in VarSet ctor

Previously, the commented out code in the `DimLvlMap` ctor would result in `VarSet::add` raising an OOB error; which should be impossible because the ctor ass

[mlir][sparse] Fixes bug in VarSet ctor

Previously, the commented out code in the `DimLvlMap` ctor would result in `VarSet::add` raising an OOB error; which should be impossible because the ctor asserted `DimLvlMap::isWF` which ensures that all variables occuring in the map are within bounds for the ranks.

The root cause of that bug was the `VarSet` ctor using `SmallBitVector::reserve` which does not actually change the size of the bitvectors (hence the subsequent OOB). This is corrected by using any of `SmallBitVector::resize`, the move-ctor, or the copy-ctor. Since the default-initialized bitvectors being modified/overwritten have size zero, there shouldn't be any significant performance difference between these three implementations.

Reviewed By: Peiming

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

show more ...


Revision tags: llvmorg-17.0.0-rc1, llvmorg-18-init
# b939c015 30-Jun-2023 Aart Bik <ajcbik@google.com>

[mlir][sparse] add affine parsing to new surface syntax for STEA

(1) uses the previously introduce API to reuse AffineExpr parser without codedup
(2) solves the look-ahead problem when parsing level

[mlir][sparse] add affine parsing to new surface syntax for STEA

(1) uses the previously introduce API to reuse AffineExpr parser without codedup
(2) solves the look-ahead problem when parsing level spec

Reviewed By: Peiming

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

show more ...


# 6b88c852 28-Jun-2023 Aart Bik <ajcbik@google.com>

[mlir][sparse] Start migration to new surface syntax for STEA

We are in the progress of migrating to a much improved surface syntax for the Sparse Tensor Encoding Attribute (STEA).

You can see a pr

[mlir][sparse] Start migration to new surface syntax for STEA

We are in the progress of migrating to a much improved surface syntax for the Sparse Tensor Encoding Attribute (STEA).

You can see a preview of this in the StableHLO RFC at

https://github.com/openxla/stablehlo/blob/main/rfcs/20230210-sparsity.md

//**This design is courtesy Wren Romano.**//

This initial revision
(1) Introduces the first version of a new parser written by Wren Romano
(2) Introduces a simple "migration plan" using NEW_SYNTAX on the STEA, which will allow us to test the new parser with new examples, as well as migrate existing examples over without the need to rewrite them all

This first "drop" merely provides the entry points to parse the new syntax. The parser is still under active development. For example, we need to address the "lookahead" issue when parsing the lvl spec (viz. do we see l0 = d0 or a direct d0). Another larger task is to actually implement "affine" parsing (since the MLIR affine parser is not accessible in other parts of the tree).

EXAMPLE:

Currently, CSR looks like

#CSR = #sparse_tensor.encoding<{
lvlTypes = ["dense","compressed"],
dimToLvl = affine_map<(i,j) -> (i,j)>
}>

but you can "force" the new parser with

#CSR = #sparse_tensor.encoding<{
NEW_SYNTAX =
(d0, d1) -> (l0 = d0 : dense, l1 = d1 : compressed)
}>

Reviewed By: Peiming

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

show more ...