[PATCH] D123441: [CUDA][HIP] Fix host used external kernel in archive
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 8 21:15:16 PDT 2022
yaxunl created this revision.
yaxunl added a reviewer: tra.
Herald added a project: All.
yaxunl requested review of this revision.
For -fgpu-rdc, a host function may call an external kernel
which is defined in an archive of bitcode. Since this external
kernel is only referenced in host function, the device
bitcode does not contain reference to this external
kernel, then the linker will not try to resolve this external
kernel in the archive.
To fix this issue, host-used external kernels and device
variables are tracked. A global array containing pointers
to these external kernels and variables is emitted which
serves as an artificial references to the external kernels
and variables used by host.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5958 bytes
Desc: not available
More information about the cfe-commits