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

Chi-Chun, Chen via All-commits all-commits at lists.llvm.org
Thu Nov 19 09:33:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7036fe8a0cffcefaa542f6dde756b7aa2f9c91b5
      https://github.com/llvm/llvm-project/commit/7036fe8a0cffcefaa542f6dde756b7aa2f9c91b5
  Author: cchen <chichunchen844 at gmail.com>
  Date:   2020-11-19 (Thu, 19 Nov 2020)

  Changed paths:
    M openmp/libomptarget/include/omptarget.h
    M openmp/libomptarget/src/device.cpp
    M openmp/libomptarget/src/interface.cpp
    M openmp/libomptarget/src/omptarget.cpp
    M openmp/libomptarget/src/private.h
    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, tianshilei1992

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




More information about the All-commits mailing list