[Mlir-commits] [mlir] [OpenMP][MLIR] Add omp.distribute op to the OMP dialect (PR #67720)

Jan Leyonberg llvmlistbot at llvm.org
Wed Oct 4 06:31:49 PDT 2023


jsjodin wrote:

> I was only pointing out that we cannot have the OpenMP loop transformation operations at the top-level. It will have to be nested whenever we are not dealing with `omp.canonical_loop` like the case of parallel here.
> 
> The previous proposal would have looked like the following.
> 
> ```
> %cli1 = canonical_loop(%i, 1, %l) {
>    omp.parallel {
>      fir.do_loop (%j,1,%m) {
>        %cli2 = canonical_loop(%k, 1, %n) {
>        }
>        %cli3 = omp.unroll(%cli2)
>      }
>    }
> }
> %cli4 = omp.unroll(%cli1)
> ```

Yes, pushing the transform ops as far down as possible is probably the correct approach.

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


More information about the Mlir-commits mailing list