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
107 lines
4.0 KiB
Common Lisp
107 lines
4.0 KiB
Common Lisp
// RUN: %clang_cc1 -triple spir-unknown-unknown -cl-std=CL3.0 -fdeclare-opencl-builtins -verify -fsyntax-only %s
|
|
|
|
// Keep this test header-free so it exercises OpenCLBuiltins.td instead of
|
|
// declarations from opencl-c.h.
|
|
|
|
typedef unsigned int uint;
|
|
typedef unsigned short ushort;
|
|
typedef int int2 __attribute__((ext_vector_type(2)));
|
|
typedef short short3 __attribute__((ext_vector_type(3)));
|
|
typedef short short8 __attribute__((ext_vector_type(8)));
|
|
typedef short short16 __attribute__((ext_vector_type(16)));
|
|
typedef ushort ushort2 __attribute__((ext_vector_type(2)));
|
|
typedef ushort ushort4 __attribute__((ext_vector_type(4)));
|
|
typedef ushort ushort8 __attribute__((ext_vector_type(8)));
|
|
typedef ushort ushort16 __attribute__((ext_vector_type(16)));
|
|
|
|
short3 test_broadcast_short3(short3 value) {
|
|
return intel_sub_group_broadcast(value, 1u);
|
|
}
|
|
|
|
ushort8 test_broadcast_ushort8(ushort8 value) {
|
|
return intel_sub_group_broadcast(value, 1u);
|
|
}
|
|
|
|
short16 test_shuffle_short16(short16 value) {
|
|
return intel_sub_group_shuffle(value, 1u);
|
|
}
|
|
|
|
ushort16 test_shuffle_xor_ushort16(ushort16 value) {
|
|
return intel_sub_group_shuffle_xor(value, 1u);
|
|
}
|
|
|
|
short16 test_shuffle_down_short16(short16 current, short16 next) {
|
|
return intel_sub_group_shuffle_down(current, next, 1u);
|
|
}
|
|
|
|
ushort16 test_shuffle_up_ushort16(ushort16 previous, ushort16 current) {
|
|
return intel_sub_group_shuffle_up(previous, current, 1u);
|
|
}
|
|
|
|
short test_collectives_short(short value) {
|
|
value = intel_sub_group_reduce_add(value);
|
|
value = intel_sub_group_reduce_min(value);
|
|
value = intel_sub_group_reduce_max(value);
|
|
value = intel_sub_group_scan_exclusive_add(value);
|
|
value = intel_sub_group_scan_exclusive_min(value);
|
|
value = intel_sub_group_scan_exclusive_max(value);
|
|
value = intel_sub_group_scan_inclusive_add(value);
|
|
value = intel_sub_group_scan_inclusive_min(value);
|
|
value = intel_sub_group_scan_inclusive_max(value);
|
|
return value;
|
|
}
|
|
|
|
ushort test_collectives_ushort(ushort value) {
|
|
value = intel_sub_group_reduce_add(value);
|
|
value = intel_sub_group_reduce_min(value);
|
|
value = intel_sub_group_reduce_max(value);
|
|
value = intel_sub_group_scan_exclusive_add(value);
|
|
value = intel_sub_group_scan_exclusive_min(value);
|
|
value = intel_sub_group_scan_exclusive_max(value);
|
|
value = intel_sub_group_scan_inclusive_add(value);
|
|
value = intel_sub_group_scan_inclusive_min(value);
|
|
value = intel_sub_group_scan_inclusive_max(value);
|
|
return value;
|
|
}
|
|
|
|
ushort test_block_read_us_global(const __global ushort *in) {
|
|
return intel_sub_group_block_read_us(in);
|
|
}
|
|
|
|
ushort2 test_block_read_us2_global(const __global ushort *in) {
|
|
return intel_sub_group_block_read_us2(in);
|
|
}
|
|
|
|
ushort4 test_block_read_us4_image(read_only image2d_t image, int2 coord) {
|
|
return intel_sub_group_block_read_us4(image, coord);
|
|
}
|
|
|
|
ushort8 test_block_read_us8_rw_image(read_write image2d_t image, int2 coord) {
|
|
return intel_sub_group_block_read_us8(image, coord);
|
|
}
|
|
|
|
ushort16 test_block_read_us16_rw_image(read_write image2d_t image, int2 coord) {
|
|
return intel_sub_group_block_read_us16(image, coord);
|
|
}
|
|
|
|
void test_block_write_us(__global ushort *out, write_only image2d_t image,
|
|
read_write image2d_t rw, int2 coord, ushort value,
|
|
ushort2 value2, ushort4 value4, ushort8 value8,
|
|
ushort16 value16) {
|
|
intel_sub_group_block_write_us(out, value);
|
|
intel_sub_group_block_write_us2(out, value2);
|
|
intel_sub_group_block_write_us4(out, value4);
|
|
intel_sub_group_block_write_us8(out, value8);
|
|
intel_sub_group_block_write_us16(out, value16);
|
|
intel_sub_group_block_write_us(image, coord, value);
|
|
intel_sub_group_block_write_us2(image, coord, value2);
|
|
intel_sub_group_block_write_us4(image, coord, value4);
|
|
intel_sub_group_block_write_us8(rw, coord, value8);
|
|
intel_sub_group_block_write_us16(rw, coord, value16);
|
|
}
|
|
|
|
void test_broadcast_short16_rejected(short16 value) {
|
|
(void)intel_sub_group_broadcast(value, 0u); // expected-error{{no matching function for call to 'intel_sub_group_broadcast'}}
|
|
// expected-note@-1 0+{{candidate function not viable}}
|
|
}
|