File tree Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Expand file tree Collapse file tree 5 files changed +79
-0
lines changed Original file line number Diff line number Diff line change @@ -1250,6 +1250,25 @@ typedef struct _cl_queue_family_properties_intel {
1250
1250
#define CL_QUEUE_CAPABILITY_BARRIER_INTEL (1 << 25 )
1251
1251
#define CL_QUEUE_CAPABILITY_KERNEL_INTEL (1 << 26 )
1252
1252
1253
+ // /////////////////////////////////////////////////////////////////////////////
1254
+ // cl_intel_concurrent_dispatch
1255
+
1256
+ #define CL_KERNEL_EXEC_INFO_DISPATCH_TYPE_INTEL 0x4257
1257
+
1258
+ typedef cl_uint cl_kernel_exec_info_dispatch_type_intel;
1259
+
1260
+ #define CL_KERNEL_EXEC_INFO_DISPATCH_TYPE_DEFAULT_INTEL 0
1261
+ #define CL_KERNEL_EXEC_INFO_DISPATCH_TYPE_CONCURRENT_INTEL 1
1262
+
1263
+ extern CL_API_ENTRY
1264
+ cl_int CL_API_CALL clGetKernelMaxConcurrentWorkGroupCountINTEL (
1265
+ cl_command_queue command_queue,
1266
+ cl_kernel kernel,
1267
+ cl_uint work_dim,
1268
+ const size_t * global_work_offset,
1269
+ const size_t * local_work_size,
1270
+ size_t * max_work_group_count);
1271
+
1253
1272
// /////////////////////////////////////////////////////////////////////////////
1254
1273
// cl_intel_create_buffer_with_properties
1255
1274
Original file line number Diff line number Diff line change @@ -9055,6 +9055,51 @@ CL_API_ENTRY cl_int CL_API_CALL clGetKernelSuggestedLocalWorkSizeINTEL(
9055
9055
NULL_FUNCTION_POINTER_RETURN_ERROR (CL_INVALID_COMMAND_QUEUE);
9056
9056
}
9057
9057
9058
+ // /////////////////////////////////////////////////////////////////////////////
9059
+ //
9060
+ // cl_intel_concurrent_dispatch
9061
+ CL_API_ENTRY cl_int CL_API_CALL clGetKernelMaxConcurrentWorkGroupCountINTEL (
9062
+ cl_command_queue commandQueue,
9063
+ cl_kernel kernel,
9064
+ cl_uint workDim,
9065
+ const size_t *globalWorkOffset,
9066
+ const size_t *localWorkSize,
9067
+ size_t *maxWorkGroupCount)
9068
+ {
9069
+ CLIntercept* pIntercept = GetIntercept ();
9070
+
9071
+ if ( pIntercept )
9072
+ {
9073
+ const auto & dispatchX = pIntercept->dispatchX (commandQueue);
9074
+ if ( dispatchX.clGetKernelMaxConcurrentWorkGroupCountINTEL )
9075
+ {
9076
+ GET_ENQUEUE_COUNTER ();
9077
+ CALL_LOGGING_ENTER_KERNEL (
9078
+ kernel,
9079
+ " queue = %p, kernel = %p" ,
9080
+ commandQueue,
9081
+ kernel );
9082
+ HOST_PERFORMANCE_TIMING_START ();
9083
+
9084
+ cl_int retVal = dispatchX.clGetKernelMaxConcurrentWorkGroupCountINTEL (
9085
+ commandQueue,
9086
+ kernel,
9087
+ workDim,
9088
+ globalWorkOffset,
9089
+ localWorkSize,
9090
+ maxWorkGroupCount );
9091
+
9092
+ HOST_PERFORMANCE_TIMING_END ();
9093
+ CHECK_ERROR ( retVal );
9094
+ CALL_LOGGING_EXIT ( retVal );
9095
+
9096
+ return retVal;
9097
+ }
9098
+ }
9099
+
9100
+ NULL_FUNCTION_POINTER_RETURN_ERROR (CL_INVALID_COMMAND_QUEUE);
9101
+ }
9102
+
9058
9103
// /////////////////////////////////////////////////////////////////////////////
9059
9104
//
9060
9105
// cl_intel_accelerator
Original file line number Diff line number Diff line change @@ -547,6 +547,15 @@ struct CLdispatchX
547
547
cl_int (CL_API_CALL * clReleaseAcceleratorINTEL ) (
548
548
cl_accelerator_intel accelerator );
549
549
550
+ // cl_intel_concurrent_dispatch
551
+ cl_int (CL_API_CALL * clGetKernelMaxConcurrentWorkGroupCountINTEL ) (
552
+ cl_command_queue command_queue ,
553
+ cl_kernel kernel ,
554
+ cl_uint work_dim ,
555
+ const size_t * global_work_offset ,
556
+ const size_t * local_work_size ,
557
+ size_t * max_work_group_count );
558
+
550
559
// cl_intel_create_buffer_with_properties
551
560
cl_mem (CL_API_CALL * clCreateBufferWithPropertiesINTEL ) (
552
561
cl_context context ,
Original file line number Diff line number Diff line change @@ -1024,6 +1024,9 @@ CEnumNameMap::CEnumNameMap()
1024
1024
ADD_ENUM_NAME ( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_BARRIER_INTEL );
1025
1025
ADD_ENUM_NAME ( m_cl_command_queue_capabilities_intel, CL_QUEUE_CAPABILITY_KERNEL_INTEL );
1026
1026
1027
+ // cl_intel_concurrent_dispatch
1028
+ ADD_ENUM_NAME ( m_cl_int, CL_KERNEL_EXEC_INFO_DISPATCH_TYPE_INTEL );
1029
+
1027
1030
// cl_intel_device_attribute_query
1028
1031
ADD_ENUM_NAME ( m_cl_int, CL_DEVICE_IP_VERSION_INTEL );
1029
1032
ADD_ENUM_NAME ( m_cl_int, CL_DEVICE_ID_INTEL );
Original file line number Diff line number Diff line change @@ -13184,6 +13184,9 @@ void* CLIntercept::getExtensionFunctionAddress(
13184
13184
CHECK_RETURN_EXTENSION_FUNCTION ( clRetainAcceleratorINTEL );
13185
13185
CHECK_RETURN_EXTENSION_FUNCTION ( clReleaseAcceleratorINTEL );
13186
13186
13187
+ // cl_intel_concurrent_dispatch
13188
+ CHECK_RETURN_EXTENSION_FUNCTION ( clGetKernelMaxConcurrentWorkGroupCountINTEL );
13189
+
13187
13190
// cl_intel_create_buffer_with_properties
13188
13191
CHECK_RETURN_EXTENSION_FUNCTION ( clCreateBufferWithPropertiesINTEL );
13189
13192
You can’t perform that action at this time.
0 commit comments