@@ -196,6 +196,7 @@ class ur_function_v(IntEnum):
196
196
ADAPTER_RETAIN = 179 ## Enumerator for ::urAdapterRetain
197
197
ADAPTER_GET_LAST_ERROR = 180 ## Enumerator for ::urAdapterGetLastError
198
198
ADAPTER_GET_INFO = 181 ## Enumerator for ::urAdapterGetInfo
199
+ COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP = 182 ## Enumerator for ::urCommandBufferUpdateKernelLaunchExp
199
200
200
201
class ur_function_t (c_int ):
201
202
def __str__ (self ):
@@ -240,6 +241,10 @@ class ur_structure_type_v(IntEnum):
240
241
KERNEL_ARG_VALUE_PROPERTIES = 32 ## ::ur_kernel_arg_value_properties_t
241
242
KERNEL_ARG_LOCAL_PROPERTIES = 33 ## ::ur_kernel_arg_local_properties_t
242
243
EXP_COMMAND_BUFFER_DESC = 0x1000 ## ::ur_exp_command_buffer_desc_t
244
+ EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC = 0x1001 ## ::ur_exp_command_buffer_update_kernel_launch_desc_t
245
+ EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC = 0x1002 ## ::ur_exp_command_buffer_update_memobj_arg_desc_t
246
+ EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC = 0x1003 ## ::ur_exp_command_buffer_update_pointer_arg_desc_t
247
+ EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC = 0x1004 ## ::ur_exp_command_buffer_update_exec_info_desc_t
243
248
EXP_SAMPLER_MIP_PROPERTIES = 0x2000 ## ::ur_exp_sampler_mip_properties_t
244
249
EXP_INTEROP_MEM_DESC = 0x2001 ## ::ur_exp_interop_mem_desc_t
245
250
EXP_INTEROP_SEMAPHORE_DESC = 0x2002 ## ::ur_exp_interop_semaphore_desc_t
@@ -443,6 +448,7 @@ class ur_result_v(IntEnum):
443
448
ERROR_INVALID_COMMAND_BUFFER_EXP = 0x1000 ## Invalid Command-Buffer
444
449
ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP = 0x1001 ## Sync point is not valid for the command-buffer
445
450
ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP = 0x1002 ## Sync point wait list is invalid
451
+ ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP = 0x1003 ## Handle to command-buffer command is invalid
446
452
ERROR_UNKNOWN = 0x7ffffffe ## Unknown or internal error
447
453
448
454
class ur_result_t (c_int ):
@@ -833,6 +839,10 @@ class ur_device_info_v(IntEnum):
833
839
## version than older devices.
834
840
VIRTUAL_MEMORY_SUPPORT = 114 ## [::ur_bool_t] return true if the device supports virtual memory.
835
841
ESIMD_SUPPORT = 115 ## [::ur_bool_t] return true if the device supports ESIMD.
842
+ COMMAND_BUFFER_SUPPORT_EXP = 0x1000 ## [::ur_bool_t] returns true if the device supports the use of
843
+ ## command-buffers.
844
+ COMMAND_BUFFER_UPDATE_SUPPORT_EXP = 0x1001 ## [::ur_bool_t] returns true if the device supports updating the
845
+ ## commands in a command-buffer.
836
846
BINDLESS_IMAGES_SUPPORT_EXP = 0x2000 ## [::ur_bool_t] returns true if the device supports the creation of
837
847
## bindless images
838
848
BINDLESS_IMAGES_SHARED_USM_SUPPORT_EXP = 0x2001 ## [::ur_bool_t] returns true if the device supports the creation of
@@ -2242,6 +2252,69 @@ class ur_exp_command_buffer_desc_t(Structure):
2242
2252
("pNext" , c_void_p ) ## [in][optional] pointer to extension-specific structure
2243
2253
]
2244
2254
2255
+ ###############################################################################
2256
+ ## @brief Descriptor type for updating a kernel command memobj argument.
2257
+ class ur_exp_command_buffer_update_memobj_arg_desc_t (Structure ):
2258
+ _fields_ = [
2259
+ ("stype" , ur_structure_type_t ), ## [in] type of this structure, must be
2260
+ ## ::UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_MEMOBJ_ARG_DESC
2261
+ ("pNext" , c_void_p ), ## [in][optional] pointer to extension-specific structure
2262
+ ("argIndex" , c_ulong ), ## [in] Argument index.
2263
+ ("pProperties" , * ), ## [in][optinal] Pointer to memory object properties.
2264
+ ("hArgValue" , ur_mem_handle_t ) ## [in][optional] Handle of memory object.
2265
+ ]
2266
+
2267
+ ###############################################################################
2268
+ ## @brief Descriptor type for updating a kernel command pointer argument.
2269
+ class ur_exp_command_buffer_update_pointer_arg_desc_t (Structure ):
2270
+ _fields_ = [
2271
+ ("stype" , ur_structure_type_t ), ## [in] type of this structure, must be
2272
+ ## ::UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC
2273
+ ("pNext" , c_void_p ), ## [in][optional] pointer to extension-specific structure
2274
+ ("argIndex" , c_ulong ), ## [in] Argument index.
2275
+ ("pProperties" , * ), ## [in][optinal] Pointer to USM pointer properties.
2276
+ ("pArgValue" , * ) ## [in][optional] USM pointer to memory location holding the argument
2277
+ ## value.
2278
+ ]
2279
+
2280
+ ###############################################################################
2281
+ ## @brief Descriptor type for updating kernel command execution info.
2282
+ class ur_exp_command_buffer_update_exec_info_desc_t (Structure ):
2283
+ _fields_ = [
2284
+ ("stype" , ur_structure_type_t ), ## [in] type of this structure, must be
2285
+ ## ::UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_EXEC_INFO_DESC
2286
+ ("pNext" , c_void_p ), ## [in][optional] pointer to extension-specific structure
2287
+ ("propName" , ur_kernel_exec_info_t ), ## [in] Name of execution attribute.
2288
+ ("propSize" , c_size_t ), ## [in] Size of execution attribute.
2289
+ ("pProperties" , * ), ## [in][optional] Pointer to execution info properties.
2290
+ ("pPropValue" , * ) ## [in] Pointer to memory location holding the property value.
2291
+ ]
2292
+
2293
+ ###############################################################################
2294
+ ## @brief Descriptor type for updating a kernel launch command.
2295
+ class ur_exp_command_buffer_update_kernel_launch_desc_t (Structure ):
2296
+ _fields_ = [
2297
+ ("stype" , ur_structure_type_t ), ## [in] type of this structure, must be
2298
+ ## ::UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC
2299
+ ("pNext" , c_void_p ), ## [in][optional] pointer to extension-specific structure
2300
+ ("numMemobjArgs" , c_ulong ), ## [in] Length of pArgMemobjList.
2301
+ ("numPointerArgs" , c_ulong ), ## [in] Length of pArgPointerList.
2302
+ ("numExecInfos" , c_ulong ), ## [in] Length of pExecInfoList.
2303
+ ("workDim" , c_ulong ), ## [in] Number of work dimensions in the kernel ND-range, from 1-3.
2304
+ ("pArgMemobjList" , POINTER (ur_exp_command_buffer_update_memobj_arg_desc_t )),## [in] An array describing the new kernel mem obj arguments for the
2305
+ ## command.
2306
+ ("pArgPointerList" , POINTER (ur_exp_command_buffer_update_pointer_arg_desc_t )), ## [in] An array describing the new kernel pointer arguments for the
2307
+ ## command.
2308
+ ("pArgExecInfoList" , POINTER (ur_exp_command_buffer_update_exec_info_desc_t )), ## [in] An array describing the execution info objects for the command.
2309
+ ("pGlobalWorkOffset" , POINTER (c_size_t )), ## [in] Array of workDim unsigned values that describe the offset used to
2310
+ ## calculate the global ID.
2311
+ ("pGlobalWorkSize" , POINTER (c_size_t )), ## [in] Array of workDim unsigned values that describe the number of
2312
+ ## global work-items.
2313
+ ("pLocalWorkSize" , POINTER (c_size_t )) ## [in] Array of workDim unsigned values that describe the number of
2314
+ ## work-items that make up a work-group. If nullptr, the runtime
2315
+ ## implementation will choose the work-group size.
2316
+ ]
2317
+
2245
2318
###############################################################################
2246
2319
## @brief A value that identifies a command inside of a command-buffer, used for
2247
2320
## defining dependencies between commands in the same command-buffer.
@@ -2253,6 +2326,11 @@ class ur_exp_command_buffer_sync_point_t(c_ulong):
2253
2326
class ur_exp_command_buffer_handle_t (c_void_p ):
2254
2327
pass
2255
2328
2329
+ ###############################################################################
2330
+ ## @brief Handle of a Command-Buffer command
2331
+ class ur_exp_command_buffer_command_handle_t (c_void_p ):
2332
+ pass
2333
+
2256
2334
###############################################################################
2257
2335
## @brief Supported peer info
2258
2336
class ur_exp_peer_info_v (IntEnum ):
@@ -3431,9 +3509,9 @@ class ur_usm_exp_dditable_t(Structure):
3431
3509
###############################################################################
3432
3510
## @brief Function-pointer for urCommandBufferAppendKernelLaunchExp
3433
3511
if __use_win_types :
3434
- _urCommandBufferAppendKernelLaunchExp_t = WINFUNCTYPE ( ur_result_t , ur_exp_command_buffer_handle_t , ur_kernel_handle_t , c_ulong , POINTER (c_size_t ), POINTER (c_size_t ), POINTER (c_size_t ), c_ulong , POINTER (ur_exp_command_buffer_sync_point_t ), POINTER (ur_exp_command_buffer_sync_point_t ) )
3512
+ _urCommandBufferAppendKernelLaunchExp_t = WINFUNCTYPE ( ur_result_t , ur_exp_command_buffer_handle_t , ur_kernel_handle_t , c_ulong , POINTER (c_size_t ), POINTER (c_size_t ), POINTER (c_size_t ), c_ulong , POINTER (ur_exp_command_buffer_sync_point_t ), POINTER (ur_exp_command_buffer_sync_point_t ), POINTER ( ur_exp_command_buffer_command_handle_t ) )
3435
3513
else :
3436
- _urCommandBufferAppendKernelLaunchExp_t = CFUNCTYPE ( ur_result_t , ur_exp_command_buffer_handle_t , ur_kernel_handle_t , c_ulong , POINTER (c_size_t ), POINTER (c_size_t ), POINTER (c_size_t ), c_ulong , POINTER (ur_exp_command_buffer_sync_point_t ), POINTER (ur_exp_command_buffer_sync_point_t ) )
3514
+ _urCommandBufferAppendKernelLaunchExp_t = CFUNCTYPE ( ur_result_t , ur_exp_command_buffer_handle_t , ur_kernel_handle_t , c_ulong , POINTER (c_size_t ), POINTER (c_size_t ), POINTER (c_size_t ), c_ulong , POINTER (ur_exp_command_buffer_sync_point_t ), POINTER (ur_exp_command_buffer_sync_point_t ), POINTER ( ur_exp_command_buffer_command_handle_t ) )
3437
3515
3438
3516
###############################################################################
3439
3517
## @brief Function-pointer for urCommandBufferAppendMemcpyUSMExp
@@ -3491,6 +3569,13 @@ class ur_usm_exp_dditable_t(Structure):
3491
3569
else :
3492
3570
_urCommandBufferEnqueueExp_t = CFUNCTYPE ( ur_result_t , ur_exp_command_buffer_handle_t , ur_queue_handle_t , c_ulong , POINTER (ur_event_handle_t ), POINTER (ur_event_handle_t ) )
3493
3571
3572
+ ###############################################################################
3573
+ ## @brief Function-pointer for urCommandBufferUpdateKernelLaunchExp
3574
+ if __use_win_types :
3575
+ _urCommandBufferUpdateKernelLaunchExp_t = WINFUNCTYPE ( ur_result_t , ur_exp_command_buffer_command_handle_t , POINTER (ur_exp_command_buffer_update_kernel_launch_desc_t ) )
3576
+ else :
3577
+ _urCommandBufferUpdateKernelLaunchExp_t = CFUNCTYPE ( ur_result_t , ur_exp_command_buffer_command_handle_t , POINTER (ur_exp_command_buffer_update_kernel_launch_desc_t ) )
3578
+
3494
3579
3495
3580
###############################################################################
3496
3581
## @brief Table of CommandBufferExp functions pointers
@@ -3508,7 +3593,8 @@ class ur_command_buffer_exp_dditable_t(Structure):
3508
3593
("pfnAppendMembufferCopyRectExp" , c_void_p ), ## _urCommandBufferAppendMembufferCopyRectExp_t
3509
3594
("pfnAppendMembufferWriteRectExp" , c_void_p ), ## _urCommandBufferAppendMembufferWriteRectExp_t
3510
3595
("pfnAppendMembufferReadRectExp" , c_void_p ), ## _urCommandBufferAppendMembufferReadRectExp_t
3511
- ("pfnEnqueueExp" , c_void_p ) ## _urCommandBufferEnqueueExp_t
3596
+ ("pfnEnqueueExp" , c_void_p ), ## _urCommandBufferEnqueueExp_t
3597
+ ("pfnUpdateKernelLaunchExp" , c_void_p ) ## _urCommandBufferUpdateKernelLaunchExp_t
3512
3598
]
3513
3599
3514
3600
###############################################################################
@@ -4054,6 +4140,7 @@ def __init__(self, version : ur_api_version_t):
4054
4140
self .urCommandBufferAppendMembufferWriteRectExp = _urCommandBufferAppendMembufferWriteRectExp_t (self .__dditable .CommandBufferExp .pfnAppendMembufferWriteRectExp )
4055
4141
self .urCommandBufferAppendMembufferReadRectExp = _urCommandBufferAppendMembufferReadRectExp_t (self .__dditable .CommandBufferExp .pfnAppendMembufferReadRectExp )
4056
4142
self .urCommandBufferEnqueueExp = _urCommandBufferEnqueueExp_t (self .__dditable .CommandBufferExp .pfnEnqueueExp )
4143
+ self .urCommandBufferUpdateKernelLaunchExp = _urCommandBufferUpdateKernelLaunchExp_t (self .__dditable .CommandBufferExp .pfnUpdateKernelLaunchExp )
4057
4144
4058
4145
# call driver to get function pointers
4059
4146
UsmP2PExp = ur_usm_p2p_exp_dditable_t ()
0 commit comments