Files
TheRock/compiler/spirv-llvm-translator/test/transcoding/clk_event_t.cl
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

49 lines
2.4 KiB
Common Lisp

// RUN: %clang_cc1 -triple spir-unknown-unknown -O1 -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header -emit-llvm-bc %s -o %t.bc
// RUN: llvm-spirv %t.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
// RUN: llvm-spirv %t.bc -o %t.spv
// RUN: spirv-val %t.spv
// RUN: llvm-spirv -r %t.spv -o %t.rev.bc
// RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-OCL
// RUN: llvm-spirv -r --spirv-target-env=SPV-IR %t.spv -o %t.rev.bc
// RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM-SPV
// RUN: llvm-spirv %t.rev.bc -spirv-text -o - | FileCheck %s --check-prefix=CHECK-SPIRV
//
// XFAIL: *
// CHECK-SPIRV: TypeDeviceEvent
// CHECK-SPIRV: 5 Function
// CHECK-SPIRV: CreateUserEvent
// CHECK-SPIRV: IsValidEvent
// CHECK-SPIRV: RetainEvent
// CHECK-SPIRV: SetUserEventStatus
// CHECK-SPIRV: CaptureEventProfilingInfo
// CHECK-SPIRV: ReleaseEvent
// CHECK-SPIRV: FunctionEnd
// CHECK-LLVM-OCL-LABEL: @clk_event_t_test
// CHECK-LLVM-OCL: call spir_func ptr @_Z17create_user_eventv()
// CHECK-LLVM-OCL: call spir_func i1 @_Z14is_valid_event12ocl_clkevent(
// CHECK-LLVM-OCL: call spir_func void @_Z12retain_event12ocl_clkevent(
// CHECK-LLVM-OCL: call spir_func void @_Z21set_user_event_status12ocl_clkeventi(ptr %{{[a-z]+}}, i32 -42)
// CHECK-LLVM-OCL: call spir_func void @_Z28capture_event_profiling_info12ocl_clkeventiPU3AS1v(ptr %{{[a-z]+}}, i32 1, ptr addrspace(1) %prof)
// CHECK-LLVM-OCL: call spir_func void @_Z13release_event12ocl_clkevent(
// CHECK-LLVM-OCL: ret
// CHECK-LLVM-SPV-LABEL: @clk_event_t_test
// CHECK-LLVM-SPV: call spir_func ptr @_Z23__spirv_CreateUserEventv()
// CHECK-LLVM-SPV: call spir_func i1 @_Z20__spirv_IsValidEventP19__spirv_DeviceEvent(
// CHECK-LLVM-SPV: call spir_func void @_Z19__spirv_RetainEventP19__spirv_DeviceEvent(
// CHECK-LLVM-SPV: call spir_func void @_Z26__spirv_SetUserEventStatusP19__spirv_DeviceEventi(ptr %{{[a-z]+}}, i32 -42)
// CHECK-LLVM-SPV: call spir_func void @_Z33__spirv_CaptureEventProfilingInfoP19__spirv_DeviceEventiPU3AS1c(ptr %{{[a-z]+}}, i32 1, ptr addrspace(1) %prof)
// CHECK-LLVM-SPV: call spir_func void @_Z20__spirv_ReleaseEventP19__spirv_DeviceEvent(
// CHECK-LLVM-SPV: ret
kernel void clk_event_t_test(global int *res, global void *prof) {
clk_event_t e1 = create_user_event();
*res = is_valid_event(e1);
retain_event(e1);
set_user_event_status(e1, -42);
capture_event_profiling_info(e1, CLK_PROFILING_COMMAND_EXEC_TIME, prof);
release_event(e1);
}