[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

Michael Liao via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 09:41:57 PDT 2020


hliao added a comment.

In D85276#2200108 <https://reviews.llvm.org/D85276#2200108>, @tra wrote:

> In D85276#2199655 <https://reviews.llvm.org/D85276#2199655>, @yaxunl wrote:
>
>> Do we need to disable pgo and coverage mapping for device compilation? Or it is already disabled?
>
> We already disable profiling during device compilation for NVIDIA and AMD GPUs:
> https://github.com/llvm/llvm-project/blob/394db2259575ef3cac8d3d37836b11eb2373c435/clang/lib/Driver/ToolChains/Clang.cpp#L4876

Anyway, this patch just fixes the caused by that device stub function. As it's "emitted" in the host compilation, we need to skip generating instrumentation on it explicitly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85276



More information about the cfe-commits mailing list