<div dir="ltr"><div>Hi Friends, hope you all are cool and safe. </div><div><br></div>We are experimenting with the libomptarget library to directly use with source code. I read <a href="https://reviews.llvm.org/D64943">https://reviews.llvm.org/D64943</a> about how to create a fat binary using clang-offload-wrapper utility. Given a CUDA program, I am able to create a source file for what the clang-offload-wrapper can produce. I however am not sure what to initialize the <span style="color:rgb(106,115,125);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">__start_omp_offloading_entries</span> and <span style="color:rgb(106,115,125);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace;font-size:12px;white-space:pre">__stop_omp_offloading_entries </span>symbols. They are implicitly created by the linker when linking and creating the omp_offloading_entries section. What I am not sure are what is the purpose of the offload entry table and what could be put in the entry table by the compiler/linker (the content of the omp_offloading_entries section)? From what I read of the libomptarget design document, it seems they are used to store global variables and functions that could be mapped to devices and they are used at the runtime to help the mapping. How far of my understanding is to what it really is?<div><br></div><div>For example, for the following axpy omp offloading, what could be put in the offloading entry table? I built the program and did an objdump to see the content of the section, but not much clue what they are. </div><div><br></div><div>void axpy(int N, float *Y, float *X, float a) {<br>   int i,j;<br>   #pragma omp target map(to:X[0:N], N) map(tofrom:Y[0:N])<br>   #pragma omp parallel for<br>   for (i = 0; i < N; ++i) {<br>        Y[i] += a * X[i];<br>   }<br>}<br><br></div><div>Thank you</div><div>Yonghong</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div><div dir="ltr"><div dir="ltr"><p style="font-size:12.8px"></p></div><div dir="ltr"></div></div></div></div></div></div></div></div></div></div></div>