[Openmp-commits] [PATCH] D65340: [OpenMP][libomptarget] Add support for close map modifier

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 6 08:11:52 PDT 2019


Hahnfeld added a comment.

In D65340#1616943 <https://reviews.llvm.org/D65340#1616943>, @gtbercea wrote:

> In D65340#1616793 <https://reviews.llvm.org/D65340#1616793>, @Hahnfeld wrote:
>
> > The test will currently fail with older versions of Clang. It must at least be marked `UNSUPPORTED` for Clang versions older than what-will-be Clang 10.
> >
> > Additionally, I'd still like to see a small test with manual calls to `__tgt_target_data_begin` / `_end` if possible. I'm thinking of the following:
> >
> >   int *a = // malloc
> >   int *device;
> >  
> >   __tgt_target_data_begin(...); // with close modifier for a
> >   #pragma omp target data use_device_ptr(a)
> >   {
> >     device = a;
> >   }
> >   __tgt_target_data_end(...); // correspondingly to the begin call above
> >  
> >   // check...
> >
> >
> > Instead of the nested `target data` region, you could also use a simple `target` region in the outer data region, and have a check for `use_device_ptr` in another test.
>
>
> I don't mind adding such a test but calling these functions manually is very tedious and error prone and hard to maintain. Are there any benefits I'm missing to this apart from running this test in isolation?


It adds coverage with older compiler versions. If it's too complicated, I'm also fine with adding a check for `use_device_ptr` and restrict the test with `close` modifier to newer versions of Clang, up to you.


Repository:
  rOMP OpenMP

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

https://reviews.llvm.org/D65340





More information about the Openmp-commits mailing list