Artem-B wrote:

> I'm assuming you're talking about GPU-side constructors? I don't think the 
> CUDA runtime supports those, but OpenMP runs them when the image is loaded, 
> so it would handle both independantly.

Yes. I'm thinking of the expectations from a C++ user standpoint, and this is 
one of the areas where there will be observable differences. First, because 
there will be subsets of the code that are no longer part of the main GPU-side 
executable. Second, the side effects of the initializers will be different 
depending on whether we do link such subsets separately or not. E.g. the 
initializer call order will change. The global state changes in one subset will 
not be visible in the other. Weak symbol resolution will produce different 
results. Etc.

> The idea is that users already get C++-like behavior with the new driver and 
> -fgpu-rdc generally

Yes. That will set the default expectations that things work just like in C++, 
which is a great thing. But introduction of partial subset linking will break 
some of those "just works" assumptions and it may be triggered by the parts of 
the build  outside of user's control (e.g. by a third-party library). 

Side note: we do need a good term for this kind of subset linking. "partial 
linking" already has established meaning and it's not a good fit here as we 
actually produce a fully linked GPU executable.

> we don't need to worry about people being confused so long as we document 
> what it does.

We do need to document how it works. Documenting what does not work, or works 
differently is also important, IMO. 
We *do* need to worry about users and their expectations. 




https://github.com/llvm/llvm-project/pull/80066
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to