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
69 lines
4.0 KiB
Common Lisp
69 lines
4.0 KiB
Common Lisp
// REQUIRES: amdgpu-registered-target
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1100 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1101 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1102 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1103 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1150 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1151 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1152 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1153 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1170 -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,GCN %s
|
|
// RUN: %clang_cc1 -triple spirv64-amd-amdhsa -emit-llvm -o - %s | FileCheck --check-prefixes=CHECK,AMDGCNSPIRV %s
|
|
|
|
typedef unsigned int uint;
|
|
typedef unsigned long ulong;
|
|
typedef uint uint2 __attribute__((ext_vector_type(2)));
|
|
typedef uint uint4 __attribute__((ext_vector_type(4)));
|
|
|
|
// CHECK-LABEL: @test_s_sendmsg_rtn(
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.s.sendmsg.rtn.i32(i32 0)
|
|
void test_s_sendmsg_rtn(global uint* out) {
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_s_sendmsg_rtn))
|
|
*out = __builtin_amdgcn_s_sendmsg_rtn(0);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_s_sendmsg_rtnl(
|
|
// CHECK: {{.*}}call{{.*}} i64 @llvm.amdgcn.s.sendmsg.rtn.i64(i32 0)
|
|
void test_s_sendmsg_rtnl(global ulong* out) {
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_s_sendmsg_rtnl))
|
|
*out = __builtin_amdgcn_s_sendmsg_rtnl(0);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_ds_bvh_stack_rtn(
|
|
// CHECK: %[[#BVH_STACK:]] = tail call{{.*}} { i32, i32 } @llvm.amdgcn.ds.bvh.stack.rtn(i32 %addr, i32 %data, <4 x i32> %data1, i32 128)
|
|
// CHECK: %[[#RET_FIRST:]] = extractvalue { i32, i32 } %[[#BVH_STACK]], 0
|
|
// CHECK: %[[#RET_SECOND:]] = extractvalue { i32, i32 } %[[#BVH_STACK]], 1
|
|
// CHECK: %[[#OUT:]] = insertelement <2 x i32> poison, i32 %[[#RET_FIRST]], i64 0
|
|
// CHECK: %{{.*}} = insertelement <2 x i32> %[[#OUT]], i32 %[[#RET_SECOND]], i64 1
|
|
void test_ds_bvh_stack_rtn(global uint2* out, uint addr, uint data, uint4 data1)
|
|
{
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_ds_bvh_stack_rtn))
|
|
*out = __builtin_amdgcn_ds_bvh_stack_rtn(addr, data, data1, 128);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_permlane64(
|
|
// CHECK: {{.*}}call{{.*}} i32 @llvm.amdgcn.permlane64.i32(i32 %a)
|
|
void test_permlane64(global uint* out, uint a) {
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_permlane64))
|
|
*out = __builtin_amdgcn_permlane64(a);
|
|
}
|
|
|
|
// CHECK-LABEL: @test_s_wait_event_export_ready
|
|
// CHECK: {{.*}}call{{.*}} void @llvm.amdgcn.s.wait.event.export.ready
|
|
void test_s_wait_event_export_ready() {
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_s_wait_event_export_ready))
|
|
__builtin_amdgcn_s_wait_event_export_ready();
|
|
}
|
|
|
|
// CHECK-LABEL: @test_global_add_f32
|
|
// GCN: = atomicrmw fadd ptr addrspace(1) %addr, float %x syncscope("agent") monotonic, align 4, !amdgpu.no.fine.grained.memory !{{[0-9]+}}, !amdgpu.ignore.denormal.mode !{{[0-9]+$}}
|
|
// AMDGCNSPIRV: = atomicrmw fadd ptr addrspace(1) %addr, float %x syncscope("device") monotonic, align 4, !amdgpu.no.fine.grained.memory !{{[0-9]+}}, !amdgpu.ignore.denormal.mode !{{[0-9]+$}}
|
|
#if !defined(__SPIRV__)
|
|
void test_global_add_f32(float *rtn, global float *addr, float x) {
|
|
#else
|
|
void test_global_add_f32(float *rtn, __attribute__((address_space(1))) float *addr, float x) {
|
|
#endif
|
|
if (__builtin_amdgcn_is_invocable(__builtin_amdgcn_global_atomic_fadd_f32))
|
|
*rtn = __builtin_amdgcn_global_atomic_fadd_f32(addr, x);
|
|
}
|