[PATCH] D63335: [HIP] Change kernel stub name again

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 14 14:19:31 PDT 2019


tra added a comment.

In D63335#1544026 <https://reviews.llvm.org/D63335#1544026>, @hliao wrote:

> Is it OK for us to mangle `__device_stub __` as the nested name into the original one, says, we prepend `_ZN15__device_stub__E`, so that we have `_ZN15__device_stub__E10kernelfuncIiEvv`
>
> and
>
>   $ c++filt _ZN15__device_stub__E10kernelfuncIiEvv
>   __device_stub__(kernelfunc<int>, void, void)
>


I don't think it's a good idea. While it demangles to something, it's not what the demangled name should be. Stub's signature should match that of the kernel.

In D63335#1544021 <https://reviews.llvm.org/D63335#1544021>, @hliao wrote:

> Yeah, I understand that un-demangleable name causes lots of frustration. But, based on what I learned, CUDA generated the similar thing, e.g. `__device_stub__Z15transformKernelPfiif` is the stub function from cuda 10.1


NVCC does a lot of things differently. It does not mean it's a good reason for us to copy *all* of their choices.
Let's figure out the underlying reasons for this change and then we can figure out about what's the right thing to do here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63335





More information about the cfe-commits mailing list