[all-commits] [llvm/llvm-project] 6847bc: [libomptarget] Add support for target update non-c...

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Fri Nov 6 18:55:55 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6847bcec1aa9e262e2b175926d94a12fc1174c6d
      https://github.com/llvm/llvm-project/commit/6847bcec1aa9e262e2b175926d94a12fc1174c6d
  Author: cchen <chichunchen844 at gmail.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/omptarget.cpp
    A openmp/libomptarget/test/offloading/non_contiguous_update.cpp

  Log Message:
  -----------
  [libomptarget] Add support for target update non-contiguous

This patch is the runtime support for https://reviews.llvm.org/D84192.

In order not to modify the tgt_target_data_update information but still be
able to pass the extra information for non-contiguous map item (offset,
count, and stride for each dimension), this patch overload arg when
the maptype is set as OMP_TGT_MAPTYPE_DESCRIPTOR. The origin arg is for
passing the pointer information, however, the overloaded arg is an
array of descriptor_dim:

```
struct descriptor_dim {
  int64_t offset;
  int64_t count;
  int64_t stride
};
```

and the array size is the dimension size. In addition, since we
have count and stride information in descriptor_dim, we can replace/overload the
arg_size parameter by using dimension size.

Reviewed By: grokos

Differential Revision: https://reviews.llvm.org/D82245




More information about the All-commits mailing list