summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/SparseTensor/Transforms/SparseIterationToScf.cpp
AgeCommit message (Collapse)Author
2025-07-25[mlir][NFC] update `mlir/Dialect` create APIs (33/n) (#150659)Maksim Levental
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-07-22[mlir][NFC] update `mlir/Dialect` create APIs (21/n) (#149928)Maksim Levental
See https://github.com/llvm/llvm-project/pull/147168 for more info.
2025-04-15[NFC] Fix destroy typo. (#135640)Connector Switch
2025-03-17[mlir] Use `getSingleElement`/`hasSingleElement` in various places (#131460)Matthias Springer
This is a code cleanup. Update a few places in MLIR that should use `hasSingleElement`/`getSingleElement`. Note: `hasSingleElement` is faster than `.getSize() == 1` when it is used with linked lists etc. Depends on #131508.
2024-12-27[mlir][sparse_tensor] Migrate `SparseIterationToScf.cpp` to dialect ↵Matthias Springer
conversion (#121054) Use the regular dialect conversion driver instead of the 1:N dialect conversion driver. The 1:N dialect conversion driver will be removed soon.
2024-10-23[mlir][Transforms] Dialect Conversion: Simplify materialization fn result ↵Matthias Springer
type (#113031) This commit simplifies the result type of materialization functions. Previously: `std::optional<Value>` Now: `Value` The previous implementation allowed 3 possible return values: - Non-null value: The materialization function produced a valid materialization. - `std::nullopt`: The materialization function failed, but another materialization can be attempted. - `Value()`: The materialization failed and so should the dialect conversion. (Previously: Dialect conversion can roll back.) This commit removes the last variant. It is not particularly useful because the dialect conversion will fail anyway if all other materialization functions produced `std::nullopt`. Furthermore, in contrast to type conversions, at least one materialization callback is expected to succeed. In case of a failing type conversion, the current dialect conversion can roll back and try a different pattern. This also used to be the case for materializations, but that functionality was removed with #107109: failed materializations can no longer trigger a rollback. (They can just make the entire dialect conversion fail without rollback.) With this in mind, it is even less useful to have an additional error state for materialization functions. This commit is in preparation of merging the 1:1 and 1:N type converters. Target materializations will have to return multiple values instead of a single one. With this commit, we can keep the API simple: `SmallVector<Value>` instead of `std::optional<SmallVector<Value>>`. Note for LLVM integration: All 1:1 materializations should return `Value` instead of `std::optional<Value>`. Instead of `std::nullopt` return `Value()`.
2024-10-05[mlir][NFC] Mark type converter in `populate...` functions as `const` (#111250)Matthias Springer
This commit marks the type converter in `populate...` functions as `const`. This is useful for debugging. Patterns already take a `const` type converter. However, some `populate...` functions do not only add new patterns, but also add additional type conversion rules. That makes it difficult to find the place where a type conversion was added in the code base. With this change, all `populate...` functions that only populate pattern now have a `const` type converter. Programmers can then conclude from the function signature that these functions do not register any new type conversion rules. Also some minor cleanups around the 1:N dialect conversion infrastructure, which did not always pass the type converter as a `const` object internally.
2024-08-23[mlir][sparse] unify block arguments order between iterate/coiterate ↵Peiming Liu
operations. (#105567)
2024-08-23[mlir][sparse] refactoring sparse_tensor.iterate lowering pattern ↵Peiming Liu
implementation. (#105566)
2024-08-23[mlir][sparse] partially support lowering sparse coiteration loops to ↵Peiming Liu
scf.while/for. (#105565)
2024-07-31[mlir][sparse] implement `sparse_tensor.extract_value` operation. (#101220)Peiming Liu
2024-06-17[mlir][sparse] support sparsifying sparse kernels to sparse-iterator-based ↵Peiming Liu
loop (#95858)
2024-06-17Reapply "[mlir][sparse] implement lowering rules for IterateOp." (#95836)Peiming Liu
2024-06-17Revert "[mlir][sparse] implement lowering rules for IterateOp." (#95826)Peiming Liu
Reverts llvm/llvm-project#95286
2024-06-17[mlir][sparse] implement lowering rules for IterateOp. (#95286)Peiming Liu
2024-06-12[mlir][sparse] implement lowering rules for ExtractIterSpaceOp. (#89143)Peiming Liu
**DO NOT MERGE** until https://github.com/llvm/llvm-project/pull/89003