Hierarchical/nested offloading to target devices possible?

Dear all,

as far as I know, there is a concept of hierarchical offloading in OpenMP 5, and there is also support for “nested declare target” in LLVM ⚙ D51378 [OPENMP] Add support for nested 'declare target' directives

To my understanding, this would enable me to offload from a host to an accelerator A, and while in the target region on accelerator A, do a second offload to accelerator B. So roughly, I thought that the following would be possible:


  #prama omp target

    #pragma omp target

Did I understand the concept correctly, and is this possible with the current LLVM OpenMP implementation in libomptarget? I did not find examples on this topic and tried out code similar to the above but did not succeed yet.

Any hints would be greatly appreciated.

Best regards,

Kai Plociennik