HomePhabricator

[HIP] Fix device stub name

Authored by yaxunl on Mar 5 2020, 9:59 AM.

Description

[HIP] Fix device stub name

HIP emits a device stub function for each kernel in host code.

The HIP debugger requires device stub function to have a different unmangled name as the kernel.

Currently the name of the device stub function is the mangled name with a postfix .stub. However,
this does not work with the HIP debugger since the unmangled name is the same as the kernel.

This patch adds prefix devicestub__ to the unmangled name of the device stub before mangling,
therefore the device stub function has a valid mangled name which is different than the device kernel
name. The device side kernel name is kept unchanged. kernels with extern "C" also gets the prefix added
to the corresponding device stub function.

Differential Revision: https://reviews.llvm.org/D68578

Details

Committed
yaxunlMar 9 2020, 1:40 PM
Differential Revision
D68578: [HIP] Fix device stub name
Parents
rG3262319806d7: Fix typo in gn files
Branches
Unknown
Tags
Unknown