llvm-doe-org / llvm-project

The LLVM DOE Fork is a fork of upstream LLVM (https://github.com/llvm/llvm-project/) that hosts multiple DOE-funded projects. Contact information and other details for each project are described in the wiki.
https://github.com/llvm-doe-org/llvm-project/wiki/
Other
22 stars 13 forks source link

OpenMP `omp_get_accessible_buffer` extension #16

Open jdenny-ornl opened 3 years ago

jdenny-ornl commented 3 years ago

Clacc prototypes the following routine as an OpenMP extension that provides a means for OpenACC data and memory management routines to check whether data is present in shared memory or fully or partially present in device memory:

size_t omp_get_accessible_buffer(const void *ptr, size_t size, int device_num, void **buffer_host, void **buffer_device);

The initial commit is 5f3ac7d35d31. This feature might be considered for upstreaming to LLVM as described in #10. However, upstreaming should probably wait until the OpenACC specification for these routines' handling of special cases involving shared memory, etc. is further clarified. It may turn out that we need something different here or no extension at all.