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
41 lines
1.7 KiB
Plaintext
41 lines
1.7 KiB
Plaintext
// REQUIRES: comgr-has-spirv-translator
|
|
|
|
// COM: Build a compressed bitcode bundle for amdgcnspirv.
|
|
// COM: --offload-new-driver: SPIR-V bundling needs the new driver (old-driver
|
|
// COM: default lines bundle raw bitcode and fail the SPV check).
|
|
// RUN: %clang -c -x hip --offload-arch=amdgcnspirv \
|
|
// RUN: -nogpulib -nogpuinc -emit-llvm \
|
|
// RUN: --gpu-bundle-output --offload-device-only --offload-new-driver \
|
|
// RUN: --offload-compress \
|
|
// RUN: %s -o %t.compressed-bundle.bc
|
|
|
|
// COM: Sanity-check that the bundle is actually compressed (CCOB magic) and
|
|
// COM: that the expected entry ID is present.
|
|
// RUN: od -An -c -N 4 %t.compressed-bundle.bc | %FileCheck --check-prefix=MAGIC %s
|
|
// RUN: clang-offload-bundler --type=bc --input=%t.compressed-bundle.bc --list \
|
|
// RUN: | %FileCheck --check-prefix=ENTRY %s
|
|
|
|
// MAGIC: C C O B
|
|
// ENTRY: hip-spirv64-amd-amdhsa--amdgcnspirv
|
|
|
|
// COM: Extract the amdgcnspirv entry through Comgr. Output is a SPIR-V module
|
|
// COM: (not LLVM bitcode), so verify the SPIR-V magic word 0x07230203.
|
|
// RUN: unbundle %t.compressed-bundle.bc \
|
|
// RUN: hip-spirv64-amd-amdhsa--amdgcnspirv %t.amdgcnspirv.spv
|
|
// RUN: od -An -tx4 -N 4 %t.amdgcnspirv.spv | %FileCheck --check-prefix=SPV %s
|
|
|
|
// SPV: 07230203
|
|
|
|
// COM: Translate the unbundled SPIR-V back to LLVM IR via Comgr's translator
|
|
// COM: and verify it matches the original device source.
|
|
// RUN: spirv-translator %t.amdgcnspirv.spv -o %t.translated.bc
|
|
// RUN: %llvm-dis %t.translated.bc -o - | %FileCheck --check-prefix=BC %s
|
|
|
|
// BC: target triple = "amdgcn-amd-amdhsa"
|
|
// BC: define {{.*}} @_Z9add_valuePfS_S_
|
|
|
|
__attribute__((device))
|
|
void add_value(float* a, float* b, float* res) {
|
|
*res = *a + *b;
|
|
}
|