@@ -121,6 +121,9 @@ typedef cl_uint cl_khronos_vendor_id;
121121typedef cl_properties cl_mem_properties ;
122122#endif
123123typedef cl_uint cl_version ;
124+ #ifdef CL_VERSION_3_1
125+ typedef cl_bitfield cl_device_integer_dot_product_capabilities ;
126+ #endif
124127
125128typedef struct _cl_image_format {
126129 cl_channel_order image_channel_order ;
@@ -171,6 +174,19 @@ typedef struct _cl_name_version {
171174
172175#endif
173176
177+ #ifdef CL_VERSION_3_1
178+
179+ typedef struct _cl_device_integer_dot_product_acceleration_properties {
180+ cl_bool signed_accelerated ;
181+ cl_bool unsigned_accelerated ;
182+ cl_bool mixed_signedness_accelerated ;
183+ cl_bool accumulating_saturating_signed_accelerated ;
184+ cl_bool accumulating_saturating_unsigned_accelerated ;
185+ cl_bool accumulating_saturating_mixed_signedness_accelerated ;
186+ } cl_device_integer_dot_product_acceleration_properties ;
187+
188+ #endif
189+
174190/******************************************************************************/
175191
176192/* Error Codes */
@@ -290,7 +306,10 @@ typedef struct _cl_name_version {
290306#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
291307#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
292308#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
293- #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
309+ #define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 /* deprecated */
310+ #ifdef CL_VERSION_3_1
311+ #define CL_DEVICE_MAX_WORK_GROUP_SIZES 0x1005
312+ #endif
294313#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
295314#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
296315#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
@@ -344,7 +363,7 @@ typedef struct _cl_name_version {
344363/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG which is already defined in "cl_ext.h" */
345364#ifdef CL_VERSION_1_1
346365#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
347- #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 /* deprecated */
366+ #define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
348367#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
349368#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
350369#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
@@ -404,12 +423,28 @@ typedef struct _cl_name_version {
404423#define CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x1067
405424#define CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT 0x1068
406425#define CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT 0x1069
407- /* 0x106A to 0x106E - Reserved for upcoming KHR extension */
426+ #endif
427+ #ifdef CL_VERSION_3_1
428+ #define CL_DEVICE_UUID 0x106A
429+ #define CL_DRIVER_UUID 0x106B
430+ #define CL_DEVICE_LUID_VALID 0x106C
431+ #define CL_DEVICE_LUID 0x106D
432+ #define CL_DEVICE_NODE_MASK 0x106E
433+ #endif
434+ #ifdef CL_VERSION_3_0
408435#define CL_DEVICE_OPENCL_C_FEATURES 0x106F
409436#define CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES 0x1070
410437#define CL_DEVICE_PIPE_SUPPORT 0x1071
411438#define CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED 0x1072
412439#endif
440+ #ifdef CL_VERSION_3_1
441+ #define CL_DEVICE_INTEGER_DOT_PRODUCT_CAPABILITIES 0x1073
442+ #define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_8BIT 0x1074
443+ #define CL_DEVICE_INTEGER_DOT_PRODUCT_ACCELERATION_PROPERTIES_4x8BIT_PACKED 0x1075
444+ #define CL_DEVICE_SPIRV_EXTENDED_INSTRUCTION_SETS 0x12B9
445+ #define CL_DEVICE_SPIRV_EXTENSIONS 0x12BA
446+ #define CL_DEVICE_SPIRV_CAPABILITIES 0x12BB
447+ #endif
413448
414449/* cl_device_fp_config - bitfield */
415450#define CL_FP_DENORM (1 << 0)
@@ -918,6 +953,18 @@ typedef struct _cl_name_version {
918953 (((minor) & CL_VERSION_MINOR_MASK) << CL_VERSION_PATCH_BITS) | \
919954 ((patch) & CL_VERSION_PATCH_MASK))
920955
956+ #ifdef CL_VERSION_3_1
957+
958+ /* Size Constants */
959+ #define CL_UUID_SIZE 16
960+ #define CL_LUID_SIZE 8
961+
962+ /* cl_device_integer_dot_product_capabilities - bitfield */
963+ #define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT_PACKED (1 << 0)
964+ #define CL_DEVICE_INTEGER_DOT_PRODUCT_INPUT_4x8BIT (1 << 1)
965+
966+ #endif
967+
921968/********************************************************************************************************/
922969
923970/* CL_NO_PROTOTYPES implies CL_NO_CORE_PROTOTYPES: */
@@ -1812,6 +1859,18 @@ clEnqueueSVMMigrateMem(cl_command_queue command_queue,
18121859
18131860#endif
18141861
1862+ #ifdef CL_VERSION_3_1
1863+
1864+ extern CL_API_ENTRY cl_int CL_API_CALL
1865+ clGetKernelSuggestedLocalWorkSize (cl_command_queue command_queue ,
1866+ cl_kernel kernel ,
1867+ cl_uint work_dim ,
1868+ const size_t * global_work_offset ,
1869+ const size_t * global_work_size ,
1870+ size_t * suggested_local_work_size ) CL_API_SUFFIX__VERSION_3_1 ;
1871+
1872+ #endif
1873+
18151874#ifdef CL_VERSION_1_2
18161875
18171876/* Extension function access
0 commit comments