[PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (#93365)

This pull request is the second part of an ongoing effort to extends PGO
instrumentation to GPU device code and depends on #76587. This PR makes
the following changes:

- Introduces `__llvm_write_custom_profile` to PGO compiler-rt library.
This is an external function that can be used to write profiles with
custom data to target-specific files.
- Adds `__llvm_write_custom_profile` as weak symbol to libomptarget so
that it can write the collected data to a profraw file.
- Adds `PGODump` debug flag and only displays dump when the
aforementioned flag is set
This commit is contained in:
Ethan Luis McDonough
2025-02-11 21:30:54 -08:00
committed by GitHub
parent 84e3c6ff95
commit 9e5c136d5a
10 changed files with 209 additions and 28 deletions

View File

@@ -1522,3 +1522,4 @@ debugging features are supported.
* Enable debugging assertions in the device. ``0x01``
* Enable diagnosing common problems during offloading . ``0x4``
* Enable device malloc statistics (amdgpu only). ``0x8``
* Dump device PGO counters (only if PGO on GPU is enabled). ``0x10``