Hahnfeld added a comment.

In https://reviews.llvm.org/D47394#1115086, @tra wrote:

> On one hand I can see how being able to treat GPU-side binaries as any other 
> host files is convenient. On the other hand, this convenience comes with the 
> price of targeting only NVPTX. This seems contrary to OpenMP's goal of 
> supporting many different kinds of accelerators. I'm not sure what's the 
> consensus in the OpenMP community these days, but I vaguely recall that 
> generic bundling/unbundling was explicitly chosen over vendor-specific 
> encapsulation in host .o when the bundling was implemented. If the underlying 
> reasons have changed since then it would be great to hear more details about 
> that.


I second this statement, static linking might come handy for all targets and 
Clang should try to avoid vendor specific solutions as much as possible.

In a discussion off-list I proposed adding constructor functions to all object 
files and handle them like shared libraries are already handled today (ie 
register separately and let the runtime figure out how to relocate symbols in 
different translation units). I don't have an implementation of that approach 
so I can't claim that it works and doesn't have a huge performance impact 
(which we don't want either), but it should be agnostic of the offloading 
target so it may be worth investigating.


Repository:
  rC Clang

https://reviews.llvm.org/D47394



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to