diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 05bfbba231a94..2304ce8565395 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -908,8 +908,11 @@ bool Sema::LookupBuiltin(LookupResult &R) { *this, 0, R, II, Index.first - 1, Index.second, [this](const SPIRVBuiltin::BuiltinStruct &, FunctionDecl &NewBuiltin) { - NewBuiltin.addAttr( - SYCLDeviceAttr::CreateImplicit(this->Context)); + if (!this->getLangOpts().CPlusPlus) + NewBuiltin.addAttr(OverloadableAttr::CreateImplicit(Context)); + if (this->getLangOpts().SYCLIsDevice) + NewBuiltin.addAttr( + SYCLDeviceAttr::CreateImplicit(this->Context)); }); return true; } diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt index 88ace62145e05..471ef36d12301 100644 --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -45,8 +45,13 @@ set( LIBCLC_TARGETS_ALL nvptx--nvidiacl nvptx64--nvidiacl ) +set( LIBCLC_TEST_TARGETS_ALL + nvptx--nvidiacl + nvptx64--nvidiacl +) set( LIBCLC_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR} ) +set( LIBCLC_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) set( LIBCLC_TARGETS_TO_BUILD "all" CACHE STRING "Semicolon-separated list of targets to build, or 'all'." ) @@ -65,6 +70,14 @@ endif() list( SORT LIBCLC_TARGETS_TO_BUILD ) +set(LIBCLC_TARGET_TO_TEST) + +foreach ( t ${LIBCLC_TEST_TARGETS_ALL}) + if( ${t} IN_LIST LIBCLC_TARGETS_TO_BUILD ) + list( APPEND LIBCLC_TARGET_TO_TEST "${t}" ) + endif(t) +endforeach(t) + execute_process( COMMAND ${LLVM_CONFIG} "--system-libs" OUTPUT_VARIABLE LLVM_SYSTEM_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE ) @@ -261,3 +274,5 @@ install(DIRECTORY ${LIBCLC_LIBRARY_OUTPUT_INTDIR} DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT clc-builtins FILES_MATCHING PATTERN "clc-*") + +add_subdirectory(test) diff --git a/libclc/generic/include/clc/async/gentype.inc b/libclc/generic/include/clc/async/gentype.inc index c570608f7a801..2af91bfb9641f 100644 --- a/libclc/generic/include/clc/async/gentype.inc +++ b/libclc/generic/include/clc/async/gentype.inc @@ -11,6 +11,16 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE char3 +#define __CLC_GENTYPE_U uchar3 +#define __CLC_GENTYPE_MANGLED Dv3_c +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE_U +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE char4 #define __CLC_GENTYPE_MANGLED Dv4_c #include __CLC_BODY @@ -29,6 +39,46 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifndef __CLC_NO_SCHAR +#define __CLC_GENTYPE schar +#define __CLC_GENTYPE_MANGLED a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE + +#define __CLC_GENTYPE schar2 +#define __CLC_GENTYPE_MANGLED Dv2_a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE + +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE schar3 +#define __CLC_GENTYPE_MANGLED Dv3_a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + +#define __CLC_GENTYPE schar4 +#define __CLC_GENTYPE_MANGLED Dv4_a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE + +#define __CLC_GENTYPE schar8 +#define __CLC_GENTYPE_MANGLED Dv8_a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE + +#define __CLC_GENTYPE schar16 +#define __CLC_GENTYPE_MANGLED Dv16_a +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE uchar #define __CLC_GENTYPE_MANGLED h #include __CLC_BODY @@ -41,6 +91,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE uchar3 +#define __CLC_GENTYPE_MANGLED Dv3_h +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE uchar4 #define __CLC_GENTYPE_MANGLED Dv4_h #include __CLC_BODY @@ -71,6 +129,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE short3 +#define __CLC_GENTYPE_MANGLED Dv3_s +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE short4 #define __CLC_GENTYPE_MANGLED Dv4_s #include __CLC_BODY @@ -101,6 +167,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE ushort3 +#define __CLC_GENTYPE_MANGLED Dv3_t +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE ushort4 #define __CLC_GENTYPE_MANGLED Dv4_t #include __CLC_BODY @@ -131,6 +205,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE int3 +#define __CLC_GENTYPE_MANGLED Dv3_i +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE int4 #define __CLC_GENTYPE_MANGLED Dv4_i #include __CLC_BODY @@ -161,6 +243,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE uint3 +#define __CLC_GENTYPE_MANGLED Dv3_j +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE uint4 #define __CLC_GENTYPE_MANGLED Dv4_j #include __CLC_BODY @@ -191,6 +281,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE float3 +#define __CLC_GENTYPE_MANGLED Dv3_f +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE float4 #define __CLC_GENTYPE_MANGLED Dv4_f #include __CLC_BODY @@ -221,6 +319,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE long3 +#define __CLC_GENTYPE_MANGLED Dv3_l +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE long4 #define __CLC_GENTYPE_MANGLED Dv4_l #include __CLC_BODY @@ -251,6 +357,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE ulong3 +#define __CLC_GENTYPE_MANGLED Dv3_m +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE ulong4 #define __CLC_GENTYPE_MANGLED Dv4_m #include __CLC_BODY @@ -284,6 +398,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE double3 +#define __CLC_GENTYPE_MANGLED Dv3_d +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE double4 #define __CLC_GENTYPE_MANGLED Dv4_d #include __CLC_BODY @@ -319,6 +441,14 @@ #undef __CLC_GENTYPE_MANGLED #undef __CLC_GENTYPE +#ifdef __CLC_GEN_VEC3 +#define __CLC_GENTYPE half3 +#define __CLC_GENTYPE_MANGLED Dv3_h +#include __CLC_BODY +#undef __CLC_GENTYPE_MANGLED +#undef __CLC_GENTYPE +#endif + #define __CLC_GENTYPE half4 #define __CLC_GENTYPE_MANGLED Dv4_Dh #include __CLC_BODY diff --git a/libclc/generic/include/spirv/async/async_work_group_strided_copy.h b/libclc/generic/include/spirv/async/async_work_group_strided_copy.h deleted file mode 100644 index 3b068241266f5..0000000000000 --- a/libclc/generic/include/spirv/async/async_work_group_strided_copy.h +++ /dev/null @@ -1,38 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#define __CLC_CONCAT(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g -#define __CLC_XCONCAT(a, b, c, d, e, f, g) __CLC_CONCAT(a, b, c, d, e, f, g) - - -#define __SPIRV_DST_ADDR_SPACE local -#define __SPIRV_DST_ADDR_SPACE_MANGLED AS3 -#define __SPIRV_SRC_ADDR_SPACE global -#define __SPIRV_SRC_ADDR_SPACE_MANGLED AS1 -#define __SPIRV_BODY -#include -#undef __SPIRV_DST_ADDR_SPACE -#undef __SPIRV_DST_ADDR_SPACE_MANGLED -#undef __SPIRV_SRC_ADDR_SPACE -#undef __SPIRV_SRC_ADDR_SPACE_MANGLED -#undef __SPIRV_BODY - -#define __SPIRV_DST_ADDR_SPACE global -#define __SPIRV_DST_ADDR_SPACE_MANGLED AS1 -#define __SPIRV_SRC_ADDR_SPACE local -#define __SPIRV_SRC_ADDR_SPACE_MANGLED AS3 -#define __SPIRV_BODY -#include -#undef __SPIRV_DST_ADDR_SPACE -#undef __SPIRV_DST_ADDR_SPACE_MANGLED -#undef __SPIRV_SRC_ADDR_SPACE -#undef __SPIRV_SRC_ADDR_SPACE_MANGLED -#undef __SPIRV_BODY - -#undef __CLC_XCONCAT -#undef __CLC_CONCAT diff --git a/libclc/generic/include/spirv/async/async_work_group_strided_copy.inc b/libclc/generic/include/spirv/async/async_work_group_strided_copy.inc deleted file mode 100644 index 175167103c2a3..0000000000000 --- a/libclc/generic/include/spirv/async/async_work_group_strided_copy.inc +++ /dev/null @@ -1,12 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL event_t __spirv_GroupAsyncCopy( - unsigned int scope, __SPIRV_DST_ADDR_SPACE __SPIRV_GENTYPE *dst, - const __SPIRV_SRC_ADDR_SPACE __SPIRV_GENTYPE *src, size_t num_elements, - size_t stride, event_t event); diff --git a/libclc/generic/include/spirv/async/prefetch.h b/libclc/generic/include/spirv/async/prefetch.h deleted file mode 100644 index de482347ae9a7..0000000000000 --- a/libclc/generic/include/spirv/async/prefetch.h +++ /dev/null @@ -1,11 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -#define __SPIRV_BODY -#include -#undef __SPIRV_BODY diff --git a/libclc/generic/include/spirv/async/prefetch.inc b/libclc/generic/include/spirv/async/prefetch.inc deleted file mode 100644 index 42ae7efb09397..0000000000000 --- a/libclc/generic/include/spirv/async/prefetch.inc +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(const global __SPIRV_GENTYPE *p, size_t num_gentypes); diff --git a/libclc/generic/include/spirv/explicit_fence/explicit_memory_fence.h b/libclc/generic/include/spirv/explicit_fence/explicit_memory_fence.h deleted file mode 100644 index 866b5e584b9f5..0000000000000 --- a/libclc/generic/include/spirv/explicit_fence/explicit_memory_fence.h +++ /dev/null @@ -1,9 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_DEF void __spirv_MemoryBarrier(int memory, int semantics); diff --git a/libclc/generic/include/spirv/spirv.h b/libclc/generic/include/spirv/spirv.h index de9c3722b985a..ad30de4b187c1 100644 --- a/libclc/generic/include/spirv/spirv.h +++ b/libclc/generic/include/spirv/spirv.h @@ -196,18 +196,6 @@ #include #include -/* 6.11.8 Synchronization Functions */ -#include - -/* 6.11.9 Explicit Memory Fence Functions */ -#include - -/* 6.11.10 Async Copy and Prefetch Functions */ -/* #include -- Explicitly omitted from SPIR-V interface. */ -#include -#include -#include - /* 6.11.11 Atomic Functions */ #include #include diff --git a/libclc/generic/include/spirv/spirv_builtins.h b/libclc/generic/include/spirv/spirv_builtins.h index 049f60d00a8db..946bbbf7bc72b 100644 --- a/libclc/generic/include/spirv/spirv_builtins.h +++ b/libclc/generic/include/spirv/spirv_builtins.h @@ -12,6 +12,9 @@ #ifndef CLC_SPIRV_BINDING #define CLC_SPIRV_BINDING +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT void + __spirv_ControlBarrier(__clc_uint32_t, __clc_uint32_t, __clc_uint32_t); + _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_int8_t __spirv_ConvertFToS_Rchar(__clc_fp32_t); @@ -9132,6 +9135,571 @@ _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_fp16_t #endif #endif +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_char_t __local *, __clc_char_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_char_t __global *, __clc_char_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_char_t __local *, + __clc_vec2_char_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_char_t __global *, + __clc_vec2_char_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_char_t __local *, + __clc_vec3_char_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_char_t __global *, + __clc_vec3_char_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_char_t __local *, + __clc_vec4_char_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_char_t __global *, + __clc_vec4_char_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_char_t __local *, + __clc_vec8_char_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_char_t __global *, + __clc_vec8_char_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_char_t __local *, + __clc_vec16_char_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_char_t __global *, + __clc_vec16_char_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int8_t __local *, __clc_int8_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int8_t __global *, __clc_int8_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int8_t __local *, + __clc_vec2_int8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int8_t __global *, + __clc_vec2_int8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int8_t __local *, + __clc_vec3_int8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int8_t __global *, + __clc_vec3_int8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int8_t __local *, + __clc_vec4_int8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int8_t __global *, + __clc_vec4_int8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int8_t __local *, + __clc_vec8_int8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int8_t __global *, + __clc_vec8_int8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int8_t __local *, + __clc_vec16_int8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int8_t __global *, + __clc_vec16_int8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int16_t __local *, __clc_int16_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int16_t __global *, __clc_int16_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int16_t __local *, + __clc_vec2_int16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int16_t __global *, + __clc_vec2_int16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int16_t __local *, + __clc_vec3_int16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int16_t __global *, + __clc_vec3_int16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int16_t __local *, + __clc_vec4_int16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int16_t __global *, + __clc_vec4_int16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int16_t __local *, + __clc_vec8_int16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int16_t __global *, + __clc_vec8_int16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int16_t __local *, + __clc_vec16_int16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int16_t __global *, + __clc_vec16_int16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int32_t __local *, __clc_int32_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int32_t __global *, __clc_int32_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int32_t __local *, + __clc_vec2_int32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int32_t __global *, + __clc_vec2_int32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int32_t __local *, + __clc_vec3_int32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int32_t __global *, + __clc_vec3_int32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int32_t __local *, + __clc_vec4_int32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int32_t __global *, + __clc_vec4_int32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int32_t __local *, + __clc_vec8_int32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int32_t __global *, + __clc_vec8_int32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int32_t __local *, + __clc_vec16_int32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int32_t __global *, + __clc_vec16_int32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int64_t __local *, __clc_int64_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_int64_t __global *, __clc_int64_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int64_t __local *, + __clc_vec2_int64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_int64_t __global *, + __clc_vec2_int64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int64_t __local *, + __clc_vec3_int64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_int64_t __global *, + __clc_vec3_int64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int64_t __local *, + __clc_vec4_int64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_int64_t __global *, + __clc_vec4_int64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int64_t __local *, + __clc_vec8_int64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_int64_t __global *, + __clc_vec8_int64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int64_t __local *, + __clc_vec16_int64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_int64_t __global *, + __clc_vec16_int64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint8_t __local *, __clc_uint8_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint8_t __global *, __clc_uint8_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint8_t __local *, + __clc_vec2_uint8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint8_t __global *, + __clc_vec2_uint8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint8_t __local *, + __clc_vec3_uint8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint8_t __global *, + __clc_vec3_uint8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint8_t __local *, + __clc_vec4_uint8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint8_t __global *, + __clc_vec4_uint8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint8_t __local *, + __clc_vec8_uint8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint8_t __global *, + __clc_vec8_uint8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint8_t __local *, + __clc_vec16_uint8_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint8_t __global *, + __clc_vec16_uint8_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint16_t __local *, __clc_uint16_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint16_t __global *, __clc_uint16_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint16_t __local *, + __clc_vec2_uint16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint16_t __global *, + __clc_vec2_uint16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint16_t __local *, + __clc_vec3_uint16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint16_t __global *, + __clc_vec3_uint16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint16_t __local *, + __clc_vec4_uint16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint16_t __global *, + __clc_vec4_uint16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint16_t __local *, + __clc_vec8_uint16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint16_t __global *, + __clc_vec8_uint16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint16_t __local *, + __clc_vec16_uint16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint16_t __global *, + __clc_vec16_uint16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint32_t __local *, __clc_uint32_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint32_t __global *, __clc_uint32_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint32_t __local *, + __clc_vec2_uint32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint32_t __global *, + __clc_vec2_uint32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint32_t __local *, + __clc_vec3_uint32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint32_t __global *, + __clc_vec3_uint32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint32_t __local *, + __clc_vec4_uint32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint32_t __global *, + __clc_vec4_uint32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint32_t __local *, + __clc_vec8_uint32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint32_t __global *, + __clc_vec8_uint32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint32_t __local *, + __clc_vec16_uint32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint32_t __global *, + __clc_vec16_uint32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint64_t __local *, __clc_uint64_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_uint64_t __global *, __clc_uint64_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint64_t __local *, + __clc_vec2_uint64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_uint64_t __global *, + __clc_vec2_uint64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint64_t __local *, + __clc_vec3_uint64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_uint64_t __global *, + __clc_vec3_uint64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint64_t __local *, + __clc_vec4_uint64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_uint64_t __global *, + __clc_vec4_uint64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint64_t __local *, + __clc_vec8_uint64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_uint64_t __global *, + __clc_vec8_uint64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint64_t __local *, + __clc_vec16_uint64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_uint64_t __global *, + __clc_vec16_uint64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp32_t __local *, __clc_fp32_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp32_t __global *, __clc_fp32_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp32_t __local *, + __clc_vec2_fp32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp32_t __global *, + __clc_vec2_fp32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp32_t __local *, + __clc_vec3_fp32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp32_t __global *, + __clc_vec3_fp32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp32_t __local *, + __clc_vec4_fp32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp32_t __global *, + __clc_vec4_fp32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp32_t __local *, + __clc_vec8_fp32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp32_t __global *, + __clc_vec8_fp32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp32_t __local *, + __clc_vec16_fp32_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp32_t __global *, + __clc_vec16_fp32_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); + +#ifdef cl_khr_fp64 +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp64_t __local *, __clc_fp64_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp64_t __global *, __clc_fp64_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp64_t __local *, + __clc_vec2_fp64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp64_t __global *, + __clc_vec2_fp64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp64_t __local *, + __clc_vec3_fp64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp64_t __global *, + __clc_vec3_fp64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp64_t __local *, + __clc_vec4_fp64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp64_t __global *, + __clc_vec4_fp64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp64_t __local *, + __clc_vec8_fp64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp64_t __global *, + __clc_vec8_fp64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp64_t __local *, + __clc_vec16_fp64_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp64_t __global *, + __clc_vec16_fp64_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +#endif + +#ifdef cl_khr_fp16 +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp16_t __local *, __clc_fp16_t const __global *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t __spirv_GroupAsyncCopy( + __clc_uint32_t, __clc_fp16_t __global *, __clc_fp16_t const __local *, + __clc_size_t, __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp16_t __local *, + __clc_vec2_fp16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec2_fp16_t __global *, + __clc_vec2_fp16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp16_t __local *, + __clc_vec3_fp16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec3_fp16_t __global *, + __clc_vec3_fp16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp16_t __local *, + __clc_vec4_fp16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec4_fp16_t __global *, + __clc_vec4_fp16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp16_t __local *, + __clc_vec8_fp16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec8_fp16_t __global *, + __clc_vec8_fp16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp16_t __local *, + __clc_vec16_fp16_t const __global *, __clc_size_t, + __clc_size_t, __clc_event_t); +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT __clc_event_t +__spirv_GroupAsyncCopy(__clc_uint32_t, __clc_vec16_fp16_t __global *, + __clc_vec16_fp16_t const __local *, __clc_size_t, + __clc_size_t, __clc_event_t); +#endif + +_CLC_OVERLOAD _CLC_DECL _CLC_CONVERGENT void +__spirv_GroupWaitEvents(__clc_uint32_t, __clc_int32_t, __clc_event_t *); + +_CLC_OVERLOAD _CLC_DECL void __spirv_MemoryBarrier(__clc_uint32_t, + __clc_uint32_t); + _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_int8_t __spirv_SConvert_Rchar(__clc_int16_t); _CLC_OVERLOAD @@ -10855,6 +11423,159 @@ _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_vec16_fp16_t __spirv_ocl_fclamp( __clc_vec16_fp16_t, __clc_vec16_fp16_t, __clc_vec16_fp16_t); #endif +_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(__clc_char_t const __global *, + __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_char_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_char_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_char_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_char_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_char_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(__clc_int8_t const __global *, + __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_int8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_int8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_int8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_int8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_int8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_int16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_int32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_int64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_uint8_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_uint16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_uint32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_uint64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(__clc_fp32_t const __global *, + __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_fp32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_fp32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_fp32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_fp32_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_fp32_t const __global *, __clc_size_t); + +#ifdef cl_khr_fp64 +_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(__clc_fp64_t const __global *, + __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_fp64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_fp64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_fp64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_fp64_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_fp64_t const __global *, __clc_size_t); +#endif + +#ifdef cl_khr_fp16 +_CLC_OVERLOAD _CLC_DECL void __spirv_ocl_prefetch(__clc_fp16_t const __global *, + __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec2_fp16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec3_fp16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec4_fp16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec8_fp16_t const __global *, __clc_size_t); +_CLC_OVERLOAD _CLC_DECL void +__spirv_ocl_prefetch(__clc_vec16_fp16_t const __global *, __clc_size_t); +#endif + +_CLC_OVERLOAD +_CLC_DECL _CLC_CONSTFN __clc_uint8_t __spirv_ocl_s_abs(__clc_char_t); _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_uint8_t __spirv_ocl_s_abs(__clc_int8_t); _CLC_OVERLOAD _CLC_DECL _CLC_CONSTFN __clc_vec2_uint8_t diff --git a/libclc/generic/include/spirv/synchronization/barrier.h b/libclc/generic/include/spirv/synchronization/barrier.h deleted file mode 100644 index 476a4f4e7d99b..0000000000000 --- a/libclc/generic/include/spirv/synchronization/barrier.h +++ /dev/null @@ -1,13 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - -_CLC_OVERLOAD _CLC_DECL void __spirv_ControlBarrier(unsigned int scope, - unsigned int memory, - unsigned int semantics); -_CLC_OVERLOAD _CLC_DECL void __spirv_MemoryBarrier(unsigned int scope, - unsigned int semantics); diff --git a/libclc/generic/libspirv/async/async_work_group_strided_copy.cl b/libclc/generic/libspirv/async/async_work_group_strided_copy.cl index 1f7ae5fc46b57..656f844bee394 100644 --- a/libclc/generic/libspirv/async/async_work_group_strided_copy.cl +++ b/libclc/generic/libspirv/async/async_work_group_strided_copy.cl @@ -9,4 +9,5 @@ #include #define __CLC_BODY +#define __CLC_GEN_VEC3 #include diff --git a/libclc/generic/libspirv/async/prefetch.cl b/libclc/generic/libspirv/async/prefetch.cl index 85dd2ab21dff9..9a12b02d28704 100644 --- a/libclc/generic/libspirv/async/prefetch.cl +++ b/libclc/generic/libspirv/async/prefetch.cl @@ -9,4 +9,5 @@ #include #define __CLC_BODY +#define __CLC_GEN_VEC3 #include diff --git a/libclc/test/CMakeLists.txt b/libclc/test/CMakeLists.txt new file mode 100644 index 0000000000000..de7f7803d40b5 --- /dev/null +++ b/libclc/test/CMakeLists.txt @@ -0,0 +1,44 @@ +# required by lit.site.cfg.py.in +set(LIBCLC_TEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + +configure_lit_site_cfg( + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py + MAIN_CONFIG + ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py +) + +set(LIBCLC_TEST_DEPS + FileCheck + llvm-dis + not + clang +) + +add_custom_target(check-libclc) + +foreach( t ${LIBCLC_TARGET_TO_TEST} ) + foreach( d ${${t}_devices} ) + if( ${d} STREQUAL "none" ) + set( mcpu ) + set( arch_suffix "${t}" ) + else() + set( mcpu "cpu=${d}" ) + set( arch_suffix "${d}-${t}" ) + endif() + message( " Testing : ${arch_suffix}" ) + + add_lit_testsuite(check-libclc-spirv-${arch_suffix} "Running libclc spirv-${arch_suffix} regression tests" + ${CMAKE_CURRENT_BINARY_DIR} + ARGS + --verbose + PARAMS "target=${t}" ${mcpu} "builtins=libspirv-${arch_suffix}.bc" + DEPENDS + ${LIBCLC_TEST_DEPS} + libspirv-builtins + ) + + add_dependencies(check-libclc check-libclc-spirv-${arch_suffix}) + + endforeach( d ) +endforeach( t ) diff --git a/libclc/test/binding/core/ControlBarrier.cl b/libclc/test/binding/core/ControlBarrier.cl new file mode 100644 index 0000000000000..6db6e514b12e4 --- /dev/null +++ b/libclc/test/binding/core/ControlBarrier.cl @@ -0,0 +1,22 @@ + +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) void +test___spirv_ControlBarrier(__clc_uint32_t args_0, __clc_uint32_t args_1, + __clc_uint32_t args_2) { + __spirv_ControlBarrier(args_0, args_1, args_2); +} diff --git a/libclc/test/binding/core/GroupAsyncCopy.cl b/libclc/test/binding/core/GroupAsyncCopy.cl new file mode 100644 index 0000000000000..90c9120169452 --- /dev/null +++ b/libclc/test/binding/core/GroupAsyncCopy.cl @@ -0,0 +1,993 @@ + +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) __clc_event_t +test___spirv_GroupAsyncCopy(__clc_uint32_t args_0, __clc_int8_t __local *args_1, + __clc_int8_t const __global *args_2, + __clc_size_t args_3, __clc_size_t args_4, + __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int8_t __local *args_1, + __clc_vec2_int8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int8_t __local *args_1, + __clc_vec3_int8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int8_t __local *args_1, + __clc_vec4_int8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int8_t __local *args_1, + __clc_vec8_int8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int8_t __local *args_1, + __clc_vec16_int8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint8_t __local *args_1, + __clc_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint8_t __local *args_1, + __clc_vec2_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint8_t __local *args_1, + __clc_vec3_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint8_t __local *args_1, + __clc_vec4_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint8_t __local *args_1, + __clc_vec8_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint8_t __local *args_1, + __clc_vec16_uint8_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int16_t __local *args_1, + __clc_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int16_t __local *args_1, + __clc_vec2_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int16_t __local *args_1, + __clc_vec3_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int16_t __local *args_1, + __clc_vec4_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int16_t __local *args_1, + __clc_vec8_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int16_t __local *args_1, + __clc_vec16_int16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint16_t __local *args_1, + __clc_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint16_t __local *args_1, + __clc_vec2_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint16_t __local *args_1, + __clc_vec3_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint16_t __local *args_1, + __clc_vec4_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint16_t __local *args_1, + __clc_vec8_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint16_t __local *args_1, + __clc_vec16_uint16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int32_t __local *args_1, + __clc_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int32_t __local *args_1, + __clc_vec2_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int32_t __local *args_1, + __clc_vec3_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int32_t __local *args_1, + __clc_vec4_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int32_t __local *args_1, + __clc_vec8_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int32_t __local *args_1, + __clc_vec16_int32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint32_t __local *args_1, + __clc_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint32_t __local *args_1, + __clc_vec2_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint32_t __local *args_1, + __clc_vec3_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint32_t __local *args_1, + __clc_vec4_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint32_t __local *args_1, + __clc_vec8_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint32_t __local *args_1, + __clc_vec16_uint32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int64_t __local *args_1, + __clc_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int64_t __local *args_1, + __clc_vec2_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int64_t __local *args_1, + __clc_vec3_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int64_t __local *args_1, + __clc_vec4_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int64_t __local *args_1, + __clc_vec8_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int64_t __local *args_1, + __clc_vec16_int64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint64_t __local *args_1, + __clc_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint64_t __local *args_1, + __clc_vec2_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint64_t __local *args_1, + __clc_vec3_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint64_t __local *args_1, + __clc_vec4_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint64_t __local *args_1, + __clc_vec8_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint64_t __local *args_1, + __clc_vec16_uint64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t +test___spirv_GroupAsyncCopy(__clc_uint32_t args_0, __clc_fp32_t __local *args_1, + __clc_fp32_t const __global *args_2, + __clc_size_t args_3, __clc_size_t args_4, + __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp32_t __local *args_1, + __clc_vec2_fp32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp32_t __local *args_1, + __clc_vec3_fp32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp32_t __local *args_1, + __clc_vec4_fp32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp32_t __local *args_1, + __clc_vec8_fp32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp32_t __local *args_1, + __clc_vec16_fp32_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t +test___spirv_GroupAsyncCopy(__clc_uint32_t args_0, __clc_fp64_t __local *args_1, + __clc_fp64_t const __global *args_2, + __clc_size_t args_3, __clc_size_t args_4, + __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp64_t __local *args_1, + __clc_vec2_fp64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp64_t __local *args_1, + __clc_vec3_fp64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp64_t __local *args_1, + __clc_vec4_fp64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp64_t __local *args_1, + __clc_vec8_fp64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp64_t __local *args_1, + __clc_vec16_fp64_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t +test___spirv_GroupAsyncCopy(__clc_uint32_t args_0, __clc_fp16_t __local *args_1, + __clc_fp16_t const __global *args_2, + __clc_size_t args_3, __clc_size_t args_4, + __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp16_t __local *args_1, + __clc_vec2_fp16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp16_t __local *args_1, + __clc_vec3_fp16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp16_t __local *args_1, + __clc_vec4_fp16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp16_t __local *args_1, + __clc_vec8_fp16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp16_t __local *args_1, + __clc_vec16_fp16_t const __global *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int8_t __global *args_1, + __clc_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int8_t __global *args_1, + __clc_vec2_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int8_t __global *args_1, + __clc_vec3_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int8_t __global *args_1, + __clc_vec4_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int8_t __global *args_1, + __clc_vec8_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int8_t __global *args_1, + __clc_vec16_int8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint8_t __global *args_1, + __clc_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint8_t __global *args_1, + __clc_vec2_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint8_t __global *args_1, + __clc_vec3_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint8_t __global *args_1, + __clc_vec4_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint8_t __global *args_1, + __clc_vec8_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint8_t __global *args_1, + __clc_vec16_uint8_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int16_t __global *args_1, + __clc_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int16_t __global *args_1, + __clc_vec2_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int16_t __global *args_1, + __clc_vec3_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int16_t __global *args_1, + __clc_vec4_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int16_t __global *args_1, + __clc_vec8_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int16_t __global *args_1, + __clc_vec16_int16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint16_t __global *args_1, + __clc_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint16_t __global *args_1, + __clc_vec2_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint16_t __global *args_1, + __clc_vec3_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint16_t __global *args_1, + __clc_vec4_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint16_t __global *args_1, + __clc_vec8_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint16_t __global *args_1, + __clc_vec16_uint16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int32_t __global *args_1, + __clc_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int32_t __global *args_1, + __clc_vec2_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int32_t __global *args_1, + __clc_vec3_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int32_t __global *args_1, + __clc_vec4_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int32_t __global *args_1, + __clc_vec8_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int32_t __global *args_1, + __clc_vec16_int32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint32_t __global *args_1, + __clc_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint32_t __global *args_1, + __clc_vec2_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint32_t __global *args_1, + __clc_vec3_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint32_t __global *args_1, + __clc_vec4_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint32_t __global *args_1, + __clc_vec8_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint32_t __global *args_1, + __clc_vec16_uint32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_int64_t __global *args_1, + __clc_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_int64_t __global *args_1, + __clc_vec2_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_int64_t __global *args_1, + __clc_vec3_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_int64_t __global *args_1, + __clc_vec4_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_int64_t __global *args_1, + __clc_vec8_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_int64_t __global *args_1, + __clc_vec16_int64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_uint64_t __global *args_1, + __clc_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_uint64_t __global *args_1, + __clc_vec2_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_uint64_t __global *args_1, + __clc_vec3_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_uint64_t __global *args_1, + __clc_vec4_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_uint64_t __global *args_1, + __clc_vec8_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_uint64_t __global *args_1, + __clc_vec16_uint64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_fp32_t __global *args_1, + __clc_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp32_t __global *args_1, + __clc_vec2_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp32_t __global *args_1, + __clc_vec3_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp32_t __global *args_1, + __clc_vec4_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp32_t __global *args_1, + __clc_vec8_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp32_t __global *args_1, + __clc_vec16_fp32_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_fp64_t __global *args_1, + __clc_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp64_t __global *args_1, + __clc_vec2_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp64_t __global *args_1, + __clc_vec3_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp64_t __global *args_1, + __clc_vec4_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp64_t __global *args_1, + __clc_vec8_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp64_t __global *args_1, + __clc_vec16_fp64_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_fp16_t __global *args_1, + __clc_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec2_fp16_t __global *args_1, + __clc_vec2_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec3_fp16_t __global *args_1, + __clc_vec3_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec4_fp16_t __global *args_1, + __clc_vec4_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec8_fp16_t __global *args_1, + __clc_vec8_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) __clc_event_t test___spirv_GroupAsyncCopy( + __clc_uint32_t args_0, __clc_vec16_fp16_t __global *args_1, + __clc_vec16_fp16_t const __local *args_2, __clc_size_t args_3, + __clc_size_t args_4, __clc_event_t args_5) { + return __spirv_GroupAsyncCopy(args_0, args_1, args_2, args_3, args_4, args_5); +} + +#endif diff --git a/libclc/test/binding/core/GroupWaitEvents.cl b/libclc/test/binding/core/GroupWaitEvents.cl new file mode 100644 index 0000000000000..6787c6a28e75e --- /dev/null +++ b/libclc/test/binding/core/GroupWaitEvents.cl @@ -0,0 +1,22 @@ + +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) void +test___spirv_GroupWaitEvents(__clc_uint32_t args_0, __clc_int32_t args_1, + __clc_event_t *args_2) { + __spirv_GroupWaitEvents(args_0, args_1, args_2); +} diff --git a/libclc/generic/include/spirv/async/wait_group_events.h b/libclc/test/binding/core/MemoryBarrier.cl similarity index 51% rename from libclc/generic/include/spirv/async/wait_group_events.h rename to libclc/test/binding/core/MemoryBarrier.cl index 4b0ab2e87a84f..e01734376d388 100644 --- a/libclc/generic/include/spirv/async/wait_group_events.h +++ b/libclc/test/binding/core/MemoryBarrier.cl @@ -1,3 +1,4 @@ + //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. @@ -6,6 +7,15 @@ // //===----------------------------------------------------------------------===// -_CLC_OVERLOAD _CLC_DEF void __spirv_GroupWaitEvents(unsigned int scope, - int num_events, - event_t *event_list); +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) void +test___spirv_MemoryBarrier(__clc_uint32_t args_0, __clc_uint32_t args_1) { + __spirv_MemoryBarrier(args_0, args_1); +} diff --git a/libclc/test/binding/ocl/prefetch.cl b/libclc/test/binding/ocl/prefetch.cl new file mode 100644 index 0000000000000..1665c32b4ba77 --- /dev/null +++ b/libclc/test/binding/ocl/prefetch.cl @@ -0,0 +1,437 @@ + +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_int8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_uint8_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_int16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_uint16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_int32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_uint32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_int64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_uint64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_fp32_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp64 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_fp64_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec2_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec3_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec4_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec8_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif +#ifdef cl_khr_fp16 +__attribute__((overloadable)) void +test___spirv_ocl_prefetch(__clc_vec16_fp16_t const __global *args_0, + __clc_size_t args_1) { + __spirv_ocl_prefetch(args_0, args_1); +} + +#endif diff --git a/libclc/test/lit.cfg.py b/libclc/test/lit.cfg.py new file mode 100644 index 0000000000000..98261f1b590ba --- /dev/null +++ b/libclc/test/lit.cfg.py @@ -0,0 +1,59 @@ +# -*- Python -*- + +import os + +import lit.formats +import lit.util + +from lit.llvm import llvm_config +from lit.llvm.subst import ToolSubst +from lit.llvm.subst import FindTool + +# Configuration file for the 'lit' test runner. + +# name: The name of this test suite. +config.name = 'LIBCLC' + +# testFormat: The test format to use to interpret tests. +config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell) + +# suffixes: A list of file extensions to treat as test files. +config.suffixes = ['.cl', '.cpp'] + +# excludes: A list of directories and fles to exclude from the testsuite. +config.excludes = ['CMakeLists.txt'] + +# test_source_root: The root path where tests are located. +config.test_source_root = os.path.join(os.path.dirname(__file__), 'binding') + +# test_exec_root: The root path where tests should be run. +config.test_exec_root = os.path.join(config.test_run_dir, 'test') + +libclc_inc = os.path.join(config.libclc_root, 'generic', 'include') + +target = lit_config.params.get('target', '') +builtins = lit_config.params.get('builtins', '') +cpu = lit_config.params.get('cpu', '') +cpu = [] if cpu == '' else ["-mcpu=" + cpu] + +llvm_config.use_default_substitutions() + +llvm_config.use_clang(additional_flags=["-fno-builtin", + "-I", libclc_inc, + "-target", target, + "-Xclang", + "-fdeclare-spirv-builtins", + "-Xclang", + "-mlink-builtin-bitcode", + "-Xclang", + os.path.join(config.llvm_libs_dir, + "clc", + builtins)] + cpu) + +config.substitutions.append(('%PATH%', config.environment['PATH'])) + +tool_dirs = [config.llvm_tools_dir] + +tools = ['llvm-dis', 'not'] + +llvm_config.add_tool_substitutions(tools, tool_dirs) diff --git a/libclc/test/lit.site.cfg.py.in b/libclc/test/lit.site.cfg.py.in new file mode 100644 index 0000000000000..adf6e09075556 --- /dev/null +++ b/libclc/test/lit.site.cfg.py.in @@ -0,0 +1,23 @@ +@LIT_SITE_CFG_IN_HEADER@ + +import sys + +config.llvm_src_root = "@LLVM_SOURCE_DIR@" +config.llvm_obj_root = "@LLVM_BINARY_DIR@" +config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" +config.llvm_libs_dir = "@LLVM_LIBS_DIR@" +config.llvm_shlib_dir = "@SHLIBDIR@" +config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@" +config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" +config.host_triple = "@LLVM_HOST_TRIPLE@" +config.target_triple = "@TARGET_TRIPLE@" +config.host_arch = "@HOST_ARCH@" +config.python_executable = "@PYTHON_EXECUTABLE@" +config.libclc_root = "@LIBCLC_ROOT_DIR@" +config.test_run_dir = "@LIBCLC_BINARY_DIR@" + +import lit.llvm +lit.llvm.initialize(lit_config, config) + +# Let the main config do the real work. +lit_config.load_config(config, "@LIBCLC_TEST_SOURCE_DIR@/lit.cfg.py") diff --git a/libclc/utils/gen-libclc-test.py b/libclc/utils/gen-libclc-test.py new file mode 100755 index 0000000000000..0a9d51dea6608 --- /dev/null +++ b/libclc/utils/gen-libclc-test.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python3 +import argparse +from itertools import takewhile +import json +import os +import sys +from typing import Callable, Dict, IO, List +import io +from string import Template +import re + +from spirv_common import ignore_overload, emit_guards, close_guards, clang_format + +def ignore_function(fun): + whitelist = [ + "ControlBarrier", + "GroupAsyncCopy", + "GroupWaitEvents", + "MemoryBarrier", + "prefetch" + ] + + return not any([fun.find(b) != -1 for b in whitelist]) + +def get_builtin_name(func): + func = func.replace("__spirv_", "") + builtin = func.replace("ocl_", "") + kind = "core" if builtin == func else "ocl" + return (kind, builtin) + +if __name__ == "__main__": + parser = argparse.ArgumentParser( + description=""" +Generate SPIR-V interface check tests. +Typical usage: + clang-tblgen --gen-clang-progmodel-builtins-as-json path/to/SPIRVBuiltins.td \ + -o builtin.json + generate-test-libclc.py builtin.json -format clang-format -o spirv_builtin.h +""") + parser.add_argument("input", + metavar="MAPPING", + type=argparse.FileType('r'), + help="Path to mapping.json") + parser.add_argument("-format", + metavar="clang-format", + nargs='?', + help="clang-format the output file") + parser.add_argument("-o", help="Folder to write the tests to") + args = parser.parse_args() + + with args.input as f: + mapping = json.load(f) + keys = list(mapping.keys()) + keys.sort() + for k in keys: + if ignore_function(k): + continue + overloads = mapping[k] + kind, builtin = get_builtin_name(k) + test_file = os.path.join(args.o, kind, builtin + ".cl") + if not os.path.exists(os.path.join(args.o, kind)): + os.makedirs(os.path.join(args.o, kind)) + with open(test_file, "w") as out_fd: + print("gen: " + test_file) + out_fd.write(""" +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// Autogenerated by gen-libclc-test.py + +// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s + +#include + +// CHECK-NOT: declare {{.*}} @_Z +// CHECK-NOT: call {{[^ ]*}} bitcast +""") + for proto, _ in overloads: + if ignore_overload(proto): + continue + nb_guards = emit_guards(out_fd, proto) + ret = proto[0] + proto = proto[1:] + param = { + "RET" : ret, + "FN" : k, + "PARAM" : ", ".join(["{} args_{}".format(ty, str(i)) for i, ty in enumerate(proto)]), + "RETURN" : "return" if ret != "void" else "", + "ARG" : ", ".join(["args_{}".format(str(i)) for i, _ in enumerate(proto)]) + } + out_fd.write("""__attribute__((overloadable)) {RET} test_{FN}({PARAM}) {{ + {RETURN} {FN}({ARG}); +}} + +""".format(**param)) + close_guards(out_fd, nb_guards) + if args.format: + clang_format(args.format, test_file) diff --git a/libclc/utils/spirv_common.py b/libclc/utils/spirv_common.py new file mode 100644 index 0000000000000..17ca6834ff571 --- /dev/null +++ b/libclc/utils/spirv_common.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +#===----------------------------------------------------------------------=== +# +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +# +#===----------------------------------------------------------------------=== + +import subprocess + +def ignore_overload(overload): + blacklist = ["__generic", "__private"] + + def is_black_listed(s): + return any([s.find(b) != -1 for b in blacklist]) + + return any([is_black_listed(s) for s in overload]) + +def overload_requires(overload, ext): + return any([ty.find(ext) != -1 for ty in overload]) + + +def overload_requires_fp64(overload): + return overload_requires(overload, "fp64") + + +def overload_requires_fp16(overload): + return overload_requires(overload, "fp16") + +def emit_guards(fd, overload): + """ + Emits guards according the function type. + Returns the number of emitted guards. + """ + requires_half = overload_requires_fp16(overload) + requires_double = overload_requires_fp64(overload) + nb_guards = 0 + if requires_half: + nb_guards += 1 + fd.write("#ifdef cl_khr_fp16\n") + if requires_double: + nb_guards += 1 + fd.write("#ifdef cl_khr_fp64\n") + return nb_guards + + +def close_guards(fd, nb_guards): + """ + Emits 'nb_guards' guards closing statement. + """ + for _ in range(nb_guards): + fd.write("#endif\n") + +def clang_format(format_tool, out_file): + # The ouput of clang-format is not stable, so we have to run the format twice + subprocess.check_output([format_tool, "-i", out_file]) + subprocess.check_output([format_tool, "-i", out_file])