clangopenmpllvmnvidiaoffloading

Memory Mapping in Clang OpenMP offloading to GPU


I have some questions related to OpenMP offloading in clang.

1.When clang offloads a certain code segment to a NVIDIA GPU how the data will be mapped to the GPU?

2.How it will decide which data to be mapped to the "shared memory" region in NVIDIA GPU?

3.Will the constants in the code segment be mapped to the constant memory in GPU?

I tried to find answers for these question but i couldn't find any reference. Thanks in advance.


Solution

    1. Too general question, please clarify it.
    2. clang-ykt tries to use shared memory at first, when the compiler see that the preallocated buffer is completely used, it uses the global memory. Clang trunk currently uses only the global memory.
    3. No