[Mlir-commits] [mlir] [mlir][scf] Add `ReturnLike` to `scf::InParallelOp` (PR #148237)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Sat Jul 12 23:44:22 PDT 2025
ftynse wrote:
> The proper fix to this whole situation, (IMO) is to add a second region to scf.forall and do the in parallel computations there for tensors, then RegionBranchTerminatorOpInterface can always apply. But that's a large breaking change specially for testing, so I'm trying to figure out ways to keep the changes small, and this was my choice among a set of bad choices (I'm open to hear alternatives) as a first step, as it fixes the easy half of the problem (the buffer case).
This sounds like a good idea, but you'll have to forward values from one region to another. For testing, we can follow what I suggested on another thread and have a custom version of `mlir-opt` that accepts the previous syntax/structure and prints the new structure. Doing it with commented-out FileCheck lines is a bit tricky though.
> Now, outside of this patch I would argue that control-flow semantics (outside blocks) in MLIR are somewhat broken, as this is not the first time I encounter a situation like this. But that's a larger conversation and out of scope for this patch.
This is something that can be raised to the forums. I know the modeling is quite limited, but I don't know whether is broken.
https://github.com/llvm/llvm-project/pull/148237
More information about the Mlir-commits
mailing list