CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
81 lines
2.3 KiB
C
81 lines
2.3 KiB
C
// RUN: %libomptarget-compile-generic -fcreate-profile \
|
|
// RUN: -Xarch_device -fprofile-generate
|
|
// RUN: env LLVM_PROFILE_FILE=%basename_t.llvm.profraw \
|
|
// RUN: %libomptarget-run-generic 2>&1
|
|
// RUN: %profdata show --all-functions --counts \
|
|
// RUN: %target_triple.%basename_t.llvm.profraw | \
|
|
// RUN: %fcheck-generic --check-prefix="LLVM-PGO"
|
|
|
|
// RUN: %libomptarget-compile-generic -fcreate-profile \
|
|
// RUN: -Xarch_device -fprofile-instr-generate
|
|
// RUN: env LLVM_PROFILE_FILE=%basename_t.clang.profraw \
|
|
// RUN: %libomptarget-run-generic 2>&1
|
|
// RUN: %profdata show --all-functions --counts \
|
|
// RUN: %target_triple.%basename_t.clang.profraw | \
|
|
// RUN: %fcheck-generic --check-prefix="CLANG-PGO"
|
|
|
|
// REQUIRES: amdgpu
|
|
// REQUIRES: pgo
|
|
|
|
int test1(int a) { return a / 2; }
|
|
int test2(int a) { return a * 2; }
|
|
|
|
int main() {
|
|
int m = 2;
|
|
#pragma omp target
|
|
{
|
|
for (int i = 0; i < 10; i++) {
|
|
m = test1(m);
|
|
for (int j = 0; j < 2; j++) {
|
|
m = test2(m);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
// LLVM-PGO-LABEL: __omp_offloading_{{[_0-9a-zA-Z]*}}_main_{{[_0-9a-zA-Z]*}}:
|
|
// LLVM-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// LLVM-PGO: Counters: 4
|
|
// LLVM-PGO: Block counts: [20, 10, {{.*}}, 1]
|
|
|
|
// LLVM-PGO-LABEL: test1:
|
|
// LLVM-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// LLVM-PGO: Counters: 1
|
|
// LLVM-PGO: Block counts: [10]
|
|
|
|
// LLVM-PGO-LABEL: test2:
|
|
// LLVM-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// LLVM-PGO: Counters: 1
|
|
// LLVM-PGO: Block counts: [20]
|
|
|
|
// LLVM-PGO-LABEL: Instrumentation level:
|
|
// LLVM-PGO-SAME: IR
|
|
// LLVM-PGO-SAME: entry_first = 0
|
|
// LLVM-PGO-LABEL: Functions shown:
|
|
// LLVM-PGO-SAME: 3
|
|
// LLVM-PGO-LABEL: Maximum function count:
|
|
// LLVM-PGO-SAME: 20
|
|
|
|
// CLANG-PGO-LABEL: __omp_offloading_{{[_0-9a-zA-Z]*}}_main_{{[_0-9a-zA-Z]*}}:
|
|
// CLANG-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// CLANG-PGO: Block counts: [10, 20]
|
|
|
|
// CLANG-PGO-LABEL: test1:
|
|
// CLANG-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// CLANG-PGO: Counters: 1
|
|
// CLANG-PGO: Function count: 10
|
|
// CLANG-PGO: Block counts: []
|
|
|
|
// CLANG-PGO-LABEL: test2:
|
|
// CLANG-PGO: Hash: {{0[xX][0-9a-fA-F]+}}
|
|
// CLANG-PGO: Counters: 1
|
|
// CLANG-PGO: Function count: 20
|
|
// CLANG-PGO: Block counts: []
|
|
|
|
// CLANG-PGO-LABEL: Instrumentation level:
|
|
// CLANG-PGO-SAME: Front-end
|
|
// CLANG-PGO-LABEL: Functions shown:
|
|
// CLANG-PGO-SAME: 3
|
|
// CLANG-PGO-LABEL: Maximum internal block count:
|
|
// CLANG-PGO-SAME: 20
|