[Mlir-commits] [mlir] [mlir][vector] Add support for yielding loop bounds in `scf.for` distribution. (PR #163443)

Charitha Saumya llvmlistbot at llvm.org
Wed Oct 15 09:40:08 PDT 2025


charithaintc wrote:

> > but unfortunately that does not help us here.
> 
> So the test fails if the loop op references `%bound` directly:
> 
> ```
> func.func @warp_scf_for_local_loop_bounds(%arg0: index, %bound: index) {
> ...
>   %0 = gpu.warp_execute_on_lane_0(%arg0)[32] -> (vector<4xf32>) {
>     %ini = "some_def"() : () -> (vector<128xf32>)
>     %3 = scf.for %arg3 = %c0 to %bound step %c1 iter_args(%arg4 = %ini) -> (vector<128xf32>) {
> ```
> 
> ?

no. only if the %bound is a warp of arg, it will fail. I guess it is sensitive to pattern application ordering. but with this fix all the loop op arguments are yielded regardless of their nature. So it should always work. 

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


More information about the Mlir-commits mailing list