[Openmp-commits] [PATCH] D85246: [OpenMP] Fix `omp target update` for array extension

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Aug 4 17:40:42 PDT 2020


jdenny added a comment.

> This patch fixes `DeviceTy::getTgtPtrBegin` to return null when
> `target_data_update` is the caller. I'm wondering if it should do the
> same for more callers.

Here's an example of what I'm thinking here:

  #pragma omp target data map(tofrom:arr[0:20])
  {
    #pragma omp target exit data map(delete:arr[0:20])
    #pragma omp target enter data map(alloc:arr[10:2])
  }

The transfer at the end of the target data region currently fails.  According to my read of the spec, the transfer shouldn't even be attempted because `arr[0:20]` isn't (fully) present.  If `DeviceTy::getTgtPtrBegin` were to return null for that case too, then this problem would go away.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85246



More information about the Openmp-commits mailing list