[Openmp-commits] [PATCH] D149368: [MLIR][OpenMP] Initial Lowering of Declare Target for Data

Andrew Gozillon via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 20 08:29:06 PDT 2023


agozillon added a comment.

@kiranchandramohan thank you! I'll land the patch in the next couple of hours then provided no one has any further feedback or input during that time period.



================
Comment at: openmp/libomptarget/test/offloading/fortran/declare-target-array-in-target-region.f90:1
+! Offloading test with a target region mapping a declare target
+! Fortran array writing some values to it and checking the host
----------------
kiranchandramohan wrote:
> Nice test.
Thank you, it's a team effort, and it will hopefully be less convoluted to make tests in the near future after Akash's work. 

Fortran has a lot of hidden generation of variables/constants that are generated outside of the target region but used inside of it, at least for the moment, that creates some hidden implicit map dependencies unfortunately e.g. a do loop used inside of a target region will create some implicit dependencies on the index variable, and loop constants defining its range (the former you can explicitly map, the latter not so much, although perhaps there's a Fortran syntax for a do loop that can allow for it that I don't know!). It'd be reasonably easy to teach the lowering to handle it better, but it'd be an interim work around, so I think it's better to wait for @TIFitis IsolatedFromAbove work so it can be handled correctly and concisely.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149368/new/

https://reviews.llvm.org/D149368



More information about the Openmp-commits mailing list