[OpenMP] asynchronous memory copy support
authorJisheng Zhao <invalid>
Tue, 28 Mar 2023 14:32:11 +0000 (10:32 -0400)
committerJP Lehr <JanPatrick.Lehr@amd.com>
Thu, 30 Mar 2023 19:14:21 +0000 (15:14 -0400)
commit4753a4e31169800277c09a59b2181ba3d4ddd683
tree39d75a8a1f5198b9003299ca8e2a42654dd63fbd
parentf2696e469a5ca1fa3efeebef56e77507e73b5047
[OpenMP] asynchronous memory copy support

We introduced the implementation of supporting asynchronous routines with depend objects specified in Version 5.1 of the OpenMP Application Programming Interface. In brief, these routines omp_target_memcpy_async and omp_target_memcpy_rect_async perform asynchronous (nonblocking) memory copies between any
combination of host and device pointers. The basic idea is to create the implicit tasks to carry the memory copy calls and handle dependencies specified by depend objects. The implicit tasks are executed via hidden helper thread in OpenMP runtime.

Reviewed By: jdoerfert, tianshilei1992
Committed By: jplehr

Differential Revision: https://reviews.llvm.org/D136103
openmp/libomptarget/include/interop.h
openmp/libomptarget/src/api.cpp
openmp/libomptarget/src/exports
openmp/libomptarget/src/private.h
openmp/libomptarget/test/api/omp_target_memcpy_async1.c [new file with mode: 0644]
openmp/libomptarget/test/api/omp_target_memcpy_async2.c [new file with mode: 0644]
openmp/libomptarget/test/api/omp_target_memcpy_rect_async1.c [new file with mode: 0644]
openmp/libomptarget/test/api/omp_target_memcpy_rect_async2.c [new file with mode: 0644]