[PATCH] D53153: [OpenCL] Mark kernel functions with default visibility

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 30 12:17:47 PST 2018


yaxunl added a comment.

In D53153#1315039 <https://reviews.llvm.org/D53153#1315039>, @scott.linder wrote:

> In D53153#1314798 <https://reviews.llvm.org/D53153#1314798>, @rjmccall wrote:
>
> > You still have the same linkage model for those other languages, right?  Ultimately there's something like a kernel function that has to be declared specially and which becomes the only public interface of the code?
>
>
> I don't think this is true for all languages targeting AMDGPU. For example, HIP has APIs like `hipMemcpyToSymbol` which accept a string identifying a symbol for a variable in global/constant address space. @yaxunl is my understanding about the HIP runtime requiring dynamic symbols for global variables correct here?


Right. There is also hipGetSymbolAddress which returns address of a global variable in device memory given the name of the variable. Therefore we cannot hide the global variables.


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

https://reviews.llvm.org/D53153





More information about the cfe-commits mailing list