5 Commits

Author SHA1 Message Date
Martin Erhart
ba727ac219
[mlir][bufferization][scf] Implement BufferDeallocationOpInterface for scf.reduce.return (#66886)
This is necessary to run the new buffer deallocation pipeline as part of
the sparse compiler pipeline.
2023-09-20 14:19:13 +02:00
Martin Erhart
522c1d0eea
[mlir][gpu][bufferization] Implement BufferDeallocationOpInterface for gpu.terminator (#66880)
This is necessary to support deallocation of IR with gpu.launch
operations because it does not implement the RegionBranchOpInterface.
Implementing the interface would require it to support regions with
unstructured control flow and produced arguments/results.
2023-09-20 12:28:28 +02:00
Martin Erhart
66aa9a2517
[mlir][bufferization] Implement BufferDeallocationopInterface for scf.forall.in_parallel (#66351)
The scf.forall.in_parallel terminator operation has a nested graph region with the NoTerminator trait. Such regions are not supported by the default implementations. Therefore, this commit adds a specialized implementation for
this operation which only covers the case where the nested region is empty.
This is because after bufferization, ops like tensor.parallel_insert_slice were already converted to memref operations residing int the scf.forall only and the nested region of scf.forall.in_parallel ends up empty.
2023-09-14 16:20:24 +02:00
Martin Erhart
ccb16acd46 Revert "[mlir][bufferization] Implement BufferDeallocationopInterface for scf.forall.in_parallel"
This reverts commit 1356e853d47723c1be6eee2368d95c514a1816d1.

This caused problems in downstream projects. We are reverting to give
them more time for integration.
2023-09-13 13:53:47 +00:00
Martin Erhart
1356e853d4 [mlir][bufferization] Implement BufferDeallocationopInterface for scf.forall.in_parallel
The scf.forall.in_parallel terminator operation has a nested graph region with
the NoTerminator trait. Such regions are not supported by the default
implementations. Therefore, this commit adds a specialized implementation for
this operation which only covers the case where the nested region is empty.
This is because after bufferization, ops like tensor.parallel_insert_slice were
already converted to memref operations residing int the scf.forall only and the
nested region of scf.forall.in_parallel ends up empty.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D158979
2023-09-13 09:30:24 +00:00