[Openmp-commits] [PATCH] D60884: [OpenMP][libomptarget] Enable usage of unified memory for declare target link variables

Gheorghe-Teodor Bercea via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Jun 3 12:04:17 PDT 2019


gtbercea marked an inline comment as done.
gtbercea added inline comments.


================
Comment at: libomptarget/plugins/exports:5
     __tgt_rtl_number_of_devices;
+    __tgt_rtl_init_requires;
     __tgt_rtl_init_device;
----------------
gtbercea wrote:
> grokos wrote:
> > gtbercea wrote:
> > > grokos wrote:
> > > > One last question because I'm not very familiar with exporting symbols. If a plugin does not implement `__tgt_rtl_init_requires` (as is the case with generic-elf-64), will there be any problem with exporting the symbol?
> > > Supporting that method is optional so the function will not get called in that case. In the next chunk of added code you can see that the call to the init_requires() function is guarded:
> > > 
> > > 
> > > ```
> > > if (RTL->init_requires)
> > >     RTL->init_requires(RTLRequiresFlags);
> > > ```
> > My question was different. I meant, while building `libomptarget.rtl.x86_64.so` the linker is instructed to export a specific symbol from the exports list but this symbol is not defined in that plugin. Will the linker complain about the missing symbol or just ignore it? I suspect it's the latter, but I just want to make sure.
> I've never run into that particular issue so I suspect it is ignored.
I commented our the method for the cuda plugin and I didn't get any link errors so it just gets ignored.


Repository:
  rOMP OpenMP

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60884/new/

https://reviews.llvm.org/D60884





More information about the Openmp-commits mailing list