[Mlir-commits] [mlir] [MLIR][Linalg] Fix insert_slice fusion with rank reduction (PR #130961)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue May 20 09:09:46 PDT 2025
================
@@ -271,12 +274,17 @@ mlir::linalg::fuseProducerOfTensor(OpBuilder &b, OpResult producerOpResult,
consumerOpOperand);
// Replace use.
+ Value def = fusedProducer->getResult(producerOpResult.getResultNumber());
+ Type consumerType = consumerOpOperand.get().getType();
+ // Rank-reduction occurred as part of the extract_slice.
----------------
banach-space wrote:
[nit] ATM this comment states that something took place _before_ checking that it has indeed happened :)
```suggestion
// Check if rank-reduction occurred as part of the extract_slice. If yes, collapse the dims.
```
https://github.com/llvm/llvm-project/pull/130961
More information about the Mlir-commits
mailing list