[PATCH] D68578: [HIP] Fix device stub name

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 7 09:44:10 PDT 2019


yaxunl added a comment.

In D68578#1697822 <https://reviews.llvm.org/D68578#1697822>, @tra wrote:

> Could you elaborate on how exactly current implementation does not work?
>
> I would expect the kernel and the stub to be two distinct entities, as far as debugger is concerned. It does have enough information to track each independently (different address, .stub suffix, perhaps knowledge whether it's device or host code). Without the details, it looks to me that this is something that can and should be dealt with in the debugger. I've asked the same question in D63335 <https://reviews.llvm.org/D63335> but I don't think I've got a good answer.


HIP debugger is a branch of gdb and the changes to support HIP will be upstreamed. When users set break point on a kernel, they intend to set a break point on the real kernel, not the device stub function. The device stub function is only a compiler generated helper function to help launch the kernel. Therefore it should have a different name so that it does not interfere with the symbol resolution of the real kernel.


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

https://reviews.llvm.org/D68578





More information about the cfe-commits mailing list