[Openmp-commits] [clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

Joel E. Denny via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 2 08:17:41 PDT 2024


================
@@ -1,12 +1,17 @@
-// RUN: %libomptarget-compile-generic -fprofile-instr-generate \
-// RUN:     -Xclang "-fprofile-instrument=clang"
-// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \
-// RUN:     --check-prefix="CLANG-PGO"
 // RUN: %libomptarget-compile-generic -fprofile-generate \
 // RUN:     -Xclang "-fprofile-instrument=llvm"
-// RUN: %libomptarget-run-generic 2>&1 | %fcheck-generic \
+// RUN: env LLVM_PROFILE_FILE=llvm.profraw %libomptarget-run-generic 2>&1
+// RUN: llvm-profdata show --all-functions --counts \
----------------
jdenny-ornl wrote:

We should probably have a substitution that locates the llvm-profdata from the build.  On a test system I use, the above instead picks up rocm's llvm-profdata and reports:

```
error: amdgcn-amd-amdhsa.llvm.profraw: unsupported instrumentation profile format version
```

https://github.com/llvm/llvm-project/pull/93365


More information about the Openmp-commits mailing list