summaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/SparseTensor/Transforms/Utils/LoopEmitter.cpp
AgeCommit message (Collapse)Author
2025-10-16[mlir] Replace LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]] (NFC) (#163703)Kazu Hirata
This patch replaces LLVM_ATTRIBUTE_UNUSED with [[maybe_unused]], introduced as part of C++17.
2025-09-29[MLIR] Apply clang-tidy fixes for modernize-use-emplace in LoopEmitter.cpp (NFC)Mehdi Amini
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-07-12[mlir] Remove unused includes (NFC) (#148396)Kazu Hirata
2025-06-26[mlir] Use llvm::is_contained instead of llvm::all_of (NFC) (#145845)Kazu Hirata
llvm::is_contained is shorter than llvm::all_of plus a lambda.
2025-05-22[mlir] Use llvm::stable_sort (NFC) (#141186)Kazu Hirata
2025-05-14[mlir][bufferization][NFC] Rename to_memref to to_buffer (#137180)Andrei Golubev
As part of the work on transitioning bufferization dialect, ops, and associated logic to operate on newly added type interfaces (see 00eaff3e9c897c263a879416d0f151d7ca7eeaff), rename the bufferization.to_memref to highlight the generic nature of the op. Bufferization process produces buffers while memref is a builtin type rather than a generic term. Preserve the current API (to_buffer still produces a memref), however, as the new type interfaces are not used yet.
2025-05-06[mlir] Remove unused local variables (NFC) (#138642)Kazu Hirata
2025-04-18[mlir] Use llvm::less_first (NFC) (#136398)Kazu Hirata
2024-12-21[Dialect] Migrate away from PointerUnion::{is,get} (NFC) (#120818)Kazu Hirata
Note that PointerUnion::{is,get} have been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> I'm not touching PointerUnion::dyn_cast for now because it's a bit complicated; we could blindly migrate it to dyn_cast_if_present, but we should probably use dyn_cast when the operand is known to be non-null.
2024-08-23[mlir][sparse] partially support lowering sparse coiteration loops to ↵Peiming Liu
scf.while/for. (#105565)
2024-08-20[mlir][sparse] support sparsification to coiterate operations. (#102546)Peiming Liu
2024-06-17[mlir][sparse] support sparsifying sparse kernels to sparse-iterator-based ↵Peiming Liu
loop (#95858)
2024-06-18[MLIR] Fix an assert that contains a mistake in conditional operator (#95668)Shivam Gupta
This is described in (N2) https://pvs-studio.com/en/blog/posts/cpp/1126/ so caught by the PVS Studio analyzer. Warning message - V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '+' operator. LoopEmitter.cpp 983 V502 Perhaps the '?:' operator works in a different way than it was expected. The '?:' operator has a lower priority than the '+' operator. LoopEmitter.cpp 1039 The assert should be assert(bArgs.size() == reduc.size() + (needsUniv ? 1 : 0)); since + has higher precedence and ? has lower. This further can be reduce to assert(aArgs.size() == reduc.size() + needsUniv); because needUniv is a bool value which is implicitly converted to 0 or
2024-06-02Use llvm::less_first (NFC) (#94136)Kazu Hirata
2024-04-30[mlir][sparse] handle padding on sparse levels. (#90527)Peiming Liu
2024-02-28[mlir][sparse] code cleanup (using inferred type to construct to_[buf… ↵Peiming Liu
(#83361) …fer] op).
2024-02-08[mlir][sparse] using non-static field to avoid data races. (#81165)Peiming Liu
2024-02-02[mlir][sparse] support sparse dilated convolution. (#80470)Peiming Liu
2024-02-01[mlir][sparse] Support pretty print to debug sparse iteration. (#80207)Peiming Liu
2024-01-25[mlir][sparse] fix error when convolution stride is applied on a dens… ↵Peiming Liu
(#79521) …e level.
2024-01-25[mlir][sparse] fix mismatch between `enter/exitWhileLoop` (#79493)Peiming Liu
2024-01-24[mlir][sparse] setup `SparseIterator` to help generating code to traverse a ↵Peiming Liu
sparse tensor level. (#78345)
2024-01-17[mlir][IR] Rename "update root" to "modify op" in rewriter API (#78260)Matthias Springer
This commit renames 4 pattern rewriter API functions: * `updateRootInPlace` -> `modifyOpInPlace` * `startRootUpdate` -> `startOpModification` * `finalizeRootUpdate` -> `finalizeOpModification` * `cancelRootUpdate` -> `cancelOpModification` The term "root" is a misnomer. The root is the op that a rewrite pattern matches against (https://mlir.llvm.org/docs/PatternRewriter/#root-operation-name-optional). A rewriter must be notified of all in-place op modifications, not just in-place modifications of the root (https://mlir.llvm.org/docs/PatternRewriter/#pattern-rewriter). The old function names were confusing and have contributed to various broken rewrite patterns. Note: The new function names use the term "modify" instead of "update" for consistency with the `RewriterBase::Listener` terminology (`notifyOperationModified`).
2023-12-20[mlir][sparse] initialize slice-driven loop-related fields in one place (#76099)Peiming Liu
2023-12-20[mlir][SCF] `scf.parallel`: Make reductions part of the terminator (#75314)Matthias Springer
This commit makes reductions part of the terminator. Instead of `scf.yield`, `scf.reduce` now terminates the body of `scf.parallel` ops. `scf.reduce` may contain an arbitrary number of reductions, with one region per reduction. Example: ```mlir %init = arith.constant 0.0 : f32 %r:2 = scf.parallel (%iv) = (%lb) to (%ub) step (%step) init (%init, %init) -> f32, f32 { %elem_to_reduce1 = load %buffer1[%iv] : memref<100xf32> %elem_to_reduce2 = load %buffer2[%iv] : memref<100xf32> scf.reduce(%elem_to_reduce1, %elem_to_reduce2 : f32, f32) { ^bb0(%lhs : f32, %rhs: f32): %res = arith.addf %lhs, %rhs : f32 scf.reduce.return %res : f32 }, { ^bb0(%lhs : f32, %rhs: f32): %res = arith.mulf %lhs, %rhs : f32 scf.reduce.return %res : f32 } } ``` `scf.reduce` operations can no longer be interleaved with other ops in the body of `scf.parallel`. This simplifies the op and makes it possible to assign the `RecursiveMemoryEffects` trait to `scf.reduce`. (This was not possible before because the op was not a terminator, causing the op to be DCE'd.)
2023-12-15[mlir][sparse] support loop range query using SparseTensorLevel. (#75670)Peiming Liu
2023-12-15[mlir][sparse] set up the skeleton for SparseTensorLevel abstraction. (#75645)Peiming Liu
Note that at the current moment, the newly-introduced `SparseTensorLevel` classes are far from complete, we plan to migrate code generation related to accessing sparse tensor levels to these classes in the near future to simplify `LoopEmitter`.
2023-12-15[NFC][mlir][sparse] remove redundant parameter. (#75551)Peiming Liu
2023-12-12[mlir][sparse] refactor utilities into transform/utils dir (#75250)Aart Bik
Separates actual transformation files from supporting utility files in the transforms directory. Includes a bazel overlay fix for the build (as well as a bit of cleanup of that file to be less verbose and more flexible).