[llvm] [clang] [mlir] [openmp] [OpenMP] Introduce the KernelLaunchEnvironment as implicit argument (PR #70401)

via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 19:27:42 PST 2023


dhruvachak wrote:

After https://github.com/llvm/llvm-project/pull/73864, only reduction kernels may have the additional data submit for the kernel launch environment. If you have an INFO message like in https://github.com/llvm/llvm-project/pull/74030, you will see this additional INFO message 
```
"PluginInterface" device 0 info: Copying data from host to device, HstPtr=0x00007fff40332450, TgtPtr=0x00007f46a0401000, Size=16, Name=KernelLaunchEnv
"PluginInterface" device 0 info: Launching kernel __omp_offloading_811_2ea0026_main_l19 with 416 blocks and 256 threads in SPMD mode
```

For example, using https://github.com/ROCm-Developer-Tools/aomp/blob/aomp-dev/test/smoke/reduction_teams_distribute_parallel/reduction_teams_distribute_parallel.c

```
$ clang -O2 -fopenmp --offload-arch=gfx90a reduction_teams_distribute_parallel.c -o reduction_teams_distribute_parallel
$ LIBOMPTARGET_INFO=-1 ./reduction_teams_distribute_parallel
```
@jdoerfert The above can be used as a repro.


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


More information about the cfe-commits mailing list