[Mlir-commits] [mlir] [mlir] Implement DestinationStyleOpInterface for scf::ForallOp (PR #66981)

Felix Schneider llvmlistbot at llvm.org
Thu Sep 21 12:41:43 PDT 2023


ubfx wrote:

> given the dependence issue can you comment a bit more on the motivation for this change?

My original idea was to implement `ValueBoundsOpInterface` for `scf::ForallOp` because the result shapes are coupled to the `shared_outs` shapes which offers a nice opportunity to propagate shape constraints through loop nests. Matthias mentioned that he had recently implemented shape propagation through DPS ops (https://github.com/llvm/llvm-project/pull/65736) and so implementing the DPS interface for `scf::ForallOp` would also take care of that.

Additionally, I think `forall` matches the DPS contract very well - and the language `shared_outs` already matches the DPS language (`outs`), so it would be consistent to make it an actual DPS op. But I am unsure whether it would lead to any other improvements regarding bufferization down the line.

One caveat about the `ValueBoundsOpInterface`: Since the `ForallOp` also has iteration variables which might get queried through the interface, we might still need an additional implementation of that interface, even when this change goes through.

https://github.com/llvm/llvm-project/pull/66981


More information about the Mlir-commits mailing list