@@ -209,6 +209,8 @@ typedef enum ur_function_t {
209
209
UR_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_FILL_EXP = 192, ///< Enumerator for ::urCommandBufferAppendMemBufferFillExp
210
210
UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP = 193, ///< Enumerator for ::urEnqueueCooperativeKernelLaunchExp
211
211
UR_FUNCTION_KERNEL_SUGGEST_MAX_COOPERATIVE_GROUP_COUNT_EXP = 194, ///< Enumerator for ::urKernelSuggestMaxCooperativeGroupCountExp
212
+ UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP = 195, ///< Enumerator for ::urCommandBufferAppendUSMPrefetchExp
213
+ UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP = 196, ///< Enumerator for ::urCommandBufferAppendUSMAdviseExp
212
214
/// @cond
213
215
UR_FUNCTION_FORCE_UINT32 = 0x7fffffff
214
216
/// @endcond
@@ -8159,6 +8161,73 @@ urCommandBufferAppendMemBufferFillExp(
8159
8161
ur_exp_command_buffer_sync_point_t *pSyncPoint ///< [out][optional] sync point associated with this command.
8160
8162
);
8161
8163
8164
+ ///////////////////////////////////////////////////////////////////////////////
8165
+ /// @brief Append a USM Prefetch command to a command-buffer object
8166
+ ///
8167
+ /// @returns
8168
+ /// - ::UR_RESULT_SUCCESS
8169
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8170
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8171
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8172
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8173
+ /// + `NULL == hCommandBuffer`
8174
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8175
+ /// + `NULL == pMemory`
8176
+ /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
8177
+ /// + `::UR_USM_MIGRATION_FLAGS_MASK & flags`
8178
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
8179
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
8180
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_WAIT_LIST_EXP
8181
+ /// + `pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0`
8182
+ /// + `pSyncPointWaitList != NULL && numSyncPointsInWaitList == 0`
8183
+ /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
8184
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8185
+ /// + `size == 0`
8186
+ /// + If `size` is higher than the allocation size of `pMemory`
8187
+ /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
8188
+ /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
8189
+ UR_APIEXPORT ur_result_t UR_APICALL
8190
+ urCommandBufferAppendUSMPrefetchExp(
8191
+ ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object.
8192
+ void *pMemory, ///< [in] pointer to USM allocated memory to prefetch.
8193
+ size_t size, ///< [in] size in bytes to be fetched.
8194
+ ur_usm_migration_flags_t flags, ///< [in] USM prefetch flags
8195
+ uint32_t numSyncPointsInWaitList, ///< [in] The number of sync points in the provided dependency list.
8196
+ const ur_exp_command_buffer_sync_point_t *pSyncPointWaitList, ///< [in][optional] A list of sync points that this command depends on.
8197
+ ur_exp_command_buffer_sync_point_t *pSyncPoint ///< [out][optional] sync point associated with this command.
8198
+ );
8199
+
8200
+ ///////////////////////////////////////////////////////////////////////////////
8201
+ /// @brief Append a USM Advise command to a command-buffer object
8202
+ ///
8203
+ /// @returns
8204
+ /// - ::UR_RESULT_SUCCESS
8205
+ /// - ::UR_RESULT_ERROR_UNINITIALIZED
8206
+ /// - ::UR_RESULT_ERROR_DEVICE_LOST
8207
+ /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC
8208
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE
8209
+ /// + `NULL == hCommandBuffer`
8210
+ /// - ::UR_RESULT_ERROR_INVALID_NULL_POINTER
8211
+ /// + `NULL == pMemory`
8212
+ /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION
8213
+ /// + `::UR_USM_ADVICE_FLAGS_MASK & advice`
8214
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP
8215
+ /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_SYNC_POINT_EXP
8216
+ /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT
8217
+ /// - ::UR_RESULT_ERROR_INVALID_SIZE
8218
+ /// + `size == 0`
8219
+ /// + If `size` is higher than the allocation size of `pMemory`
8220
+ /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY
8221
+ /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES
8222
+ UR_APIEXPORT ur_result_t UR_APICALL
8223
+ urCommandBufferAppendUSMAdviseExp(
8224
+ ur_exp_command_buffer_handle_t hCommandBuffer, ///< [in] handle of the command-buffer object.
8225
+ void *pMemory, ///< [in] pointer to the USM memory object.
8226
+ size_t size, ///< [in] size in bytes to be advised.
8227
+ ur_usm_advice_flags_t advice, ///< [in] USM memory advice
8228
+ ur_exp_command_buffer_sync_point_t *pSyncPoint ///< [out][optional] sync point associated with this command.
8229
+ );
8230
+
8162
8231
///////////////////////////////////////////////////////////////////////////////
8163
8232
/// @brief Submit a command-buffer for execution on a queue.
8164
8233
///
@@ -10332,6 +10401,32 @@ typedef struct ur_command_buffer_append_mem_buffer_fill_exp_params_t {
10332
10401
ur_exp_command_buffer_sync_point_t **ppSyncPoint;
10333
10402
} ur_command_buffer_append_mem_buffer_fill_exp_params_t;
10334
10403
10404
+ ///////////////////////////////////////////////////////////////////////////////
10405
+ /// @brief Function parameters for urCommandBufferAppendUSMPrefetchExp
10406
+ /// @details Each entry is a pointer to the parameter passed to the function;
10407
+ /// allowing the callback the ability to modify the parameter's value
10408
+ typedef struct ur_command_buffer_append_usm_prefetch_exp_params_t {
10409
+ ur_exp_command_buffer_handle_t *phCommandBuffer;
10410
+ void **ppMemory;
10411
+ size_t *psize;
10412
+ ur_usm_migration_flags_t *pflags;
10413
+ uint32_t *pnumSyncPointsInWaitList;
10414
+ const ur_exp_command_buffer_sync_point_t **ppSyncPointWaitList;
10415
+ ur_exp_command_buffer_sync_point_t **ppSyncPoint;
10416
+ } ur_command_buffer_append_usm_prefetch_exp_params_t;
10417
+
10418
+ ///////////////////////////////////////////////////////////////////////////////
10419
+ /// @brief Function parameters for urCommandBufferAppendUSMAdviseExp
10420
+ /// @details Each entry is a pointer to the parameter passed to the function;
10421
+ /// allowing the callback the ability to modify the parameter's value
10422
+ typedef struct ur_command_buffer_append_usm_advise_exp_params_t {
10423
+ ur_exp_command_buffer_handle_t *phCommandBuffer;
10424
+ void **ppMemory;
10425
+ size_t *psize;
10426
+ ur_usm_advice_flags_t *padvice;
10427
+ ur_exp_command_buffer_sync_point_t **ppSyncPoint;
10428
+ } ur_command_buffer_append_usm_advise_exp_params_t;
10429
+
10335
10430
///////////////////////////////////////////////////////////////////////////////
10336
10431
/// @brief Function parameters for urCommandBufferEnqueueExp
10337
10432
/// @details Each entry is a pointer to the parameter passed to the function;
0 commit comments