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
43 lines
1.6 KiB
Plaintext
43 lines
1.6 KiB
Plaintext
// Create compressed bitcode bundle (add --offload-compress flag)
|
|
// RUN: %clang -c -x hip --offload-arch=gfx900 --offload-arch=gfx1030 \
|
|
// RUN: -nogpulib -nogpuinc \
|
|
// RUN: --gpu-bundle-output --offload-device-only \
|
|
// RUN: -emit-llvm \
|
|
// RUN: --offload-compress \
|
|
// RUN: %s -o %t.compressed-bundle.bc
|
|
//
|
|
// Clean the cache
|
|
// RUN: rm -fr %t.cache
|
|
//
|
|
// With the cache enabled, test that we write one file to the cache
|
|
// RUN: export AMD_COMGR_CACHE=1
|
|
// RUN: export AMD_COMGR_CACHE_DIR=%t.cache
|
|
// RUN: unbundle %t.compressed-bundle.bc hip-amdgcn-amd-amdhsa-unknown-gfx900 \
|
|
// RUN: %t.cache_1.bc
|
|
// RUN: %llvm-dis %t.cache_1.bc -o - | %FileCheck --check-prefixes=BOTH,GFX9 %s
|
|
// RUN: COUNT=$(ls "%t.cache" | wc -l)
|
|
// RUN: [ 2 -eq $COUNT ]
|
|
//
|
|
// If there is a re-run, the cache contents remain the same
|
|
// RUN: unbundle %t.compressed-bundle.bc hip-amdgcn-amd-amdhsa-unknown-gfx900 \
|
|
// RUN: %t.cache_2.bc
|
|
// RUN: %llvm-dis %t.cache_2.bc -o - | %FileCheck --check-prefixes=BOTH,GFX9 %s
|
|
// RUN: COUNT=$(ls "%t.cache" | wc -l)
|
|
// RUN: [ 2 -eq $COUNT ]
|
|
//
|
|
// A run with different input options results in new contents in the cache
|
|
// RUN: unbundle %t.compressed-bundle.bc hip-amdgcn-amd-amdhsa-unknown-gfx1030 \
|
|
// RUN: %t.cache_3.bc
|
|
// RUN: %llvm-dis %t.cache_3.bc -o - | %FileCheck --check-prefixes=BOTH,GFX10 %s
|
|
// RUN: COUNT=$(ls "%t.cache" | wc -l)
|
|
// RUN: [ 3 -eq $COUNT ]
|
|
|
|
// BOTH: target triple = "amdgcn-amd-amdhsa"
|
|
// GFX9: "target-cpu"="gfx900"
|
|
// GFX10: "target-cpu"="gfx1030"
|
|
|
|
__attribute__((device))
|
|
void add_value(float* a, float* b, float* res) {
|
|
*res = *a + *b;
|
|
}
|