This is an archive of the discontinued LLVM Phabricator instance.

[HIP] Add option --gpu-instrument-lib=
ClosedPublic

Authored by yaxunl on Sep 30 2020, 5:05 AM.

Details

Summary

Add an option --gpu-instrument-lib= to allow users to specify
an instrument device library. This is for supporting -finstrument
in device code for debugging/profiling tools.

Diff Detail

Event Timeline

yaxunl created this revision.Sep 30 2020, 5:05 AM
yaxunl requested review of this revision.Sep 30 2020, 5:05 AM
tra accepted this revision.Sep 30 2020, 9:30 AM

Perhaps we should start thinking of shipping some of that bitcode along with clang.
Then the instrumentation library could be linked with automatically by the driver when -finstrument is specified.
We already need bitcode for the math library for both NVPTX and AMDGPU and will likely need more for other things that depend on things that are standard on the host.

This revision is now accepted and ready to land.Sep 30 2020, 9:30 AM
In D88557#2303891, @tra wrote:

Perhaps we should start thinking of shipping some of that bitcode along with clang.
Then the instrumentation library could be linked with automatically by the driver when -finstrument is specified.
We already need bitcode for the math library for both NVPTX and AMDGPU and will likely need more for other things that depend on things that are standard on the host.

Right

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2020, 6:18 PM