This patch extends the libomptarget functionality in patch D14254 with support for the data sharing scheme for supporting implicitly shared variables. The runtime therefore maintains a list of references to shared variables.
Details
Diff Detail
- Repository
- rOMP OpenMP
- Build Status
Buildable 14718 Build 14718: arc lint + arc unit
Event Timeline
libomptarget/deviceRTLs/nvptx/src/interface.h | ||
---|---|---|
472–477 | Is it ok if we go with the order in this patch? |
libomptarget/deviceRTLs/nvptx/src/interface.h | ||
---|---|---|
472–477 | Great! Let's use yours then and I can change the order of the args in this patch. Can you make sure you push the other patch and then once this one lands it should all work. |
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | Yeah, I think this needs be be declared extern here and defined in omp_data.cu. |
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | Actually, all of these extern declarations should go away because they already exist in omptarget-nvptx.h! We don't need to reiterate them here... |
Looks good. Thanks for submitting! I'll take care of duplicate extern declarations in another patch.
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | I still think this won't work: If there are multiple translation units with target regions, the linker should complain about duplicate symbol definitions... I think that's why there is a separate file omp_data.cu. |
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | (obviously only when building and using the bclib which we don't yet have in trunk; but I think we shouldn't introduce the problem if we can easily avoid it) |
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | Do you have a failing example for this? Also I'm not sure what you want me to move where. The comments keep going back and forth. |
libomptarget/deviceRTLs/nvptx/src/omptarget-nvptx.cu | ||
---|---|---|
35 | Compiling and linking multiple source files with target regions should fail when using the bclib. Just move the definition (ie without extern) to omp_data.cu. (Terminology taken from https://stackoverflow.com/a/1410632) |
We have to agree on an order here: In D41012 I chose to put IsOMPRuntimeInitialized last which matches the other functions.