From aec66e819a91dc2d313fdbb5dd2bedc5a8843b98 Mon Sep 17 00:00:00 2001 From: Ewan Crawford Date: Thu, 23 Jan 2025 11:06:44 +0000 Subject: [PATCH] Rename urCommandBufferEnqueueExp to urEnqueueCommandBufferExp The API to enqueue a closed command-buffer to a queue is defined in the YAML as a part of the command-buffer class, but it should be part of the enqueue class like other enqueue API extensions. This PR updates the YAML and regenerates UR code, making the associated changes to adapters and CTS. Closes https://github.com/oneapi-src/unified-runtime/issues/2600 --- include/ur_api.h | 40 +++---- include/ur_api_funcs.def | 2 +- include/ur_ddi.h | 14 +-- include/ur_print.h | 20 ++-- include/ur_print.hpp | 110 +++++++++--------- scripts/core/EXP-COMMAND-BUFFER.rst | 16 +-- scripts/core/exp-command-buffer.yml | 14 +-- scripts/core/registry.yml | 6 +- source/adapters/cuda/command_buffer.cpp | 6 +- source/adapters/cuda/ur_interface_loader.cpp | 2 +- source/adapters/hip/command_buffer.cpp | 6 +- source/adapters/hip/ur_interface_loader.cpp | 2 +- source/adapters/level_zero/command_buffer.cpp | 6 +- source/adapters/level_zero/event.cpp | 4 +- .../level_zero/ur_interface_loader.cpp | 2 +- .../level_zero/ur_interface_loader.hpp | 4 +- source/adapters/level_zero/v2/api.cpp | 4 +- source/adapters/level_zero/v2/queue_api.cpp | 9 ++ source/adapters/level_zero/v2/queue_api.hpp | 4 + source/adapters/mock/ur_mockddi.cpp | 20 ++-- source/adapters/native_cpu/command_buffer.cpp | 4 +- .../native_cpu/ur_interface_loader.cpp | 2 +- source/adapters/opencl/command_buffer.cpp | 4 +- source/adapters/opencl/event.cpp | 2 +- .../adapters/opencl/ur_interface_loader.cpp | 2 +- .../loader/layers/sanitizer/asan/asan_ddi.cpp | 1 - source/loader/layers/tracing/ur_trcddi.cpp | 39 ++++--- source/loader/layers/validation/ur_valddi.cpp | 28 ++--- source/loader/loader.def.in | 4 +- source/loader/loader.map.in | 4 +- source/loader/ur_ldrddi.cpp | 33 +++--- source/loader/ur_libapi.cpp | 18 +-- source/loader/ur_print.cpp | 16 +-- source/ur_api.cpp | 8 +- .../exp_command_buffer/commands.cpp | 2 +- .../exp_command_buffer/event_sync.cpp | 32 ++--- test/conformance/exp_command_buffer/fill.cpp | 4 +- .../exp_command_buffer/kernel_event_sync.cpp | 10 +- .../exp_command_buffer/release.cpp | 6 +- .../update/buffer_fill_kernel_update.cpp | 20 ++-- .../update/buffer_saxpy_kernel_update.cpp | 4 +- .../exp_command_buffer/update/event_sync.cpp | 56 ++++----- .../update/kernel_event_sync.cpp | 8 +- .../update/kernel_handle_update.cpp | 28 ++--- .../update/local_memory_update.cpp | 32 ++--- .../update/ndrange_update.cpp | 22 ++-- .../update/usm_fill_kernel_update.cpp | 12 +- .../update/usm_saxpy_kernel_update.cpp | 16 +-- .../urMultiDeviceProgramCreateWithBinary.cpp | 6 +- 49 files changed, 365 insertions(+), 349 deletions(-) diff --git a/include/ur_api.h b/include/ur_api.h index ad88f3ac08..38c65a555f 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -423,8 +423,6 @@ typedef enum ur_function_t { UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP = 240, /// Enumerator for ::urCommandBufferAppendUSMAdviseExp UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP = 241, - /// Enumerator for ::urCommandBufferEnqueueExp - UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP = 242, /// Enumerator for ::urCommandBufferUpdateSignalEventExp UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP = 243, /// Enumerator for ::urCommandBufferUpdateWaitEventsExp @@ -439,6 +437,8 @@ typedef enum ur_function_t { UR_FUNCTION_TENSOR_MAP_ENCODE_TILED_EXP = 248, /// Enumerator for ::urPhysicalMemGetInfo UR_FUNCTION_PHYSICAL_MEM_GET_INFO = 249, + /// Enumerator for ::urEnqueueCommandBufferExp + UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP = 250, /// @cond UR_FUNCTION_FORCE_UINT32 = 0x7fffffff /// @endcond @@ -7039,8 +7039,8 @@ typedef enum ur_command_t { UR_COMMAND_READ_HOST_PIPE = 25, /// Event created by ::urEnqueueWriteHostPipe UR_COMMAND_WRITE_HOST_PIPE = 26, - /// Event created by ::urCommandBufferEnqueueExp - UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP = 0x1000, + /// Event created by ::urEnqueueCommandBufferExp + UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP = 0x1000, /// Event created by ::urBindlessImagesWaitExternalSemaphoreExp UR_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP = 0x2000, /// Event created by ::urBindlessImagesSignalExternalSemaphoreExp @@ -10994,8 +10994,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// - ::UR_RESULT_ERROR_DEVICE_LOST /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `NULL == hCommandBuffer` /// + `NULL == hQueue` +/// + `NULL == hCommandBuffer` /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_INVALID_EVENT @@ -11005,11 +11005,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -13812,6 +13812,18 @@ typedef struct ur_enqueue_events_wait_with_barrier_ext_params_t { ur_event_handle_t **pphEvent; } ur_enqueue_events_wait_with_barrier_ext_params_t; +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function parameters for urEnqueueCommandBufferExp +/// @details Each entry is a pointer to the parameter passed to the function; +/// allowing the callback the ability to modify the parameter's value +typedef struct ur_enqueue_command_buffer_exp_params_t { + ur_queue_handle_t *phQueue; + ur_exp_command_buffer_handle_t *phCommandBuffer; + uint32_t *pnumEventsInWaitList; + const ur_event_handle_t **pphEventWaitList; + ur_event_handle_t **pphEvent; +} ur_enqueue_command_buffer_exp_params_t; + /////////////////////////////////////////////////////////////////////////////// /// @brief Function parameters for urEnqueueCooperativeKernelLaunchExp /// @details Each entry is a pointer to the parameter passed to the function; @@ -14491,18 +14503,6 @@ typedef struct ur_command_buffer_append_usm_advise_exp_params_t { ur_exp_command_buffer_command_handle_t **pphCommand; } ur_command_buffer_append_usm_advise_exp_params_t; -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function parameters for urCommandBufferEnqueueExp -/// @details Each entry is a pointer to the parameter passed to the function; -/// allowing the callback the ability to modify the parameter's value -typedef struct ur_command_buffer_enqueue_exp_params_t { - ur_exp_command_buffer_handle_t *phCommandBuffer; - ur_queue_handle_t *phQueue; - uint32_t *pnumEventsInWaitList; - const ur_event_handle_t **pphEventWaitList; - ur_event_handle_t **pphEvent; -} ur_command_buffer_enqueue_exp_params_t; - /////////////////////////////////////////////////////////////////////////////// /// @brief Function parameters for urCommandBufferRetainCommandExp /// @details Each entry is a pointer to the parameter passed to the function; diff --git a/include/ur_api_funcs.def b/include/ur_api_funcs.def index 280db37067..1678f395db 100644 --- a/include/ur_api_funcs.def +++ b/include/ur_api_funcs.def @@ -132,6 +132,7 @@ _UR_API(urEnqueueReadHostPipe) _UR_API(urEnqueueWriteHostPipe) _UR_API(urEnqueueEventsWaitWithBarrierExt) _UR_API(urEnqueueKernelLaunchCustomExp) +_UR_API(urEnqueueCommandBufferExp) _UR_API(urEnqueueCooperativeKernelLaunchExp) _UR_API(urEnqueueTimestampRecordingExp) _UR_API(urEnqueueNativeCommandExp) @@ -181,7 +182,6 @@ _UR_API(urCommandBufferAppendMemBufferReadRectExp) _UR_API(urCommandBufferAppendMemBufferFillExp) _UR_API(urCommandBufferAppendUSMPrefetchExp) _UR_API(urCommandBufferAppendUSMAdviseExp) -_UR_API(urCommandBufferEnqueueExp) _UR_API(urCommandBufferRetainCommandExp) _UR_API(urCommandBufferReleaseCommandExp) _UR_API(urCommandBufferUpdateKernelLaunchExp) diff --git a/include/ur_ddi.h b/include/ur_ddi.h index 9cd051db18..8eeeeda301 100644 --- a/include/ur_ddi.h +++ b/include/ur_ddi.h @@ -1117,6 +1117,12 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueKernelLaunchCustomExp_t)( const size_t *, const size_t *, uint32_t, const ur_exp_launch_property_t *, uint32_t, const ur_event_handle_t *, ur_event_handle_t *); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Function-pointer for urEnqueueCommandBufferExp +typedef ur_result_t(UR_APICALL *ur_pfnEnqueueCommandBufferExp_t)( + ur_queue_handle_t, ur_exp_command_buffer_handle_t, uint32_t, + const ur_event_handle_t *, ur_event_handle_t *); + /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urEnqueueCooperativeKernelLaunchExp typedef ur_result_t(UR_APICALL *ur_pfnEnqueueCooperativeKernelLaunchExp_t)( @@ -1142,6 +1148,7 @@ typedef ur_result_t(UR_APICALL *ur_pfnEnqueueNativeCommandExp_t)( /// @brief Table of EnqueueExp functions pointers typedef struct ur_enqueue_exp_dditable_t { ur_pfnEnqueueKernelLaunchCustomExp_t pfnKernelLaunchCustomExp; + ur_pfnEnqueueCommandBufferExp_t pfnCommandBufferExp; ur_pfnEnqueueCooperativeKernelLaunchExp_t pfnCooperativeKernelLaunchExp; ur_pfnEnqueueTimestampRecordingExp_t pfnTimestampRecordingExp; ur_pfnEnqueueNativeCommandExp_t pfnNativeCommandExp; @@ -1590,12 +1597,6 @@ typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferAppendUSMAdviseExp_t)( const ur_event_handle_t *, ur_exp_command_buffer_sync_point_t *, ur_event_handle_t *, ur_exp_command_buffer_command_handle_t *); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Function-pointer for urCommandBufferEnqueueExp -typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferEnqueueExp_t)( - ur_exp_command_buffer_handle_t, ur_queue_handle_t, uint32_t, - const ur_event_handle_t *, ur_event_handle_t *); - /////////////////////////////////////////////////////////////////////////////// /// @brief Function-pointer for urCommandBufferRetainCommandExp typedef ur_result_t(UR_APICALL *ur_pfnCommandBufferRetainCommandExp_t)( @@ -1655,7 +1656,6 @@ typedef struct ur_command_buffer_exp_dditable_t { ur_pfnCommandBufferAppendMemBufferFillExp_t pfnAppendMemBufferFillExp; ur_pfnCommandBufferAppendUSMPrefetchExp_t pfnAppendUSMPrefetchExp; ur_pfnCommandBufferAppendUSMAdviseExp_t pfnAppendUSMAdviseExp; - ur_pfnCommandBufferEnqueueExp_t pfnEnqueueExp; ur_pfnCommandBufferRetainCommandExp_t pfnRetainCommandExp; ur_pfnCommandBufferReleaseCommandExp_t pfnReleaseCommandExp; ur_pfnCommandBufferUpdateKernelLaunchExp_t pfnUpdateKernelLaunchExp; diff --git a/include/ur_print.h b/include/ur_print.h index b2e16f6341..92524ae371 100644 --- a/include/ur_print.h +++ b/include/ur_print.h @@ -2676,6 +2676,16 @@ urPrintEnqueueEventsWaitWithBarrierExtParams( const struct ur_enqueue_events_wait_with_barrier_ext_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print ur_enqueue_command_buffer_exp_params_t struct +/// @returns +/// - ::UR_RESULT_SUCCESS +/// - ::UR_RESULT_ERROR_INVALID_SIZE +/// - `buff_size < out_size` +UR_APIEXPORT ur_result_t UR_APICALL urPrintEnqueueCommandBufferExpParams( + const struct ur_enqueue_command_buffer_exp_params_t *params, char *buffer, + const size_t buff_size, size_t *out_size); + /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_enqueue_cooperative_kernel_launch_exp_params_t struct /// @returns @@ -3211,16 +3221,6 @@ urPrintCommandBufferAppendUsmAdviseExpParams( const struct ur_command_buffer_append_usm_advise_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size); -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print ur_command_buffer_enqueue_exp_params_t struct -/// @returns -/// - ::UR_RESULT_SUCCESS -/// - ::UR_RESULT_ERROR_INVALID_SIZE -/// - `buff_size < out_size` -UR_APIEXPORT ur_result_t UR_APICALL urPrintCommandBufferEnqueueExpParams( - const struct ur_command_buffer_enqueue_exp_params_t *params, char *buffer, - const size_t buff_size, size_t *out_size); - /////////////////////////////////////////////////////////////////////////////// /// @brief Print ur_command_buffer_retain_command_exp_params_t struct /// @returns diff --git a/include/ur_print.hpp b/include/ur_print.hpp index 2e6f7d715d..e2637a03e3 100644 --- a/include/ur_print.hpp +++ b/include/ur_print.hpp @@ -1200,9 +1200,6 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { case UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP"; break; - case UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP: - os << "UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP"; - break; case UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP: os << "UR_FUNCTION_COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP"; break; @@ -1224,6 +1221,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_function_t value) { case UR_FUNCTION_PHYSICAL_MEM_GET_INFO: os << "UR_FUNCTION_PHYSICAL_MEM_GET_INFO"; break; + case UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP: + os << "UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP"; + break; default: os << "unknown enumerator"; break; @@ -9865,8 +9865,8 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_command_t value) { case UR_COMMAND_WRITE_HOST_PIPE: os << "UR_COMMAND_WRITE_HOST_PIPE"; break; - case UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP: - os << "UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP"; + case UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP: + os << "UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP"; break; case UR_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP: os << "UR_COMMAND_EXTERNAL_SEMAPHORE_WAIT_EXP"; @@ -16693,6 +16693,53 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } +/////////////////////////////////////////////////////////////////////////////// +/// @brief Print operator for the ur_enqueue_command_buffer_exp_params_t type +/// @returns +/// std::ostream & +inline std::ostream & +operator<<(std::ostream &os, + [[maybe_unused]] const struct ur_enqueue_command_buffer_exp_params_t + *params) { + + os << ".hQueue = "; + + ur::details::printPtr(os, *(params->phQueue)); + + os << ", "; + os << ".hCommandBuffer = "; + + ur::details::printPtr(os, *(params->phCommandBuffer)); + + os << ", "; + os << ".numEventsInWaitList = "; + + os << *(params->pnumEventsInWaitList); + + os << ", "; + os << ".phEventWaitList = "; + ur::details::printPtr( + os, reinterpret_cast(*(params->pphEventWaitList))); + if (*(params->pphEventWaitList) != NULL) { + os << " {"; + for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { + if (i != 0) { + os << ", "; + } + + ur::details::printPtr(os, (*(params->pphEventWaitList))[i]); + } + os << "}"; + } + + os << ", "; + os << ".phEvent = "; + + ur::details::printPtr(os, *(params->pphEvent)); + + return os; +} + /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the /// ur_enqueue_cooperative_kernel_launch_exp_params_t type @@ -19123,53 +19170,6 @@ operator<<(std::ostream &os, [[maybe_unused]] const struct return os; } -/////////////////////////////////////////////////////////////////////////////// -/// @brief Print operator for the ur_command_buffer_enqueue_exp_params_t type -/// @returns -/// std::ostream & -inline std::ostream & -operator<<(std::ostream &os, - [[maybe_unused]] const struct ur_command_buffer_enqueue_exp_params_t - *params) { - - os << ".hCommandBuffer = "; - - ur::details::printPtr(os, *(params->phCommandBuffer)); - - os << ", "; - os << ".hQueue = "; - - ur::details::printPtr(os, *(params->phQueue)); - - os << ", "; - os << ".numEventsInWaitList = "; - - os << *(params->pnumEventsInWaitList); - - os << ", "; - os << ".phEventWaitList = "; - ur::details::printPtr( - os, reinterpret_cast(*(params->pphEventWaitList))); - if (*(params->pphEventWaitList) != NULL) { - os << " {"; - for (size_t i = 0; i < *params->pnumEventsInWaitList; ++i) { - if (i != 0) { - os << ", "; - } - - ur::details::printPtr(os, (*(params->pphEventWaitList))[i]); - } - os << "}"; - } - - os << ", "; - os << ".phEvent = "; - - ur::details::printPtr(os, *(params->pphEvent)); - - return os; -} - /////////////////////////////////////////////////////////////////////////////// /// @brief Print operator for the ur_command_buffer_retain_command_exp_params_t /// type @@ -20626,6 +20626,9 @@ inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os, os << (const struct ur_enqueue_events_wait_with_barrier_ext_params_t *) params; } break; + case UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP: { + os << (const struct ur_enqueue_command_buffer_exp_params_t *)params; + } break; case UR_FUNCTION_ENQUEUE_COOPERATIVE_KERNEL_LAUNCH_EXP: { os << (const struct ur_enqueue_cooperative_kernel_launch_exp_params_t *) params; @@ -20800,9 +20803,6 @@ inline ur_result_t UR_APICALL printFunctionParams(std::ostream &os, os << (const struct ur_command_buffer_append_usm_advise_exp_params_t *) params; } break; - case UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP: { - os << (const struct ur_command_buffer_enqueue_exp_params_t *)params; - } break; case UR_FUNCTION_COMMAND_BUFFER_RETAIN_COMMAND_EXP: { os << (const struct ur_command_buffer_retain_command_exp_params_t *)params; } break; diff --git a/scripts/core/EXP-COMMAND-BUFFER.rst b/scripts/core/EXP-COMMAND-BUFFER.rst index 2313afd036..6d1dc7373c 100644 --- a/scripts/core/EXP-COMMAND-BUFFER.rst +++ b/scripts/core/EXP-COMMAND-BUFFER.rst @@ -184,7 +184,7 @@ specific graph command-buffer execution is required this ordering must be enforced by the user to ensure there is only a single command-buffer execution in flight when using these command signal events. -When a user calls ${x}CommandBufferEnqueueExp all the signal events returned +When a user calls ${x}EnqueueCommandBufferExp all the signal events returned from the individual commands in the command-buffer are synchronously reset to a non-complete state prior to the asynchronous commands beginning. @@ -221,8 +221,8 @@ enqueued or executed simultaneously, and submissions may be serialized. .. parsed-literal:: ${x}_event_handle_t executionEvent; - ${x}CommandBufferEnqueueExp(hCommandBuffer, hQueue, 0, nullptr, - &executionEvent); + ${x}EnqueueCommandBufferExp(hQueue, hCommandBuffer, 0, nullptr, + &executionEvent); Updating Command-Buffer Commands @@ -384,7 +384,7 @@ ${x}CommandBufferUpdateSignalEventExp there must also have been a non-null ${x}CommandBufferFinalizeExp(hCommandBuffer); // Enqueue command-buffer - ${x}CommandBufferEnqueueExp(hCommandBuffer, hQueue, 0, nullptr, nullptr); + ${x}EnqueueCommandBufferExp(hQueue, hCommandBuffer, 0, nullptr, nullptr); // Wait for command-buffer to finish ${x}QueueFinish(hQueue); @@ -430,14 +430,13 @@ Enums * ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_POINTER_ARG_DESC * ${X}_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_VALUE_ARG_DESC * ${x}_command_t - * ${X}_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP + * ${X}_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP * ${x}_function_t * ${X}_FUNCTION_COMMAND_BUFFER_CREATE_EXP * ${X}_FUNCTION_COMMAND_BUFFER_RETAIN_EXP * ${X}_FUNCTION_COMMAND_BUFFER_RELEASE_EXP * ${X}_FUNCTION_COMMAND_BUFFER_FINALIZE_EXP * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_KERNEL_LAUNCH_EXP - * ${X}_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_USM_MEMCPY_EXP * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_USM_FILL_EXP * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_MEM_BUFFER_COPY_EXP @@ -450,6 +449,7 @@ Enums * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_USM_PREFETCH_EXP * ${X}_FUNCTION_COMMAND_BUFFER_APPEND_USM_ADVISE_EXP * ${X}_FUNCTION_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_EXP + * ${X}_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP * ${x}_exp_command_buffer_info_t * ${X}_EXP_COMMAND_BUFFER_INFO_REFERENCE_COUNT * ${X}_EXP_COMMAND_BUFFER_INFO_DESCRIPTOR @@ -485,7 +485,6 @@ Functions * ${x}CommandBufferAppendMemBufferFillExp * ${x}CommandBufferAppendUSMPrefetchExp * ${x}CommandBufferAppendUSMAdviseExp -* ${x}CommandBufferEnqueueExp * ${x}CommandBufferRetainCommandExp * ${x}CommandBufferReleaseCommandExp * ${x}CommandBufferUpdateKernelLaunchExp @@ -493,6 +492,7 @@ Functions * ${x}CommandBufferUpdateWaitEventsExp * ${x}CommandBufferGetInfoExp * ${x}CommandBufferCommandGetInfoExp +* ${x}EnqueueCommandBufferExp Changelog -------------------------------------------------------------------------------- @@ -515,6 +515,8 @@ Changelog +-----------+-------------------------------------------------------+ | 1.6 | Command level synchronization with event objects | +-----------+-------------------------------------------------------+ +| 1.7 | Rename enqueue API to urEnqueueCommandBufferEXP | ++-----------+-------------------------------------------------------+ Contributors -------------------------------------------------------------------------------- diff --git a/scripts/core/exp-command-buffer.yml b/scripts/core/exp-command-buffer.yml index 6abcb48695..8b6dd025c2 100644 --- a/scripts/core/exp-command-buffer.yml +++ b/scripts/core/exp-command-buffer.yml @@ -96,8 +96,8 @@ extend: true desc: "Extend command type enumeration for Command-Buffer experimental feature." name: $x_command_t etors: - - name: COMMAND_BUFFER_ENQUEUE_EXP - desc: Event created by $xCommandBufferEnqueueExp + - name: ENQUEUE_COMMAND_BUFFER_EXP + desc: Event created by $xEnqueueCommandBufferExp value: "0x1000" --- #-------------------------------------------------------------------------- type: enum @@ -1132,15 +1132,15 @@ returns: --- #-------------------------------------------------------------------------- type: function desc: "Submit a command-buffer for execution on a queue." -class: $xCommandBuffer -name: EnqueueExp +class: $xEnqueue +name: CommandBufferExp params: - - type: $x_exp_command_buffer_handle_t - name: hCommandBuffer - desc: "[in] Handle of the command-buffer object." - type: $x_queue_handle_t name: hQueue desc: "[in] The queue to submit this command-buffer for execution." + - type: $x_exp_command_buffer_handle_t + name: hCommandBuffer + desc: "[in] Handle of the command-buffer object." - type: uint32_t name: numEventsInWaitList desc: "[in] Size of the event wait list." diff --git a/scripts/core/registry.yml b/scripts/core/registry.yml index 2ae34fb0b4..35a6c3b611 100644 --- a/scripts/core/registry.yml +++ b/scripts/core/registry.yml @@ -592,9 +592,6 @@ etors: - name: COMMAND_BUFFER_APPEND_USM_ADVISE_EXP desc: Enumerator for $xCommandBufferAppendUSMAdviseExp value: '241' -- name: COMMAND_BUFFER_ENQUEUE_EXP - desc: Enumerator for $xCommandBufferEnqueueExp - value: '242' - name: COMMAND_BUFFER_UPDATE_SIGNAL_EVENT_EXP desc: Enumerator for $xCommandBufferUpdateSignalEventExp value: '243' @@ -616,6 +613,9 @@ etors: - name: PHYSICAL_MEM_GET_INFO desc: Enumerator for $xPhysicalMemGetInfo value: '249' +- name: ENQUEUE_COMMAND_BUFFER_EXP + desc: Enumerator for $xEnqueueCommandBufferExp + value: '250' --- type: enum desc: Defines structure types diff --git a/source/adapters/cuda/command_buffer.cpp b/source/adapters/cuda/command_buffer.cpp index 05c20a6614..b20124be39 100644 --- a/source/adapters/cuda/command_buffer.cpp +++ b/source/adapters/cuda/command_buffer.cpp @@ -1153,8 +1153,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMFillExp( phEventWaitList, pSyncPoint, phEvent, phCommand); } -UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue, +UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) try { std::unique_ptr RetImplEvent{nullptr}; @@ -1169,7 +1169,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( if (phEvent) { RetImplEvent = std::unique_ptr( - ur_event_handle_t_::makeNative(UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP, + ur_event_handle_t_::makeNative(UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP, hQueue, CuStream, StreamToken)); UR_CHECK_ERROR(RetImplEvent->start()); } diff --git a/source/adapters/cuda/ur_interface_loader.cpp b/source/adapters/cuda/ur_interface_loader.cpp index d3fea1aee2..34517adb9b 100644 --- a/source/adapters/cuda/ur_interface_loader.cpp +++ b/source/adapters/cuda/ur_interface_loader.cpp @@ -296,7 +296,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnAppendUSMPrefetchExp = urCommandBufferAppendUSMPrefetchExp; pDdiTable->pfnAppendUSMAdviseExp = urCommandBufferAppendUSMAdviseExp; pDdiTable->pfnAppendMemBufferFillExp = urCommandBufferAppendMemBufferFillExp; - pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp; pDdiTable->pfnUpdateKernelLaunchExp = urCommandBufferUpdateKernelLaunchExp; pDdiTable->pfnGetInfoExp = urCommandBufferGetInfoExp; pDdiTable->pfnCommandGetInfoExp = urCommandBufferCommandGetInfoExp; @@ -418,6 +417,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnTimestampRecordingExp = urEnqueueTimestampRecordingExp; pDdiTable->pfnKernelLaunchCustomExp = urEnqueueKernelLaunchCustomExp; pDdiTable->pfnNativeCommandExp = urEnqueueNativeCommandExp; + pDdiTable->pfnCommandBufferExp = urEnqueueCommandBufferExp; return UR_RESULT_SUCCESS; } diff --git a/source/adapters/hip/command_buffer.cpp b/source/adapters/hip/command_buffer.cpp index 09c59bb9f7..da4d2bc95a 100644 --- a/source/adapters/hip/command_buffer.cpp +++ b/source/adapters/hip/command_buffer.cpp @@ -865,8 +865,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMFillExp( numSyncPointsInWaitList, pSyncPointWaitList, pSyncPoint); } -UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue, +UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) { try { @@ -882,7 +882,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( if (phEvent) { RetImplEvent = std::unique_ptr( - ur_event_handle_t_::makeNative(UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP, + ur_event_handle_t_::makeNative(UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP, hQueue, HIPStream, StreamToken)); UR_CHECK_ERROR(RetImplEvent->start()); } diff --git a/source/adapters/hip/ur_interface_loader.cpp b/source/adapters/hip/ur_interface_loader.cpp index 5e5e6ade84..d93ecd1191 100644 --- a/source/adapters/hip/ur_interface_loader.cpp +++ b/source/adapters/hip/ur_interface_loader.cpp @@ -292,7 +292,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( urCommandBufferAppendMemBufferWriteRectExp; pDdiTable->pfnAppendUSMPrefetchExp = urCommandBufferAppendUSMPrefetchExp; pDdiTable->pfnAppendUSMAdviseExp = urCommandBufferAppendUSMAdviseExp; - pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp; pDdiTable->pfnAppendMemBufferFillExp = urCommandBufferAppendMemBufferFillExp; pDdiTable->pfnUpdateKernelLaunchExp = urCommandBufferUpdateKernelLaunchExp; pDdiTable->pfnGetInfoExp = urCommandBufferGetInfoExp; @@ -384,6 +383,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( urEnqueueCooperativeKernelLaunchExp; pDdiTable->pfnTimestampRecordingExp = urEnqueueTimestampRecordingExp; pDdiTable->pfnNativeCommandExp = urEnqueueNativeCommandExp; + pDdiTable->pfnCommandBufferExp = urEnqueueCommandBufferExp; return UR_RESULT_SUCCESS; } diff --git a/source/adapters/level_zero/command_buffer.cpp b/source/adapters/level_zero/command_buffer.cpp index 058f92f8ca..ea22555a2a 100644 --- a/source/adapters/level_zero/command_buffer.cpp +++ b/source/adapters/level_zero/command_buffer.cpp @@ -1719,8 +1719,8 @@ ur_result_t enqueueWaitEventPath(ur_exp_command_buffer_handle_t CommandBuffer, return UR_RESULT_SUCCESS; } -ur_result_t urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t CommandBuffer, ur_queue_handle_t UrQueue, +ur_result_t urEnqueueCommandBufferExp( + ur_queue_handle_t UrQueue, ur_exp_command_buffer_handle_t CommandBuffer, uint32_t NumEventsInWaitList, const ur_event_handle_t *EventWaitList, ur_event_handle_t *Event) { @@ -1741,7 +1741,7 @@ ur_result_t urCommandBufferEnqueueExp( nullptr /*ForcedCmdQueue*/)); UR_CALL(createEventAndAssociateQueue( - UrQueue, OutEvent, UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP, + UrQueue, OutEvent, UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP, ZeCommandListHelper, IsInternal, false, std::nullopt)); if (CommandBuffer->UseImmediateAppendPath) { diff --git a/source/adapters/level_zero/event.cpp b/source/adapters/level_zero/event.cpp index 85f06bdfd7..ccd4a17ebc 100644 --- a/source/adapters/level_zero/event.cpp +++ b/source/adapters/level_zero/event.cpp @@ -623,7 +623,7 @@ ur_result_t urEventGetProfilingInfo( // The timestamps of these events are saved in a memory region attached to // event usning CommandData field. The timings must therefore be recovered // from this memory. - if (Event->CommandType == UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP) { + if (Event->CommandType == UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP) { if (Event->CommandData) { command_buffer_profiling_t *ProfilingsPtr; switch (PropName) { @@ -1086,7 +1086,7 @@ ur_result_t urEventReleaseInternal(ur_event_handle_t Event) { return Res; Event->CommandData = nullptr; } - if (Event->CommandType == UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP && + if (Event->CommandType == UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP && Event->CommandData) { // Free the memory extra event allocated for profiling purposed. command_buffer_profiling_t *ProfilingPtr = diff --git a/source/adapters/level_zero/ur_interface_loader.cpp b/source/adapters/level_zero/ur_interface_loader.cpp index 739a3f3ee4..247703e2d0 100644 --- a/source/adapters/level_zero/ur_interface_loader.cpp +++ b/source/adapters/level_zero/ur_interface_loader.cpp @@ -127,7 +127,6 @@ UR_APIEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( ur::level_zero::urCommandBufferAppendUSMPrefetchExp; pDdiTable->pfnAppendUSMAdviseExp = ur::level_zero::urCommandBufferAppendUSMAdviseExp; - pDdiTable->pfnEnqueueExp = ur::level_zero::urCommandBufferEnqueueExp; pDdiTable->pfnRetainCommandExp = ur::level_zero::urCommandBufferRetainCommandExp; pDdiTable->pfnReleaseCommandExp = @@ -216,6 +215,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnKernelLaunchCustomExp = ur::level_zero::urEnqueueKernelLaunchCustomExp; + pDdiTable->pfnCommandBufferExp = ur::level_zero::urEnqueueCommandBufferExp; pDdiTable->pfnCooperativeKernelLaunchExp = ur::level_zero::urEnqueueCooperativeKernelLaunchExp; pDdiTable->pfnTimestampRecordingExp = diff --git a/source/adapters/level_zero/ur_interface_loader.hpp b/source/adapters/level_zero/ur_interface_loader.hpp index 0814427837..353ddf2a2b 100644 --- a/source/adapters/level_zero/ur_interface_loader.hpp +++ b/source/adapters/level_zero/ur_interface_loader.hpp @@ -659,8 +659,8 @@ ur_result_t urCommandBufferAppendUSMAdviseExp( uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_exp_command_buffer_sync_point_t *pSyncPoint, ur_event_handle_t *phEvent, ur_exp_command_buffer_command_handle_t *phCommand); -ur_result_t urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue, +ur_result_t urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent); ur_result_t urCommandBufferRetainCommandExp( diff --git a/source/adapters/level_zero/v2/api.cpp b/source/adapters/level_zero/v2/api.cpp index 9ae9bddcb9..0600ae1a4a 100644 --- a/source/adapters/level_zero/v2/api.cpp +++ b/source/adapters/level_zero/v2/api.cpp @@ -415,8 +415,8 @@ ur_result_t urCommandBufferAppendUSMAdviseExp( return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } -ur_result_t urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue, +ur_result_t urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) { logger::error("{} function not implemented!", __FUNCTION__); diff --git a/source/adapters/level_zero/v2/queue_api.cpp b/source/adapters/level_zero/v2/queue_api.cpp index f4e2f47c09..3495f1aaba 100644 --- a/source/adapters/level_zero/v2/queue_api.cpp +++ b/source/adapters/level_zero/v2/queue_api.cpp @@ -371,6 +371,15 @@ ur_result_t urBindlessImagesSignalExternalSemaphoreExp( } catch (...) { return exceptionToResult(std::current_exception()); } +ur_result_t urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, + uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, + ur_event_handle_t *phEvent) try { + return hQueue->enqueueCommandBufferExp(hCommandBuffer, numEventsInWaitList, + phEventWaitList, phEvent); +} catch (...) { + return exceptionToResult(std::current_exception()); +} ur_result_t urEnqueueCooperativeKernelLaunchExp( ur_queue_handle_t hQueue, ur_kernel_handle_t hKernel, uint32_t workDim, const size_t *pGlobalWorkOffset, const size_t *pGlobalWorkSize, diff --git a/source/adapters/level_zero/v2/queue_api.hpp b/source/adapters/level_zero/v2/queue_api.hpp index e9e98874e8..d04664ca24 100644 --- a/source/adapters/level_zero/v2/queue_api.hpp +++ b/source/adapters/level_zero/v2/queue_api.hpp @@ -137,6 +137,10 @@ struct ur_queue_handle_t_ { virtual ur_result_t bindlessImagesSignalExternalSemaphoreExp( ur_exp_external_semaphore_handle_t, bool, uint64_t, uint32_t, const ur_event_handle_t *, ur_event_handle_t *) = 0; + virtual ur_result_t enqueueCommandBufferExp(ur_exp_command_buffer_handle_t, + uint32_t, + const ur_event_handle_t *, + ur_event_handle_t *) = 0; virtual ur_result_t enqueueCooperativeKernelLaunchExp( ur_kernel_handle_t, uint32_t, const size_t *, const size_t *, const size_t *, uint32_t, const ur_event_handle_t *, diff --git a/source/adapters/mock/ur_mockddi.cpp b/source/adapters/mock/ur_mockddi.cpp index ad9fbfd1fb..77869c846f 100644 --- a/source/adapters/mock/ur_mockddi.cpp +++ b/source/adapters/mock/ur_mockddi.cpp @@ -9748,12 +9748,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( } /////////////////////////////////////////////////////////////////////////////// -/// @brief Intercept function for urCommandBufferEnqueueExp -__urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +/// @brief Intercept function for urEnqueueCommandBufferExp +__urdlllocal ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -9768,12 +9768,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( ur_event_handle_t *phEvent) try { ur_result_t result = UR_RESULT_SUCCESS; - ur_command_buffer_enqueue_exp_params_t params = {&hCommandBuffer, &hQueue, + ur_enqueue_command_buffer_exp_params_t params = {&hQueue, &hCommandBuffer, &numEventsInWaitList, &phEventWaitList, &phEvent}; auto beforeCallback = reinterpret_cast( - mock::getCallbacks().get_before_callback("urCommandBufferEnqueueExp")); + mock::getCallbacks().get_before_callback("urEnqueueCommandBufferExp")); if (beforeCallback) { result = beforeCallback(¶ms); if (result != UR_RESULT_SUCCESS) { @@ -9782,7 +9782,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( } auto replaceCallback = reinterpret_cast( - mock::getCallbacks().get_replace_callback("urCommandBufferEnqueueExp")); + mock::getCallbacks().get_replace_callback("urEnqueueCommandBufferExp")); if (replaceCallback) { result = replaceCallback(¶ms); } else { @@ -9799,7 +9799,7 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( } auto afterCallback = reinterpret_cast( - mock::getCallbacks().get_after_callback("urCommandBufferEnqueueExp")); + mock::getCallbacks().get_after_callback("urEnqueueCommandBufferExp")); if (afterCallback) { return afterCallback(¶ms); } @@ -11362,8 +11362,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnAppendUSMAdviseExp = driver::urCommandBufferAppendUSMAdviseExp; - pDdiTable->pfnEnqueueExp = driver::urCommandBufferEnqueueExp; - pDdiTable->pfnRetainCommandExp = driver::urCommandBufferRetainCommandExp; pDdiTable->pfnReleaseCommandExp = driver::urCommandBufferReleaseCommandExp; @@ -11531,6 +11529,8 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnKernelLaunchCustomExp = driver::urEnqueueKernelLaunchCustomExp; + pDdiTable->pfnCommandBufferExp = driver::urEnqueueCommandBufferExp; + pDdiTable->pfnCooperativeKernelLaunchExp = driver::urEnqueueCooperativeKernelLaunchExp; diff --git a/source/adapters/native_cpu/command_buffer.cpp b/source/adapters/native_cpu/command_buffer.cpp index 91044771ec..08a1567bcf 100644 --- a/source/adapters/native_cpu/command_buffer.cpp +++ b/source/adapters/native_cpu/command_buffer.cpp @@ -134,8 +134,8 @@ ur_result_t UR_APICALL urCommandBufferAppendMemBufferReadRectExp( return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } -UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t, ur_queue_handle_t, uint32_t, +UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( + ur_queue_handle_t, ur_exp_command_buffer_handle_t, uint32_t, const ur_event_handle_t *, ur_event_handle_t *) { detail::ur::die("Experimental Command-buffer feature is not " "implemented for the NativeCPU adapter."); diff --git a/source/adapters/native_cpu/ur_interface_loader.cpp b/source/adapters/native_cpu/ur_interface_loader.cpp index 6683ad8d8b..d68327bf73 100644 --- a/source/adapters/native_cpu/ur_interface_loader.cpp +++ b/source/adapters/native_cpu/ur_interface_loader.cpp @@ -286,7 +286,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( urCommandBufferAppendMemBufferWriteExp; pDdiTable->pfnAppendMemBufferWriteRectExp = urCommandBufferAppendMemBufferWriteRectExp; - pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp; pDdiTable->pfnUpdateKernelLaunchExp = urCommandBufferUpdateKernelLaunchExp; pDdiTable->pfnGetInfoExp = urCommandBufferGetInfoExp; pDdiTable->pfnCommandGetInfoExp = urCommandBufferCommandGetInfoExp; @@ -404,6 +403,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnCooperativeKernelLaunchExp = nullptr; pDdiTable->pfnTimestampRecordingExp = urEnqueueTimestampRecordingExp; pDdiTable->pfnNativeCommandExp = urEnqueueNativeCommandExp; + pDdiTable->pfnCommandBufferExp = urEnqueueCommandBufferExp; return UR_RESULT_SUCCESS; } diff --git a/source/adapters/opencl/command_buffer.cpp b/source/adapters/opencl/command_buffer.cpp index 5087e65f0b..d026723c5d 100644 --- a/source/adapters/opencl/command_buffer.cpp +++ b/source/adapters/opencl/command_buffer.cpp @@ -446,8 +446,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; } -UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferEnqueueExp( - ur_exp_command_buffer_handle_t hCommandBuffer, ur_queue_handle_t hQueue, +UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCommandBufferExp( + ur_queue_handle_t hQueue, ur_exp_command_buffer_handle_t hCommandBuffer, uint32_t numEventsInWaitList, const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) { diff --git a/source/adapters/opencl/event.cpp b/source/adapters/opencl/event.cpp index 45550a68e8..e039350c81 100644 --- a/source/adapters/opencl/event.cpp +++ b/source/adapters/opencl/event.cpp @@ -63,7 +63,7 @@ ur_command_t convertCLCommandTypeToUR(const cl_command_type &CommandType) { UR_COMMAND_DEVICE_GLOBAL_VARIABLE_READ UR_COMMAND_READ_HOST_PIPE UR_COMMAND_WRITE_HOST_PIPE - UR_COMMAND_COMMAND_BUFFER_ENQUEUE_EXP + UR_COMMAND_ENQUEUE_COMMAND_BUFFER_EXP UR_COMMAND_INTEROP_SEMAPHORE_WAIT_EXP UR_COMMAND_INTEROP_SEMAPHORE_SIGNAL_EXP */ switch (CommandType) { diff --git a/source/adapters/opencl/ur_interface_loader.cpp b/source/adapters/opencl/ur_interface_loader.cpp index 0ff80aed1e..25e864a6a0 100644 --- a/source/adapters/opencl/ur_interface_loader.cpp +++ b/source/adapters/opencl/ur_interface_loader.cpp @@ -305,7 +305,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnAppendUSMPrefetchExp = urCommandBufferAppendUSMPrefetchExp; pDdiTable->pfnAppendUSMAdviseExp = urCommandBufferAppendUSMAdviseExp; pDdiTable->pfnAppendMemBufferFillExp = urCommandBufferAppendMemBufferFillExp; - pDdiTable->pfnEnqueueExp = urCommandBufferEnqueueExp; pDdiTable->pfnUpdateKernelLaunchExp = urCommandBufferUpdateKernelLaunchExp; pDdiTable->pfnGetInfoExp = urCommandBufferGetInfoExp; pDdiTable->pfnCommandGetInfoExp = urCommandBufferCommandGetInfoExp; @@ -411,6 +410,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( urEnqueueCooperativeKernelLaunchExp; pDdiTable->pfnTimestampRecordingExp = urEnqueueTimestampRecordingExp; pDdiTable->pfnNativeCommandExp = urEnqueueNativeCommandExp; + pDdiTable->pfnCommandBufferExp = urEnqueueCommandBufferExp; return UR_RESULT_SUCCESS; } diff --git a/source/loader/layers/sanitizer/asan/asan_ddi.cpp b/source/loader/layers/sanitizer/asan/asan_ddi.cpp index f6b2227558..500afd2e55 100644 --- a/source/loader/layers/sanitizer/asan/asan_ddi.cpp +++ b/source/loader/layers/sanitizer/asan/asan_ddi.cpp @@ -2001,7 +2001,6 @@ __urdlllocal ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( SET_UNSUPPORTED(pDdiTable->pfnAppendMemBufferFillExp); SET_UNSUPPORTED(pDdiTable->pfnAppendUSMPrefetchExp); SET_UNSUPPORTED(pDdiTable->pfnAppendUSMAdviseExp); - SET_UNSUPPORTED(pDdiTable->pfnEnqueueExp); SET_UNSUPPORTED(pDdiTable->pfnRetainCommandExp); SET_UNSUPPORTED(pDdiTable->pfnReleaseCommandExp); SET_UNSUPPORTED(pDdiTable->pfnUpdateKernelLaunchExp); diff --git a/source/loader/layers/tracing/ur_trcddi.cpp b/source/loader/layers/tracing/ur_trcddi.cpp index cb3067d2d1..54b4033647 100644 --- a/source/loader/layers/tracing/ur_trcddi.cpp +++ b/source/loader/layers/tracing/ur_trcddi.cpp @@ -8127,12 +8127,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( } /////////////////////////////////////////////////////////////////////////////// -/// @brief Intercept function for urCommandBufferEnqueueExp -__urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +/// @brief Intercept function for urEnqueueCommandBufferExp +__urdlllocal ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -8145,33 +8145,34 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// not NULL, phEvent must not refer to an element of the phEventWaitList /// array. ur_event_handle_t *phEvent) { - auto pfnEnqueueExp = getContext()->urDdiTable.CommandBufferExp.pfnEnqueueExp; + auto pfnCommandBufferExp = + getContext()->urDdiTable.EnqueueExp.pfnCommandBufferExp; - if (nullptr == pfnEnqueueExp) + if (nullptr == pfnCommandBufferExp) return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; - ur_command_buffer_enqueue_exp_params_t params = {&hCommandBuffer, &hQueue, + ur_enqueue_command_buffer_exp_params_t params = {&hQueue, &hCommandBuffer, &numEventsInWaitList, &phEventWaitList, &phEvent}; uint64_t instance = - getContext()->notify_begin(UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP, - "urCommandBufferEnqueueExp", ¶ms); + getContext()->notify_begin(UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP, + "urEnqueueCommandBufferExp", ¶ms); auto &logger = getContext()->logger; - logger.info(" ---> urCommandBufferEnqueueExp\n"); + logger.info(" ---> urEnqueueCommandBufferExp\n"); - ur_result_t result = pfnEnqueueExp( - hCommandBuffer, hQueue, numEventsInWaitList, phEventWaitList, phEvent); + ur_result_t result = pfnCommandBufferExp( + hQueue, hCommandBuffer, numEventsInWaitList, phEventWaitList, phEvent); - getContext()->notify_end(UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP, - "urCommandBufferEnqueueExp", ¶ms, &result, + getContext()->notify_end(UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP, + "urEnqueueCommandBufferExp", ¶ms, &result, instance); if (logger.getLevel() <= logger::Level::INFO) { std::ostringstream args_str; ur::extras::printFunctionParams( - args_str, UR_FUNCTION_COMMAND_BUFFER_ENQUEUE_EXP, ¶ms); - logger.info(" <--- urCommandBufferEnqueueExp({}) -> {};\n", + args_str, UR_FUNCTION_ENQUEUE_COMMAND_BUFFER_EXP, ¶ms); + logger.info(" <--- urEnqueueCommandBufferExp({}) -> {};\n", args_str.str(), result); } @@ -9599,9 +9600,6 @@ __urdlllocal ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnAppendUSMAdviseExp = ur_tracing_layer::urCommandBufferAppendUSMAdviseExp; - dditable.pfnEnqueueExp = pDdiTable->pfnEnqueueExp; - pDdiTable->pfnEnqueueExp = ur_tracing_layer::urCommandBufferEnqueueExp; - dditable.pfnRetainCommandExp = pDdiTable->pfnRetainCommandExp; pDdiTable->pfnRetainCommandExp = ur_tracing_layer::urCommandBufferRetainCommandExp; @@ -9826,6 +9824,9 @@ __urdlllocal ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnKernelLaunchCustomExp = ur_tracing_layer::urEnqueueKernelLaunchCustomExp; + dditable.pfnCommandBufferExp = pDdiTable->pfnCommandBufferExp; + pDdiTable->pfnCommandBufferExp = ur_tracing_layer::urEnqueueCommandBufferExp; + dditable.pfnCooperativeKernelLaunchExp = pDdiTable->pfnCooperativeKernelLaunchExp; pDdiTable->pfnCooperativeKernelLaunchExp = diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 19ab908ee3..4ea2c0f964 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -8773,12 +8773,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( } /////////////////////////////////////////////////////////////////////////////// -/// @brief Intercept function for urCommandBufferEnqueueExp -__urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +/// @brief Intercept function for urEnqueueCommandBufferExp +__urdlllocal ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -8791,17 +8791,18 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// not NULL, phEvent must not refer to an element of the phEventWaitList /// array. ur_event_handle_t *phEvent) { - auto pfnEnqueueExp = getContext()->urDdiTable.CommandBufferExp.pfnEnqueueExp; + auto pfnCommandBufferExp = + getContext()->urDdiTable.EnqueueExp.pfnCommandBufferExp; - if (nullptr == pfnEnqueueExp) { + if (nullptr == pfnCommandBufferExp) { return UR_RESULT_ERROR_UNINITIALIZED; } if (getContext()->enableParameterValidation) { - if (NULL == hCommandBuffer) + if (NULL == hQueue) return UR_RESULT_ERROR_INVALID_NULL_HANDLE; - if (NULL == hQueue) + if (NULL == hCommandBuffer) return UR_RESULT_ERROR_INVALID_NULL_HANDLE; if (phEventWaitList == NULL && numEventsInWaitList > 0) @@ -8824,8 +8825,8 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( getContext()->refCountContext->logInvalidReference(hQueue); } - ur_result_t result = pfnEnqueueExp( - hCommandBuffer, hQueue, numEventsInWaitList, phEventWaitList, phEvent); + ur_result_t result = pfnCommandBufferExp( + hQueue, hCommandBuffer, numEventsInWaitList, phEventWaitList, phEvent); return result; } @@ -10259,9 +10260,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( pDdiTable->pfnAppendUSMAdviseExp = ur_validation_layer::urCommandBufferAppendUSMAdviseExp; - dditable.pfnEnqueueExp = pDdiTable->pfnEnqueueExp; - pDdiTable->pfnEnqueueExp = ur_validation_layer::urCommandBufferEnqueueExp; - dditable.pfnRetainCommandExp = pDdiTable->pfnRetainCommandExp; pDdiTable->pfnRetainCommandExp = ur_validation_layer::urCommandBufferRetainCommandExp; @@ -10489,6 +10487,10 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( pDdiTable->pfnKernelLaunchCustomExp = ur_validation_layer::urEnqueueKernelLaunchCustomExp; + dditable.pfnCommandBufferExp = pDdiTable->pfnCommandBufferExp; + pDdiTable->pfnCommandBufferExp = + ur_validation_layer::urEnqueueCommandBufferExp; + dditable.pfnCooperativeKernelLaunchExp = pDdiTable->pfnCooperativeKernelLaunchExp; pDdiTable->pfnCooperativeKernelLaunchExp = diff --git a/source/loader/loader.def.in b/source/loader/loader.def.in index a3a18a4170..97b0c250cd 100644 --- a/source/loader/loader.def.in +++ b/source/loader/loader.def.in @@ -37,7 +37,6 @@ EXPORTS urCommandBufferAppendUSMPrefetchExp urCommandBufferCommandGetInfoExp urCommandBufferCreateExp - urCommandBufferEnqueueExp urCommandBufferFinalizeExp urCommandBufferGetInfoExp urCommandBufferReleaseCommandExp @@ -64,6 +63,7 @@ EXPORTS urDeviceRelease urDeviceRetain urDeviceSelectBinary + urEnqueueCommandBufferExp urEnqueueCooperativeKernelLaunchExp urEnqueueDeviceGlobalVariableRead urEnqueueDeviceGlobalVariableWrite @@ -219,7 +219,6 @@ EXPORTS urPrintCommandBufferAppendUsmPrefetchExpParams urPrintCommandBufferCommandGetInfoExpParams urPrintCommandBufferCreateExpParams - urPrintCommandBufferEnqueueExpParams urPrintCommandBufferFinalizeExpParams urPrintCommandBufferGetInfoExpParams urPrintCommandBufferReleaseCommandExpParams @@ -265,6 +264,7 @@ EXPORTS urPrintDeviceSelectBinaryParams urPrintDeviceType urPrintDeviceUsmAccessCapabilityFlags + urPrintEnqueueCommandBufferExpParams urPrintEnqueueCooperativeKernelLaunchExpParams urPrintEnqueueDeviceGlobalVariableReadParams urPrintEnqueueDeviceGlobalVariableWriteParams diff --git a/source/loader/loader.map.in b/source/loader/loader.map.in index 00a6de8c10..d4f53de7e1 100644 --- a/source/loader/loader.map.in +++ b/source/loader/loader.map.in @@ -37,7 +37,6 @@ urCommandBufferAppendUSMPrefetchExp; urCommandBufferCommandGetInfoExp; urCommandBufferCreateExp; - urCommandBufferEnqueueExp; urCommandBufferFinalizeExp; urCommandBufferGetInfoExp; urCommandBufferReleaseCommandExp; @@ -64,6 +63,7 @@ urDeviceRelease; urDeviceRetain; urDeviceSelectBinary; + urEnqueueCommandBufferExp; urEnqueueCooperativeKernelLaunchExp; urEnqueueDeviceGlobalVariableRead; urEnqueueDeviceGlobalVariableWrite; @@ -219,7 +219,6 @@ urPrintCommandBufferAppendUsmPrefetchExpParams; urPrintCommandBufferCommandGetInfoExpParams; urPrintCommandBufferCreateExpParams; - urPrintCommandBufferEnqueueExpParams; urPrintCommandBufferFinalizeExpParams; urPrintCommandBufferGetInfoExpParams; urPrintCommandBufferReleaseCommandExpParams; @@ -265,6 +264,7 @@ urPrintDeviceSelectBinaryParams; urPrintDeviceType; urPrintDeviceUsmAccessCapabilityFlags; + urPrintEnqueueCommandBufferExpParams; urPrintEnqueueCooperativeKernelLaunchExpParams; urPrintEnqueueDeviceGlobalVariableReadParams; urPrintEnqueueDeviceGlobalVariableWriteParams; diff --git a/source/loader/ur_ldrddi.cpp b/source/loader/ur_ldrddi.cpp index 81360c7126..0d992d032a 100644 --- a/source/loader/ur_ldrddi.cpp +++ b/source/loader/ur_ldrddi.cpp @@ -8308,12 +8308,12 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( } /////////////////////////////////////////////////////////////////////////////// -/// @brief Intercept function for urCommandBufferEnqueueExp -__urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +/// @brief Intercept function for urEnqueueCommandBufferExp +__urdlllocal ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -8331,21 +8331,19 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( [[maybe_unused]] auto context = getContext(); // extract platform's function pointer table - auto dditable = - reinterpret_cast(hCommandBuffer) - ->dditable; - auto pfnEnqueueExp = dditable->ur.CommandBufferExp.pfnEnqueueExp; - if (nullptr == pfnEnqueueExp) + auto dditable = reinterpret_cast(hQueue)->dditable; + auto pfnCommandBufferExp = dditable->ur.EnqueueExp.pfnCommandBufferExp; + if (nullptr == pfnCommandBufferExp) return UR_RESULT_ERROR_UNINITIALIZED; + // convert loader handle to platform handle + hQueue = reinterpret_cast(hQueue)->handle; + // convert loader handle to platform handle hCommandBuffer = reinterpret_cast(hCommandBuffer) ->handle; - // convert loader handle to platform handle - hQueue = reinterpret_cast(hQueue)->handle; - // convert loader handles to platform handles auto phEventWaitListLocal = std::vector(numEventsInWaitList); @@ -8354,12 +8352,13 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferEnqueueExp( reinterpret_cast(phEventWaitList[i])->handle; // forward to device-platform - result = pfnEnqueueExp(hCommandBuffer, hQueue, numEventsInWaitList, - phEventWaitListLocal.data(), phEvent); + result = pfnCommandBufferExp(hQueue, hCommandBuffer, numEventsInWaitList, + phEventWaitListLocal.data(), phEvent); - if (UR_RESULT_SUCCESS != result) + // In the event of ERROR_ADAPTER_SPECIFIC we should still attempt to wrap any + // output handles below. + if (UR_RESULT_SUCCESS != result && UR_RESULT_ERROR_ADAPTER_SPECIFIC != result) return result; - try { // convert platform handle to loader handle if (nullptr != phEvent) @@ -9727,7 +9726,6 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetCommandBufferExpProcAddrTable( ur_loader::urCommandBufferAppendUSMPrefetchExp; pDdiTable->pfnAppendUSMAdviseExp = ur_loader::urCommandBufferAppendUSMAdviseExp; - pDdiTable->pfnEnqueueExp = ur_loader::urCommandBufferEnqueueExp; pDdiTable->pfnRetainCommandExp = ur_loader::urCommandBufferRetainCommandExp; pDdiTable->pfnReleaseCommandExp = @@ -9938,6 +9936,7 @@ UR_DLLEXPORT ur_result_t UR_APICALL urGetEnqueueExpProcAddrTable( // return pointers to loader's DDIs pDdiTable->pfnKernelLaunchCustomExp = ur_loader::urEnqueueKernelLaunchCustomExp; + pDdiTable->pfnCommandBufferExp = ur_loader::urEnqueueCommandBufferExp; pDdiTable->pfnCooperativeKernelLaunchExp = ur_loader::urEnqueueCooperativeKernelLaunchExp; pDdiTable->pfnTimestampRecordingExp = diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 5b55b71d4d..48f5e5bf94 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -8701,8 +8701,8 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// - ::UR_RESULT_ERROR_DEVICE_LOST /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `NULL == hCommandBuffer` /// + `NULL == hQueue` +/// + `NULL == hCommandBuffer` /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_INVALID_EVENT @@ -8712,11 +8712,11 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of @@ -8729,13 +8729,13 @@ ur_result_t UR_APICALL urCommandBufferEnqueueExp( /// not NULL, phEvent must not refer to an element of the phEventWaitList /// array. ur_event_handle_t *phEvent) try { - auto pfnEnqueueExp = - ur_lib::getContext()->urDdiTable.CommandBufferExp.pfnEnqueueExp; - if (nullptr == pfnEnqueueExp) + auto pfnCommandBufferExp = + ur_lib::getContext()->urDdiTable.EnqueueExp.pfnCommandBufferExp; + if (nullptr == pfnCommandBufferExp) return UR_RESULT_ERROR_UNINITIALIZED; - return pfnEnqueueExp(hCommandBuffer, hQueue, numEventsInWaitList, - phEventWaitList, phEvent); + return pfnCommandBufferExp(hQueue, hCommandBuffer, numEventsInWaitList, + phEventWaitList, phEvent); } catch (...) { return exceptionToResult(std::current_exception()); } diff --git a/source/loader/ur_print.cpp b/source/loader/ur_print.cpp index 3fda2c2081..03af057a49 100644 --- a/source/loader/ur_print.cpp +++ b/source/loader/ur_print.cpp @@ -1489,14 +1489,6 @@ ur_result_t urPrintCommandBufferAppendUsmAdviseExpParams( return str_copy(&ss, buffer, buff_size, out_size); } -ur_result_t urPrintCommandBufferEnqueueExpParams( - const struct ur_command_buffer_enqueue_exp_params_t *params, char *buffer, - const size_t buff_size, size_t *out_size) { - std::stringstream ss; - ss << params; - return str_copy(&ss, buffer, buff_size, out_size); -} - ur_result_t urPrintCommandBufferRetainCommandExpParams( const struct ur_command_buffer_retain_command_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size) { @@ -1831,6 +1823,14 @@ ur_result_t urPrintEnqueueEventsWaitWithBarrierExtParams( return str_copy(&ss, buffer, buff_size, out_size); } +ur_result_t urPrintEnqueueCommandBufferExpParams( + const struct ur_enqueue_command_buffer_exp_params_t *params, char *buffer, + const size_t buff_size, size_t *out_size) { + std::stringstream ss; + ss << params; + return str_copy(&ss, buffer, buff_size, out_size); +} + ur_result_t urPrintEnqueueCooperativeKernelLaunchExpParams( const struct ur_enqueue_cooperative_kernel_launch_exp_params_t *params, char *buffer, const size_t buff_size, size_t *out_size) { diff --git a/source/ur_api.cpp b/source/ur_api.cpp index 15cb0442b1..173c53f999 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -7602,8 +7602,8 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// - ::UR_RESULT_ERROR_DEVICE_LOST /// - ::UR_RESULT_ERROR_ADAPTER_SPECIFIC /// - ::UR_RESULT_ERROR_INVALID_NULL_HANDLE -/// + `NULL == hCommandBuffer` /// + `NULL == hQueue` +/// + `NULL == hCommandBuffer` /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_EXP /// - ::UR_RESULT_ERROR_INVALID_QUEUE /// - ::UR_RESULT_ERROR_INVALID_EVENT @@ -7613,11 +7613,11 @@ ur_result_t UR_APICALL urCommandBufferAppendUSMAdviseExp( /// + If event objects in phEventWaitList are not valid events. /// - ::UR_RESULT_ERROR_OUT_OF_HOST_MEMORY /// - ::UR_RESULT_ERROR_OUT_OF_RESOURCES -ur_result_t UR_APICALL urCommandBufferEnqueueExp( - /// [in] Handle of the command-buffer object. - ur_exp_command_buffer_handle_t hCommandBuffer, +ur_result_t UR_APICALL urEnqueueCommandBufferExp( /// [in] The queue to submit this command-buffer for execution. ur_queue_handle_t hQueue, + /// [in] Handle of the command-buffer object. + ur_exp_command_buffer_handle_t hCommandBuffer, /// [in] Size of the event wait list. uint32_t numEventsInWaitList, /// [in][optional][range(0, numEventsInWaitList)] pointer to a list of diff --git a/test/conformance/exp_command_buffer/commands.cpp b/test/conformance/exp_command_buffer/commands.cpp index 397135fa91..d09bc8c528 100644 --- a/test/conformance/exp_command_buffer/commands.cpp +++ b/test/conformance/exp_command_buffer/commands.cpp @@ -191,7 +191,7 @@ TEST_P(urCommandBufferAppendKernelLaunchExpTest, Basic) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); int32_t *ptrZ = static_cast(shared_ptrs[0]); diff --git a/test/conformance/exp_command_buffer/event_sync.cpp b/test/conformance/exp_command_buffer/event_sync.cpp index 6a4923f48f..bf12b41f21 100644 --- a/test/conformance/exp_command_buffer/event_sync.cpp +++ b/test/conformance/exp_command_buffer/event_sync.cpp @@ -32,7 +32,7 @@ TEST_P(CommandEventSyncTest, USMMemcpyExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 1 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -62,7 +62,7 @@ TEST_P(CommandEventSyncTest, USMFillExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -98,7 +98,7 @@ TEST_P(CommandEventSyncTest, USMFillLargePatternExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -135,7 +135,7 @@ TEST_P(CommandEventSyncTest, MemBufferCopyExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 1 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -181,7 +181,7 @@ TEST_P(CommandEventSyncTest, MemBufferCopyRectExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 1 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -211,7 +211,7 @@ TEST_P(CommandEventSyncTest, MemBufferReadExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Overwrite buffer 0 based on event returned from command-buffer command, // then read back to verify ordering @@ -256,7 +256,7 @@ TEST_P(CommandEventSyncTest, MemBufferReadRectExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Overwrite buffer 0 based on event returned from command-buffer command, // then read back to verify ordering @@ -294,7 +294,7 @@ TEST_P(CommandEventSyncTest, MemBufferWriteExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Read back buffer 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -336,7 +336,7 @@ TEST_P(CommandEventSyncTest, MemBufferWriteRectExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Read back buffer 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -366,7 +366,7 @@ TEST_P(CommandEventSyncTest, MemBufferFillExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -402,7 +402,7 @@ TEST_P(CommandEventSyncTest, MemBufferFillLargePatternExp) { &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -431,7 +431,7 @@ TEST_P(CommandEventSyncTest, USMPrefetchExp) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -459,7 +459,7 @@ TEST_P(CommandEventSyncTest, USMAdviseExp) { nullptr, 1, &external_events[0], nullptr, &external_events[1], nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command std::array host_enqueue_ptr{}; @@ -498,7 +498,7 @@ TEST_P(CommandEventSyncTest, MultipleEventCommands) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 1 based on event returned from command-buffer command std::array host_enqueue_ptrA, host_enqueue_ptrB, @@ -568,8 +568,8 @@ TEST_P(CommandEventSyncTest, MultipleEventCommandsBetweenCommandBuffers) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(second_cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(second_cmd_buf_handle, queue, 0, + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, second_cmd_buf_handle, 0, nullptr, nullptr)); // Verify diff --git a/test/conformance/exp_command_buffer/fill.cpp b/test/conformance/exp_command_buffer/fill.cpp index ae22c7d360..2e9d61fb71 100644 --- a/test/conformance/exp_command_buffer/fill.cpp +++ b/test/conformance/exp_command_buffer/fill.cpp @@ -116,7 +116,7 @@ TEST_P(urCommandBufferFillCommandsTest, Buffer) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); verifyData(output, size); @@ -135,7 +135,7 @@ TEST_P(urCommandBufferFillCommandsTest, USM) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); verifyData(output, size); diff --git a/test/conformance/exp_command_buffer/kernel_event_sync.cpp b/test/conformance/exp_command_buffer/kernel_event_sync.cpp index 977f39b23b..5e61bc55be 100644 --- a/test/conformance/exp_command_buffer/kernel_event_sync.cpp +++ b/test/conformance/exp_command_buffer/kernel_event_sync.cpp @@ -110,7 +110,7 @@ TEST_P(KernelCommandEventSyncTest, Basic) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); // Queue command that reads output to host std::array host_enqueue_ptr{}; @@ -163,8 +163,8 @@ TEST_P(KernelCommandEventSyncTest, InterCommandBuffer) { // Submit command-buffers ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(second_cmd_buf_handle, queue, 0, + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, second_cmd_buf_handle, 0, nullptr, nullptr)); // Verify execution @@ -180,8 +180,8 @@ TEST_P(KernelCommandEventSyncTest, InterCommandBuffer) { // Submit command-buffers again to check that dependencies still enforced. ASSERT_SUCCESS( - urCommandBufferEnqueueExp(cmd_buf_handle, queue, 0, nullptr, nullptr)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(second_cmd_buf_handle, queue, 0, + urEnqueueCommandBufferExp(queue, cmd_buf_handle, 0, nullptr, nullptr)); + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, second_cmd_buf_handle, 0, nullptr, nullptr)); // Verify second execution diff --git a/test/conformance/exp_command_buffer/release.cpp b/test/conformance/exp_command_buffer/release.cpp index a8112dd5cb..edd1f9993f 100644 --- a/test/conformance/exp_command_buffer/release.cpp +++ b/test/conformance/exp_command_buffer/release.cpp @@ -54,7 +54,7 @@ TEST_P(urCommandBufferReleaseCommandExpTest, ReleaseCmdBufBeforeHandle) { // Ref count of `updatable_cmd_buf_handle` but shouldn't be destroyed // until all handles as destroyed. - EXPECT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + EXPECT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); EXPECT_SUCCESS(urQueueFinish(queue)); updatable_cmd_buf_handle = nullptr; @@ -68,14 +68,14 @@ TEST_P(urCommandBufferReleaseCommandExpTest, ReleaseCmdBufMultipleHandles) { command_handle = nullptr; // Ref count of `updatable_cmd_buf_handle` but should still be above zero - EXPECT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + EXPECT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); EXPECT_SUCCESS(urQueueFinish(queue)); // Ref count of `updatable_cmd_buf_handle` but shouldn't be destroyed // until all handles as destroyed. EXPECT_SUCCESS(urCommandBufferReleaseExp(updatable_cmd_buf_handle)); - EXPECT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + EXPECT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); EXPECT_SUCCESS(urQueueFinish(queue)); updatable_cmd_buf_handle = nullptr; diff --git a/test/conformance/exp_command_buffer/update/buffer_fill_kernel_update.cpp b/test/conformance/exp_command_buffer/update/buffer_fill_kernel_update.cpp index bc5ea0c196..1255746aaf 100644 --- a/test/conformance/exp_command_buffer/update/buffer_fill_kernel_update.cpp +++ b/test/conformance/exp_command_buffer/update/buffer_fill_kernel_update.cpp @@ -86,7 +86,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(BufferFillCommandTest); // buffer. TEST_P(BufferFillCommandTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ValidateBuffer(buffer, buffer_size, val); @@ -139,7 +139,7 @@ TEST_P(BufferFillCommandTest, UpdateParameters) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -149,7 +149,7 @@ TEST_P(BufferFillCommandTest, UpdateParameters) { // Test updating the global size so that the fill outputs to a larger buffer TEST_P(BufferFillCommandTest, UpdateGlobalSize) { - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ValidateBuffer(buffer, sizeof(val) * global_size, val); @@ -191,7 +191,7 @@ TEST_P(BufferFillCommandTest, UpdateGlobalSize) { ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -201,7 +201,7 @@ TEST_P(BufferFillCommandTest, UpdateGlobalSize) { // Test updating the input & output kernel arguments and global // size, by calling update individually for each of these configurations. TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ValidateBuffer(buffer, sizeof(val) * global_size, val); @@ -291,7 +291,7 @@ TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( command_handle, &global_size_update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -301,7 +301,7 @@ TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { // Test calling update twice on the same command-handle updating the // input value, and verifying that it's the second call which persists. TEST_P(BufferFillCommandTest, OverrideUpdate) { - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ValidateBuffer(buffer, sizeof(val) * global_size, val); @@ -364,7 +364,7 @@ TEST_P(BufferFillCommandTest, OverrideUpdate) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(command_handle, &second_update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -375,7 +375,7 @@ TEST_P(BufferFillCommandTest, OverrideUpdate) { // ur_exp_command_buffer_update_value_arg_desc_t instances updating the same // argument, and checking that the last one in the list persists. TEST_P(BufferFillCommandTest, OverrideArgList) { - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ValidateBuffer(buffer, sizeof(val) * global_size, val); @@ -421,7 +421,7 @@ TEST_P(BufferFillCommandTest, OverrideArgList) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(command_handle, &second_update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/buffer_saxpy_kernel_update.cpp b/test/conformance/exp_command_buffer/update/buffer_saxpy_kernel_update.cpp index 131c1c4769..265ba23985 100644 --- a/test/conformance/exp_command_buffer/update/buffer_saxpy_kernel_update.cpp +++ b/test/conformance/exp_command_buffer/update/buffer_saxpy_kernel_update.cpp @@ -137,7 +137,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(BufferSaxpyKernelTest); TEST_P(BufferSaxpyKernelTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -196,7 +196,7 @@ TEST_P(BufferSaxpyKernelTest, UpdateParameters) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/event_sync.cpp b/test/conformance/exp_command_buffer/update/event_sync.cpp index a11850b71c..879a9eee91 100644 --- a/test/conformance/exp_command_buffer/update/event_sync.cpp +++ b/test/conformance/exp_command_buffer/update/event_sync.cpp @@ -33,7 +33,7 @@ TEST_P(CommandEventSyncUpdateTest, USMMemcpyExp) { &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 1 based on event returned from command-buffer command @@ -60,7 +60,7 @@ TEST_P(CommandEventSyncUpdateTest, USMMemcpyExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueUSMMemcpy(queue, false, host_enqueue_ptr.data(), @@ -89,7 +89,7 @@ TEST_P(CommandEventSyncUpdateTest, USMFillExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command @@ -116,7 +116,7 @@ TEST_P(CommandEventSyncUpdateTest, USMFillExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueUSMMemcpy(queue, false, host_enqueue_ptr.data(), @@ -151,7 +151,7 @@ TEST_P(CommandEventSyncUpdateTest, USMFillLargePatternExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command @@ -178,7 +178,7 @@ TEST_P(CommandEventSyncUpdateTest, USMFillLargePatternExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueUSMMemcpy(queue, false, host_enqueue_ptr.data(), @@ -213,7 +213,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferCopyExp) { 1, &sync_points[0], 1, &external_events[0], nullptr, &external_events[1], &command_handles[0])); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 1 based on event returned from command-buffer command @@ -240,7 +240,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferCopyExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( @@ -285,7 +285,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferCopyRectExp) { &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 1 based on event returned from command-buffer command @@ -312,7 +312,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferCopyRectExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( @@ -341,7 +341,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferReadExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Overwrite buffer 0 based on event returned from command-buffer command, @@ -374,7 +374,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferReadExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[4])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); uint32_t patternA = 0xF; @@ -417,7 +417,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferReadRectExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Overwrite buffer 0 based on event returned from command-buffer command, @@ -450,7 +450,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferReadRectExp) { // Get a new signal event for command-buffer ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[4])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); uint32_t patternA = 0xF; @@ -486,7 +486,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferWriteExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Read back buffer 0 based on event returned from command-buffer command @@ -514,7 +514,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferWriteExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( queue, buffers[0], false, 0, allocation_size, host_enqueue_ptr.data(), 1, @@ -554,7 +554,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferWriteRectExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Read back buffer 0 based on event returned from command-buffer command @@ -582,7 +582,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferWriteRectExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( queue, buffers[0], false, 0, allocation_size, host_enqueue_ptr.data(), 1, @@ -616,7 +616,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferFillLargePatternExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 0 based on event returned from command-buffer command @@ -644,7 +644,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferFillLargePatternExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( queue, buffers[0], false, 0, allocation_size, host_enqueue_ptr.data(), 1, @@ -672,7 +672,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferFillExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read buffer 0 based on event returned from command-buffer command @@ -700,7 +700,7 @@ TEST_P(CommandEventSyncUpdateTest, MemBufferFillExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueMemBufferRead( queue, buffers[0], false, 0, allocation_size, host_enqueue_ptr.data(), 1, @@ -727,7 +727,7 @@ TEST_P(CommandEventSyncUpdateTest, USMPrefetchExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command @@ -755,7 +755,7 @@ TEST_P(CommandEventSyncUpdateTest, USMPrefetchExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueUSMMemcpy(queue, false, host_enqueue_ptr.data(), device_ptrs[0], allocation_size, 1, @@ -782,7 +782,7 @@ TEST_P(CommandEventSyncUpdateTest, USMAdviseExp) { &external_events[1], &command_handles[0])); ASSERT_NE(nullptr, command_handles[0]); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 0 based on event returned from command-buffer command @@ -810,7 +810,7 @@ TEST_P(CommandEventSyncUpdateTest, USMAdviseExp) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urEnqueueUSMMemcpy(queue, false, host_enqueue_ptr.data(), device_ptrs[0], allocation_size, 1, @@ -860,7 +860,7 @@ TEST_P(CommandEventSyncUpdateTest, MultipleEventCommands) { &external_events[5], &command_handles[2])); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue read ptr 1 based on event returned from command-buffer command @@ -916,7 +916,7 @@ TEST_P(CommandEventSyncUpdateTest, MultipleEventCommands) { ASSERT_SUCCESS(urCommandBufferUpdateSignalEventExp(command_handles[0], &external_events[11])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); std::array host_enqueue_ptrA2, host_enqueue_ptrB2, diff --git a/test/conformance/exp_command_buffer/update/kernel_event_sync.cpp b/test/conformance/exp_command_buffer/update/kernel_event_sync.cpp index 3b2a6168c6..9e8448708a 100644 --- a/test/conformance/exp_command_buffer/update/kernel_event_sync.cpp +++ b/test/conformance/exp_command_buffer/update/kernel_event_sync.cpp @@ -101,7 +101,7 @@ TEST_P(KernelCommandEventSyncUpdateTest, Basic) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue command that reads output to host @@ -136,7 +136,7 @@ TEST_P(KernelCommandEventSyncUpdateTest, Basic) { ASSERT_SUCCESS( urCommandBufferUpdateSignalEventExp(command_handle, &external_events[3])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Read data back with a queue operation waiting on updated kernel command @@ -183,7 +183,7 @@ TEST_P(KernelCommandEventSyncUpdateTest, TwoWaitEvents) { nullptr)); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Queue command that reads output to host @@ -224,7 +224,7 @@ TEST_P(KernelCommandEventSyncUpdateTest, TwoWaitEvents) { ASSERT_SUCCESS( urCommandBufferUpdateSignalEventExp(command_handle, &external_events[5])); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Read data back with a queue operation waiting on updated kernel command diff --git a/test/conformance/exp_command_buffer/update/kernel_handle_update.cpp b/test/conformance/exp_command_buffer/update/kernel_handle_update.cpp index c6db293063..fc45f218a1 100644 --- a/test/conformance/exp_command_buffer/update/kernel_handle_update.cpp +++ b/test/conformance/exp_command_buffer/update/kernel_handle_update.cpp @@ -273,11 +273,11 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, Success) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &FillUSM2DKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -302,11 +302,11 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, UpdateAgain) { ASSERT_NE(CommandHandle, nullptr); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &FillUSM2DKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -318,7 +318,7 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, UpdateAgain) { FillUSM2DKernel->Val = 78; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &FillUSM2DKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ASSERT_NO_FATAL_FAILURE(FillUSM2DKernel->validate()); @@ -341,11 +341,11 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, RestoreOriginalKernel) { ASSERT_NE(CommandHandle, nullptr); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &FillUSM2DKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -357,7 +357,7 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, RestoreOriginalKernel) { SaxpyKernel->A = 20; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &SaxpyKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); ASSERT_NO_FATAL_FAILURE(SaxpyKernel->validate()); @@ -375,7 +375,7 @@ TEST_P(urCommandBufferKernelHandleUpdateTest, KernelAlternativeNotRegistered) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_EQ_RESULT(UR_RESULT_ERROR_INVALID_VALUE, @@ -416,7 +416,7 @@ TEST_P(urCommandBufferValidUpdateParametersTest, ASSERT_NE(CommandHandle, nullptr); ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -433,7 +433,7 @@ TEST_P(urCommandBufferValidUpdateParametersTest, FillUSM2DKernel->UpdateDesc.pNewGlobalWorkOffset = &newGlobalWorkOffset; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &FillUSM2DKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -457,7 +457,7 @@ TEST_P(urCommandBufferValidUpdateParametersTest, UpdateOnlyLocalWorkSize) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); SaxpyKernel->UpdateDesc.pNewGlobalWorkOffset = nullptr; @@ -466,7 +466,7 @@ TEST_P(urCommandBufferValidUpdateParametersTest, UpdateOnlyLocalWorkSize) { SaxpyKernel->UpdateDesc.pNewLocalWorkSize = &newLocalSize; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &SaxpyKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -493,7 +493,7 @@ TEST_P(urCommandBufferValidUpdateParametersTest, SuccessNullptrHandle) { SaxpyKernel->UpdateDesc.hNewKernel = nullptr; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( CommandHandle, &SaxpyKernel->UpdateDesc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/local_memory_update.cpp b/test/conformance/exp_command_buffer/update/local_memory_update.cpp index 559a61e3ad..97f84688b6 100644 --- a/test/conformance/exp_command_buffer/update/local_memory_update.cpp +++ b/test/conformance/exp_command_buffer/update/local_memory_update.cpp @@ -153,7 +153,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(LocalMemoryUpdateTest); // to original values. TEST_P(LocalMemoryUpdateTest, UpdateParametersSameLocalSize) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -236,7 +236,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersSameLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -250,7 +250,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersSameLocalSize) { // Test only passing local memory parameters to update with the original values. TEST_P(LocalMemoryUpdateTest, UpdateLocalOnly) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -302,7 +302,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateLocalOnly) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -314,7 +314,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateLocalOnly) { // parameters from the update. TEST_P(LocalMemoryUpdateTest, UpdateParametersEmptyLocalSize) { // Run command-buffer prior to update and verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -377,7 +377,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersEmptyLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -392,7 +392,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersEmptyLocalSize) { // to new smaller values. TEST_P(LocalMemoryUpdateTest, UpdateParametersSmallerLocalSize) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -531,7 +531,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersSmallerLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -546,7 +546,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersSmallerLocalSize) { // to new larger values. TEST_P(LocalMemoryUpdateTest, UpdateParametersLargerLocalSize) { // Run command-buffer prior to update and verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -685,7 +685,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersLargerLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -701,7 +701,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersLargerLocalSize) { // the other local memory argument. TEST_P(LocalMemoryUpdateTest, UpdateParametersPartialLocalSize) { // Run command-buffer prior to update and verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -862,7 +862,7 @@ TEST_P(LocalMemoryUpdateTest, UpdateParametersPartialLocalSize) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(command_handle, &second_update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -908,7 +908,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(LocalMemoryMultiUpdateTest); // to original values. TEST_P(LocalMemoryMultiUpdateTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -992,7 +992,7 @@ TEST_P(LocalMemoryMultiUpdateTest, UpdateParameters) { for (auto &handle : command_handles) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(handle, &update_desc)); } - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -1077,14 +1077,14 @@ TEST_P(LocalMemoryMultiUpdateTest, UpdateWithoutBlocking) { nullptr, // pNewLocalWorkSize }; // Enqueue without calling urQueueFinish after - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Update kernel and enqueue command-buffer again for (auto &handle : command_handles) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(handle, &update_desc)); } - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/ndrange_update.cpp b/test/conformance/exp_command_buffer/update/ndrange_update.cpp index 10adc7ad52..1219079290 100644 --- a/test/conformance/exp_command_buffer/update/ndrange_update.cpp +++ b/test/conformance/exp_command_buffer/update/ndrange_update.cpp @@ -118,7 +118,7 @@ TEST_P(NDRangeUpdateTest, Update3D) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); // Run command-buffer prior to update and verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate(global_size, local_size, global_offset); @@ -146,7 +146,7 @@ TEST_P(NDRangeUpdateTest, Update3D) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -166,10 +166,10 @@ TEST_P(NDRangeUpdateTest, Update2D) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate(global_size, local_size, global_offset); @@ -203,7 +203,7 @@ TEST_P(NDRangeUpdateTest, Update2D) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -224,7 +224,7 @@ TEST_P(NDRangeUpdateTest, Update1D) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate(global_size, local_size, global_offset); @@ -256,7 +256,7 @@ TEST_P(NDRangeUpdateTest, Update1D) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -277,7 +277,7 @@ TEST_P(NDRangeUpdateTest, ImplToUserDefinedLocalSize) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -310,7 +310,7 @@ TEST_P(NDRangeUpdateTest, ImplToUserDefinedLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -331,7 +331,7 @@ TEST_P(NDRangeUpdateTest, UserToImplDefinedLocalSize) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); // Run command-buffer prior to update and verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate(global_size, local_size, global_offset); @@ -361,7 +361,7 @@ TEST_P(NDRangeUpdateTest, UserToImplDefinedLocalSize) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/usm_fill_kernel_update.cpp b/test/conformance/exp_command_buffer/update/usm_fill_kernel_update.cpp index bc7fd8044e..81632c6ef8 100644 --- a/test/conformance/exp_command_buffer/update/usm_fill_kernel_update.cpp +++ b/test/conformance/exp_command_buffer/update/usm_fill_kernel_update.cpp @@ -84,7 +84,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(USMFillCommandTest); // Test using a different global size to fill and larger USM output buffer TEST_P(USMFillCommandTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate((uint32_t *)shared_ptr, global_size, val); @@ -137,7 +137,7 @@ TEST_P(USMFillCommandTest, UpdateParameters) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -191,7 +191,7 @@ TEST_P(USMFillCommandTest, UpdateBeforeEnqueue) { // Update kernel and enqueue command-buffer ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -202,7 +202,7 @@ TEST_P(USMFillCommandTest, UpdateBeforeEnqueue) { // Test using a different global size to fill and larger USM output buffer TEST_P(USMFillCommandTest, UpdateNull) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); Validate((uint32_t *)shared_ptr, global_size, val); @@ -323,7 +323,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(USMMultipleFillCommandTest); // Test updating all the kernels commands in the command-buffer TEST_P(USMMultipleFillCommandTest, UpdateAllKernels) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -384,7 +384,7 @@ TEST_P(USMMultipleFillCommandTest, UpdateAllKernels) { } // Update kernel and enqueue command-buffer again - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/exp_command_buffer/update/usm_saxpy_kernel_update.cpp b/test/conformance/exp_command_buffer/update/usm_saxpy_kernel_update.cpp index 57913a7259..968f7e9f04 100644 --- a/test/conformance/exp_command_buffer/update/usm_saxpy_kernel_update.cpp +++ b/test/conformance/exp_command_buffer/update/usm_saxpy_kernel_update.cpp @@ -102,7 +102,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(USMSaxpyKernelTest); TEST_P(USMSaxpyKernelTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -163,7 +163,7 @@ TEST_P(USMSaxpyKernelTest, UpdateParameters) { // Update kernel and enqueue command-buffer again ASSERT_SUCCESS( urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -208,7 +208,7 @@ UUR_INSTANTIATE_DEVICE_TEST_SUITE_P(USMMultiSaxpyKernelTest); TEST_P(USMMultiSaxpyKernelTest, UpdateParameters) { // Run command-buffer prior to update an verify output - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -270,7 +270,7 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateParameters) { for (auto &handle : command_handles) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(handle, &update_desc)); } - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -284,7 +284,7 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateParameters) { // Checks that passing nullptr to hNewKernel even when kernel binary updates // is not supported by the adapter. TEST_P(USMMultiSaxpyKernelTest, UpdateNullptrKernel) { - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -324,7 +324,7 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateNullptrKernel) { for (auto &handle : command_handles) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(handle, &update_desc)); } - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); @@ -384,14 +384,14 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateWithoutBlocking) { }; // Run command-buffer prior to update without doing a blocking wait after - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); // Update kernel and enqueue command-buffer again for (auto &handle : command_handles) { ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(handle, &update_desc)); } - ASSERT_SUCCESS(urCommandBufferEnqueueExp(updatable_cmd_buf_handle, queue, 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queue, updatable_cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queue)); diff --git a/test/conformance/program/urMultiDeviceProgramCreateWithBinary.cpp b/test/conformance/program/urMultiDeviceProgramCreateWithBinary.cpp index 2281e7aed1..e8239c4bb5 100644 --- a/test/conformance/program/urMultiDeviceProgramCreateWithBinary.cpp +++ b/test/conformance/program/urMultiDeviceProgramCreateWithBinary.cpp @@ -323,7 +323,7 @@ TEST_P(urMultiDeviceCommandBufferExpTest, Enqueue) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); // Verify execution succeeds - ASSERT_SUCCESS(urCommandBufferEnqueueExp(cmd_buf_handle, queues[i], 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queues[i], cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queues[i])); } @@ -355,7 +355,7 @@ TEST_P(urMultiDeviceCommandBufferExpTest, Update) { ASSERT_SUCCESS(urCommandBufferFinalizeExp(cmd_buf_handle)); // Verify execution succeeds - ASSERT_SUCCESS(urCommandBufferEnqueueExp(cmd_buf_handle, queues[i], 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queues[i], cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queues[i])); @@ -376,7 +376,7 @@ TEST_P(urMultiDeviceCommandBufferExpTest, Update) { nullptr, // pNewLocalWorkSize }; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(command, &update_desc)); - ASSERT_SUCCESS(urCommandBufferEnqueueExp(cmd_buf_handle, queues[i], 0, + ASSERT_SUCCESS(urEnqueueCommandBufferExp(queues[i], cmd_buf_handle, 0, nullptr, nullptr)); ASSERT_SUCCESS(urQueueFinish(queues[i])); }