diff --git a/include/ur_api.h b/include/ur_api.h index c162434fdc..5f7405bb57 100644 --- a/include/ur_api.h +++ b/include/ur_api.h @@ -8950,17 +8950,15 @@ urCommandBufferReleaseCommandExp( /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true on creation of the command buffer `hCommand` belongs to. /// + If the command-buffer `hCommand` belongs to has not been finalized. -/// + If `pUpdateKernellaunch->hNewKernel` is different from the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is zero. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero and different from the work-dim currently associated with `hCommand`. -/// + If `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value, and `pUpdateKernelLaunch->pNewGlobalWorkSize` is NULL. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value while `hCommand` is currently associated with a NULL local work size. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a NULL value while `hCommand` is currently associated with a non-NULL local work size. +/// + `pUpdateKernelLaunch->pNewLocalWorkSize != NULL && pUpdateKernelLaunch->pNewGlobalWorkSize == NULL` +/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is different from the work-dim currently associated with `hCommand`. /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION +/// + `pUpdateKernelLaunch->newWorkDim < 0 || pUpdateKernelLaunch->newWorkDim > 3` /// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the `hKernel` or `phKernelAlternatives` parameters of ::urCommandBufferAppendKernelLaunchExp when this command was created. diff --git a/scripts/core/exp-command-buffer.yml b/scripts/core/exp-command-buffer.yml index 6cfd193479..ee394a6ecc 100644 --- a/scripts/core/exp-command-buffer.yml +++ b/scripts/core/exp-command-buffer.yml @@ -954,17 +954,15 @@ returns: - $X_RESULT_ERROR_INVALID_OPERATION: - "If $x_exp_command_buffer_desc_t::isUpdatable was not set to true on creation of the command buffer `hCommand` belongs to." - "If the command-buffer `hCommand` belongs to has not been finalized." - - "If `pUpdateKernellaunch->hNewKernel` is different from the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is zero." - - "If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero and different from the work-dim currently associated with `hCommand`." - - "If `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value, and `pUpdateKernelLaunch->pNewGlobalWorkSize` is NULL." - - "If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value while `hCommand` is currently associated with a NULL local work size." - - "If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a NULL value while `hCommand` is currently associated with a non-NULL local work size." + - "`pUpdateKernelLaunch->pNewLocalWorkSize != NULL && pUpdateKernelLaunch->pNewGlobalWorkSize == NULL`" + - "If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is different from the work-dim currently associated with `hCommand`." - $X_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP - $X_RESULT_ERROR_INVALID_MEM_OBJECT - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX - $X_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE - $X_RESULT_ERROR_INVALID_ENUMERATION - - $X_RESULT_ERROR_INVALID_WORK_DIMENSION + - $X_RESULT_ERROR_INVALID_WORK_DIMENSION: + - "`pUpdateKernelLaunch->newWorkDim < 0 || pUpdateKernelLaunch->newWorkDim > 3`" - $X_RESULT_ERROR_INVALID_WORK_GROUP_SIZE - $X_RESULT_ERROR_INVALID_VALUE: - "If `pUpdateKernelLaunch->hNewKernel` was not passed to the `hKernel` or `phKernelAlternatives` parameters of $xCommandBufferAppendKernelLaunchExp when this command was created." diff --git a/source/adapters/cuda/command_buffer.cpp b/source/adapters/cuda/command_buffer.cpp index 1305bae515..d9899b8f30 100644 --- a/source/adapters/cuda/command_buffer.cpp +++ b/source/adapters/cuda/command_buffer.cpp @@ -887,37 +887,37 @@ validateCommandDesc(ur_exp_command_buffer_command_handle_t Command, return UR_RESULT_ERROR_INVALID_OPERATION; } - const uint32_t NewWorkDim = UpdateCommandDesc->newWorkDim; - if (!NewWorkDim && Command->Kernel != UpdateCommandDesc->hNewKernel) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - if (NewWorkDim) { - UR_ASSERT(NewWorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); - UR_ASSERT(NewWorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); - - if (NewWorkDim != Command->WorkDim && - Command->Kernel == UpdateCommandDesc->hNewKernel) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } + // const uint32_t NewWorkDim = UpdateCommandDesc->newWorkDim; + // if (!NewWorkDim) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } - // Error If Local size and not global size - if ((UpdateCommandDesc->pNewLocalWorkSize != nullptr) && - (UpdateCommandDesc->pNewGlobalWorkSize == nullptr)) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - // Error if local size non-nullptr and created with null - // or if local size nullptr and created with non-null - const bool IsNewLocalSizeNull = - UpdateCommandDesc->pNewLocalWorkSize == nullptr; - const bool IsOriginalLocalSizeNull = Command->isNullLocalSize(); + // if (NewWorkDim) { + // UR_ASSERT(NewWorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + // UR_ASSERT(NewWorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); - if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } + if (UpdateCommandDesc->newWorkDim != Command->WorkDim && + Command->Kernel == UpdateCommandDesc->hNewKernel) { + return UR_RESULT_ERROR_INVALID_OPERATION; } + // // Error If Local size and not global size + // if ((UpdateCommandDesc->pNewLocalWorkSize != nullptr) && + // (UpdateCommandDesc->pNewGlobalWorkSize == nullptr)) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + + // // Error if local size non-nullptr and created with null + // // or if local size nullptr and created with non-null + // const bool IsNewLocalSizeNull = + // UpdateCommandDesc->pNewLocalWorkSize == nullptr; + // const bool IsOriginalLocalSizeNull = Command->isNullLocalSize(); + // + // if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + // } + if (!Command->ValidKernelHandles.count(UpdateCommandDesc->hNewKernel)) { return UR_RESULT_ERROR_INVALID_VALUE; } diff --git a/source/adapters/hip/command_buffer.cpp b/source/adapters/hip/command_buffer.cpp index bc533c564d..86552881d1 100644 --- a/source/adapters/hip/command_buffer.cpp +++ b/source/adapters/hip/command_buffer.cpp @@ -18,6 +18,7 @@ #include "kernel.hpp" #include "memory.hpp" #include "queue.hpp" +#include #include @@ -48,9 +49,9 @@ commandHandleReleaseInternal(ur_exp_command_buffer_command_handle_t Command) { ur_exp_command_buffer_handle_t_::ur_exp_command_buffer_handle_t_( ur_context_handle_t hContext, ur_device_handle_t hDevice, bool IsUpdatable) - : Context(hContext), Device(hDevice), IsUpdatable(IsUpdatable), - HIPGraph{nullptr}, HIPGraphExec{nullptr}, RefCountInternal{1}, - RefCountExternal{1}, NextSyncPoint{0} { + : Context(hContext), Device(hDevice), + IsUpdatable(IsUpdatable), HIPGraph{nullptr}, HIPGraphExec{nullptr}, + RefCountInternal{1}, RefCountExternal{1}, NextSyncPoint{0} { urContextRetain(hContext); urDeviceRetain(hDevice); } @@ -330,9 +331,15 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp( UR_RESULT_ERROR_INVALID_KERNEL); UR_ASSERT(workDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); UR_ASSERT(workDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + UR_ASSERT(!(pSyncPointWaitList == NULL && numSyncPointsInWaitList > 0), UR_RESULT_ERROR_INVALID_EVENT_WAIT_LIST); + for (uint32_t i = 0; i < numKernelAlternatives; ++i) { + UR_ASSERT(phKernelAlternatives[i] != hKernel, + UR_RESULT_ERROR_INVALID_VALUE); + } + hipGraphNode_t GraphNode; std::vector DepsList; @@ -866,37 +873,41 @@ validateCommandDesc(ur_exp_command_buffer_command_handle_t Command, return UR_RESULT_ERROR_INVALID_OPERATION; } - const uint32_t NewWorkDim = UpdateCommandDesc->newWorkDim; - if (!NewWorkDim && Command->Kernel != UpdateCommandDesc->hNewKernel) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - if (NewWorkDim) { - UR_ASSERT(NewWorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); - UR_ASSERT(NewWorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + // const uint32_t NewWorkDim = UpdateCommandDesc->newWorkDim; + // if (!NewWorkDim && Command->Kernel != UpdateCommandDesc->hNewKernel) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } - if (NewWorkDim != Command->WorkDim && - Command->Kernel == UpdateCommandDesc->hNewKernel) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - // Error If Local size and not global size - if ((UpdateCommandDesc->pNewLocalWorkSize != nullptr) && - (UpdateCommandDesc->pNewGlobalWorkSize == nullptr)) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } + // if (NewWorkDim) { + // UR_ASSERT(NewWorkDim > 0, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); + // UR_ASSERT(NewWorkDim < 4, UR_RESULT_ERROR_INVALID_WORK_DIMENSION); - // Error if local size non-nullptr and created with null - // or if local size nullptr and created with non-null - const bool IsNewLocalSizeNull = - UpdateCommandDesc->pNewLocalWorkSize == nullptr; - const bool IsOriginalLocalSizeNull = Command->isNullLocalSize(); + std::cerr << "HERE" << std::endl; + std::cerr << UpdateCommandDesc->newWorkDim << std::endl; + std::cerr << Command->WorkDim << std::endl; - if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } + if (UpdateCommandDesc->newWorkDim != Command->WorkDim && + Command->Kernel == UpdateCommandDesc->hNewKernel) { + return UR_RESULT_ERROR_INVALID_OPERATION; } + // // Error If Local size and not global size + // if ((UpdateCommandDesc->pNewLocalWorkSize != nullptr) && + // (UpdateCommandDesc->pNewGlobalWorkSize == nullptr)) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + + // // Error if local size non-nullptr and created with null + // // or if local size nullptr and created with non-null + // const bool IsNewLocalSizeNull = + // UpdateCommandDesc->pNewLocalWorkSize == nullptr; + // const bool IsOriginalLocalSizeNull = Command->isNullLocalSize(); + // + // if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + // } + if (!Command->ValidKernelHandles.count(UpdateCommandDesc->hNewKernel)) { return UR_RESULT_ERROR_INVALID_VALUE; } @@ -907,8 +918,8 @@ validateCommandDesc(ur_exp_command_buffer_command_handle_t Command, /** * Updates the arguments of CommandDesc->hNewKernel * @param[in] Device The device associated with the kernel being updated. - * @param[in] UpdateCommandDesc The update command description that contains the - * new kernel and its arguments. + * @param[in] UpdateCommandDesc The update command description that contains + * the new kernel and its arguments. * @return UR_RESULT_SUCCESS or an error code on failure */ ur_result_t @@ -1020,8 +1031,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp( updateKernelArguments(CommandBuffer->Device, pUpdateKernelLaunch)); UR_CHECK_ERROR(updateCommand(hCommand, pUpdateKernelLaunch)); - // If no worksize is provided make sure we pass nullptr to setKernelParams so - // it can guess the local work size. + // If no worksize is provided make sure we pass nullptr to setKernelParams + // so it can guess the local work size. const bool ProvidedLocalSize = !hCommand->isNullLocalSize(); size_t *LocalWorkSize = ProvidedLocalSize ? hCommand->LocalWorkSize : nullptr; diff --git a/source/adapters/level_zero/command_buffer.cpp b/source/adapters/level_zero/command_buffer.cpp index 16876976ca..9eee0d07e9 100644 --- a/source/adapters/level_zero/command_buffer.cpp +++ b/source/adapters/level_zero/command_buffer.cpp @@ -1320,35 +1320,42 @@ ur_result_t validateCommandDesc( ->mutableCommandFlags; logger::debug("Mutable features supported by device {}", SupportedFeatures); - uint32_t Dim = CommandDesc->newWorkDim; - if (Dim != 0) { - // Error if work dim changes - if (Dim != Command->WorkDim) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - // Error If Local size and not global size - if ((CommandDesc->pNewLocalWorkSize != nullptr) && - (CommandDesc->pNewGlobalWorkSize == nullptr)) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } - - // Error if local size non-nullptr and created with null - // or if local size nullptr and created with non-null - const bool IsNewLocalSizeNull = CommandDesc->pNewLocalWorkSize == nullptr; - const bool IsOriginalLocalSizeNull = !Command->UserDefinedLocalSize; + // kernel handle updates are not yet supported. + if (CommandDesc->hNewKernel != Command->Kernel) { + return UR_RESULT_ERROR_UNSUPPORTED_FEATURE; + } - if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { - return UR_RESULT_ERROR_INVALID_OPERATION; - } + // uint32_t Dim = CommandDesc->newWorkDim; + // if (Dim != 0) { + // Error if work dim changes + if (CommandDesc->hNewKernel == Command->Kernel && + CommandDesc->newWorkDim != Command->WorkDim) { + return UR_RESULT_ERROR_INVALID_OPERATION; } + // // Error If Local size and not global size + // if ((CommandDesc->pNewLocalWorkSize != nullptr) && + // (CommandDesc->pNewGlobalWorkSize == nullptr)) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + + // // Error if local size non-nullptr and created with null + // // or if local size nullptr and created with non-null + // const bool IsNewLocalSizeNull = CommandDesc->pNewLocalWorkSize == + // nullptr; const bool IsOriginalLocalSizeNull = + // !Command->UserDefinedLocalSize; + // + // if (IsNewLocalSizeNull ^ IsOriginalLocalSizeNull) { + // return UR_RESULT_ERROR_INVALID_OPERATION; + // } + // } + // Check if new global offset is provided. size_t *NewGlobalWorkOffset = CommandDesc->pNewGlobalWorkOffset; UR_ASSERT(!NewGlobalWorkOffset || (SupportedFeatures & ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET), UR_RESULT_ERROR_UNSUPPORTED_FEATURE); - if (NewGlobalWorkOffset && Dim > 0) { + if (NewGlobalWorkOffset) { if (!CommandBuffer->Context->getPlatform() ->ZeDriverGlobalOffsetExtensionFound) { logger::error("No global offset extension found on this driver"); @@ -1618,8 +1625,6 @@ ur_result_t urCommandBufferUpdateKernelLaunchExp( ur_exp_command_buffer_command_handle_t Command, const ur_exp_command_buffer_update_kernel_launch_desc_t *CommandDesc) { UR_ASSERT(Command->Kernel, UR_RESULT_ERROR_INVALID_NULL_HANDLE); - UR_ASSERT(CommandDesc->newWorkDim <= 3, - UR_RESULT_ERROR_INVALID_WORK_DIMENSION); // Lock command, kernel and command buffer for update. std::scoped_lock Guard( diff --git a/source/adapters/level_zero/device.cpp b/source/adapters/level_zero/device.cpp index 507695ec91..463054c735 100644 --- a/source/adapters/level_zero/device.cpp +++ b/source/adapters/level_zero/device.cpp @@ -1013,21 +1013,25 @@ ur_result_t urDeviceGetInfo( case UR_DEVICE_INFO_COMMAND_BUFFER_UPDATE_CAPABILITIES_EXP: { const bool ZeMutableCommandFlags = Device->ZeDeviceMutableCmdListsProperties->mutableCommandFlags; + auto supportsFlags = [&](ze_mutable_command_exp_flags_t RequiredFlags) { + if ((ZeMutableCommandFlags & RequiredFlags) == RequiredFlags) { + return true; + } + return false; + }; ur_device_command_buffer_update_capability_flags_t UpdateCapabilities = 0; - if (ZeMutableCommandFlags & ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS) { + if (supportsFlags(ZE_MUTABLE_COMMAND_EXP_FLAG_KERNEL_ARGUMENTS)) { UpdateCapabilities |= UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_KERNEL_ARGUMENTS; } - ze_mutable_command_exp_flags_t ReqUpdateWG = - ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT | - ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE; - if ((ZeMutableCommandFlags & ReqUpdateWG) == ReqUpdateWG) { + if (supportsFlags(ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_COUNT | + ZE_MUTABLE_COMMAND_EXP_FLAG_GROUP_SIZE)) { UpdateCapabilities |= UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_SIZE | UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_LOCAL_WORK_SIZE; } - if (ZeMutableCommandFlags & ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET) { + if (supportsFlags(ZE_MUTABLE_COMMAND_EXP_FLAG_GLOBAL_OFFSET)) { UpdateCapabilities |= UR_DEVICE_COMMAND_BUFFER_UPDATE_CAPABILITY_FLAG_GLOBAL_WORK_OFFSET; } diff --git a/source/loader/layers/validation/ur_valddi.cpp b/source/loader/layers/validation/ur_valddi.cpp index 542dfc3be5..dbca114c58 100644 --- a/source/loader/layers/validation/ur_valddi.cpp +++ b/source/loader/layers/validation/ur_valddi.cpp @@ -8955,6 +8955,16 @@ __urdlllocal ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp( if (NULL == pUpdateKernelLaunch) { return UR_RESULT_ERROR_INVALID_NULL_POINTER; } + + if (pUpdateKernelLaunch->pNewLocalWorkSize != NULL && + pUpdateKernelLaunch->pNewGlobalWorkSize == NULL) { + return UR_RESULT_ERROR_INVALID_OPERATION; + } + + if (pUpdateKernelLaunch->newWorkDim < 0 || + pUpdateKernelLaunch->newWorkDim > 3) { + return UR_RESULT_ERROR_INVALID_WORK_DIMENSION; + } } ur_result_t result = diff --git a/source/loader/ur_libapi.cpp b/source/loader/ur_libapi.cpp index 81937709ca..f3f6b27bba 100644 --- a/source/loader/ur_libapi.cpp +++ b/source/loader/ur_libapi.cpp @@ -8314,17 +8314,15 @@ ur_result_t UR_APICALL urCommandBufferReleaseCommandExp( /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true on creation of the command buffer `hCommand` belongs to. /// + If the command-buffer `hCommand` belongs to has not been finalized. -/// + If `pUpdateKernellaunch->hNewKernel` is different from the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is zero. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero and different from the work-dim currently associated with `hCommand`. -/// + If `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value, and `pUpdateKernelLaunch->pNewGlobalWorkSize` is NULL. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value while `hCommand` is currently associated with a NULL local work size. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a NULL value while `hCommand` is currently associated with a non-NULL local work size. +/// + `pUpdateKernelLaunch->pNewLocalWorkSize != NULL && pUpdateKernelLaunch->pNewGlobalWorkSize == NULL` +/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is different from the work-dim currently associated with `hCommand`. /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION +/// + `pUpdateKernelLaunch->newWorkDim < 0 || pUpdateKernelLaunch->newWorkDim > 3` /// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the `hKernel` or `phKernelAlternatives` parameters of ::urCommandBufferAppendKernelLaunchExp when this command was created. diff --git a/source/ur_api.cpp b/source/ur_api.cpp index f5f02bbee4..8c005ecb5d 100644 --- a/source/ur_api.cpp +++ b/source/ur_api.cpp @@ -7027,17 +7027,15 @@ ur_result_t UR_APICALL urCommandBufferReleaseCommandExp( /// - ::UR_RESULT_ERROR_INVALID_OPERATION /// + If ::ur_exp_command_buffer_desc_t::isUpdatable was not set to true on creation of the command buffer `hCommand` belongs to. /// + If the command-buffer `hCommand` belongs to has not been finalized. -/// + If `pUpdateKernellaunch->hNewKernel` is different from the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is zero. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero and different from the work-dim currently associated with `hCommand`. -/// + If `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value, and `pUpdateKernelLaunch->pNewGlobalWorkSize` is NULL. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a non-NULL value while `hCommand` is currently associated with a NULL local work size. -/// + If `pUpdateKernellaunch->hNewKernel` is equal to the current kernel associated with `hCommand`, and `pUpdateKernellaunch->newWorkDim` is non-zero, and `pUpdateKernelLaunch->pNewLocalWorkSize` is set to a NULL value while `hCommand` is currently associated with a non-NULL local work size. +/// + `pUpdateKernelLaunch->pNewLocalWorkSize != NULL && pUpdateKernelLaunch->pNewGlobalWorkSize == NULL` +/// + If `pUpdateKernellaunch->hNewKernel` is equal to the currently active kernel in `hCommand`, and `pUpdateKernellaunch->newWorkDim` is different from the work-dim currently associated with `hCommand`. /// - ::UR_RESULT_ERROR_INVALID_COMMAND_BUFFER_COMMAND_HANDLE_EXP /// - ::UR_RESULT_ERROR_INVALID_MEM_OBJECT /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_INDEX /// - ::UR_RESULT_ERROR_INVALID_KERNEL_ARGUMENT_SIZE /// - ::UR_RESULT_ERROR_INVALID_ENUMERATION /// - ::UR_RESULT_ERROR_INVALID_WORK_DIMENSION +/// + `pUpdateKernelLaunch->newWorkDim < 0 || pUpdateKernelLaunch->newWorkDim > 3` /// - ::UR_RESULT_ERROR_INVALID_WORK_GROUP_SIZE /// - ::UR_RESULT_ERROR_INVALID_VALUE /// + If `pUpdateKernelLaunch->hNewKernel` was not passed to the `hKernel` or `phKernelAlternatives` parameters of ::urCommandBufferAppendKernelLaunchExp when this command was created. 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 e694465fd2..08be337466 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 @@ -73,7 +73,7 @@ struct BufferFillCommandTest static constexpr size_t local_size = 4; static constexpr size_t global_size = 32; static constexpr size_t global_offset = 0; - static constexpr size_t n_dimensions = 1; + static constexpr uint32_t n_dimensions = 1; static constexpr size_t buffer_size = sizeof(val) * global_size; ur_mem_handle_t buffer = nullptr; ur_mem_handle_t new_buffer = nullptr; @@ -128,7 +128,7 @@ TEST_P(BufferFillCommandTest, UpdateParameters) { 1, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim &new_output_desc, // pNewMemObjArgList nullptr, // pNewPointerArgList &new_input_desc, // pNewValueArgList @@ -181,7 +181,7 @@ TEST_P(BufferFillCommandTest, UpdateGlobalSize) { 1, // numNewMemObjArgs 0, // numNewPointerArgs 0, // numNewValueArgs - 1, // newWorkDim + n_dimensions, // newWorkDim &new_output_desc, // pNewMemObjArgList nullptr, // pNewPointerArgList nullptr, // pNewValueArgList @@ -232,7 +232,7 @@ TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { 1, // numNewMemObjArgs 0, // numNewPointerArgs 0, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim &new_output_desc, // pNewMemObjArgList nullptr, // pNewPointerArgList nullptr, // pNewValueArgList @@ -261,7 +261,7 @@ TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList &new_input_desc, // pNewValueArgList @@ -276,17 +276,17 @@ TEST_P(BufferFillCommandTest, SeparateUpdateCalls) { ur_exp_command_buffer_update_kernel_launch_desc_t global_size_update_desc = { UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype nullptr, // pNext - kernel, // hNewKernel - 0, // numNewMemObjArgs - 0, // numNewPointerArgs - 0, // numNewValueArgs - static_cast(n_dimensions), // newWorkDim - nullptr, // pNewMemObjArgList - nullptr, // pNewPointerArgList - nullptr, // pNewValueArgList - nullptr, // pNewGlobalWorkOffset - &new_global_size, // pNewGlobalWorkSize - &new_local_size, // pNewLocalWorkSize + kernel, // hNewKernel + 0, // numNewMemObjArgs + 0, // numNewPointerArgs + 0, // numNewValueArgs + n_dimensions, // newWorkDim + nullptr, // pNewMemObjArgList + nullptr, // pNewPointerArgList + nullptr, // pNewValueArgList + nullptr, // pNewGlobalWorkOffset + &new_global_size, // pNewGlobalWorkSize + &new_local_size, // pNewLocalWorkSize }; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp( @@ -325,7 +325,7 @@ TEST_P(BufferFillCommandTest, OverrideUpdate) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList &first_input_desc, // pNewValueArgList @@ -353,7 +353,7 @@ TEST_P(BufferFillCommandTest, OverrideUpdate) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList &second_input_desc, // pNewValueArgList @@ -406,17 +406,17 @@ TEST_P(BufferFillCommandTest, OverrideArgList) { ur_exp_command_buffer_update_kernel_launch_desc_t second_update_desc = { UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype nullptr, // pNext - kernel, // hNewKernel - 0, // numNewMemObjArgs - 0, // numNewPointerArgs - 2, // numNewValueArgs - 0, // newWorkDim - nullptr, // pNewMemObjArgList - nullptr, // pNewPointerArgList - input_descs, // pNewValueArgList - nullptr, // pNewGlobalWorkOffset - nullptr, // pNewGlobalWorkSize - nullptr, // pNewLocalWorkSize + kernel, // hNewKernel + 0, // numNewMemObjArgs + 0, // numNewPointerArgs + 2, // numNewValueArgs + n_dimensions, // newWorkDim + nullptr, // pNewMemObjArgList + nullptr, // pNewPointerArgList + input_descs, // pNewValueArgList + nullptr, // pNewGlobalWorkOffset + nullptr, // pNewGlobalWorkSize + nullptr, // pNewLocalWorkSize }; ASSERT_SUCCESS(urCommandBufferUpdateKernelLaunchExp(command_handle, 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 19da365084..69ba67eb0f 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 @@ -130,7 +130,7 @@ struct BufferSaxpyKernelTest static constexpr size_t local_size = 4; static constexpr size_t global_size = 32; static constexpr size_t global_offset = 0; - static constexpr size_t n_dimensions = 1; + static constexpr uint32_t n_dimensions = 1; static constexpr uint32_t A = 42; std::array buffers = {nullptr, nullptr, nullptr, nullptr}; @@ -188,7 +188,7 @@ TEST_P(BufferSaxpyKernelTest, UpdateParameters) { 2, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim new_input_descs, // pNewMemObjArgList nullptr, // pNewPointerArgList &new_A_desc, // pNewValueArgList diff --git a/test/conformance/exp_command_buffer/update/invalid_update.cpp b/test/conformance/exp_command_buffer/update/invalid_update.cpp index c5947e039f..2ebd328630 100644 --- a/test/conformance/exp_command_buffer/update/invalid_update.cpp +++ b/test/conformance/exp_command_buffer/update/invalid_update.cpp @@ -65,7 +65,7 @@ struct InvalidUpdateTest static constexpr size_t local_size = 4; static constexpr size_t global_size = 32; static constexpr size_t global_offset = 0; - static constexpr size_t n_dimensions = 1; + static constexpr uint32_t n_dimensions = 1; static constexpr size_t allocation_size = sizeof(val) * global_size; void *shared_ptr = nullptr; ur_exp_command_buffer_command_handle_t command_handle = nullptr; @@ -94,7 +94,7 @@ TEST_P(InvalidUpdateTest, NotFinalizedCommandBuffer) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList &new_input_desc, // pNewValueArgList @@ -145,7 +145,7 @@ TEST_P(InvalidUpdateTest, NotUpdatableCommandBuffer) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList &new_input_desc, // pNewValueArgList @@ -197,76 +197,76 @@ TEST_P(InvalidUpdateTest, GlobalLocalSizeMistach) { ASSERT_EQ(UR_RESULT_ERROR_INVALID_OPERATION, result); } -// Test setting `pNewLocalWorkSize` to a non-NULL value when the command was -// created with a NULL local work size gives the correct error. -TEST_P(InvalidUpdateTest, ImplToUserDefinedLocalSize) { - // Append kernel command to command-buffer using NULL local work size - ur_exp_command_buffer_command_handle_t second_command_handle = nullptr; - ASSERT_SUCCESS(urCommandBufferAppendKernelLaunchExp( - updatable_cmd_buf_handle, kernel, n_dimensions, &global_offset, - &global_size, nullptr, 0, nullptr, 0, nullptr, nullptr, - &second_command_handle)); - ASSERT_NE(second_command_handle, nullptr); - - EXPECT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - finalized = true; - - size_t new_global_size = 64; - size_t new_local_size = 16; - ur_exp_command_buffer_update_kernel_launch_desc_t update_desc = { - UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype - nullptr, // pNext - kernel, // hNewKernel - 0, // numNewMemObjArgs - 0, // numNewPointerArgs - 0, // numNewValueArgs - n_dimensions, // newWorkDim - nullptr, // pNewMemObjArgList - nullptr, // pNewPointerArgList - nullptr, // pNewValueArgList - nullptr, // pNewGlobalWorkOffset - &new_global_size, // pNewGlobalWorkSize - &new_local_size, // pNewLocalWorkSize - }; - - // Update command local size to non-NULL when created with NULL value - ur_result_t result = urCommandBufferUpdateKernelLaunchExp( - second_command_handle, &update_desc); - EXPECT_EQ(UR_RESULT_ERROR_INVALID_OPERATION, result); - - if (second_command_handle) { - EXPECT_SUCCESS(urCommandBufferReleaseCommandExp(second_command_handle)); - } -} - -// Test setting `pNewLocalWorkSize` to a NULL value when the command was -// created with a non-NULL local work size gives the correct error. -TEST_P(InvalidUpdateTest, UserToImplDefinedLocalSize) { - ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); - finalized = true; - - size_t new_global_size = 64; - ur_exp_command_buffer_update_kernel_launch_desc_t update_desc = { - UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype - nullptr, // pNext - kernel, // hNewKernel - 0, // numNewMemObjArgs - 0, // numNewPointerArgs - 0, // numNewValueArgs - n_dimensions, // newWorkDim - nullptr, // pNewMemObjArgList - nullptr, // pNewPointerArgList - nullptr, // pNewValueArgList - nullptr, // pNewGlobalWorkOffset - &new_global_size, // pNewGlobalWorkSize - nullptr, // pNewLocalWorkSize - }; - - // Update command local size to NULL when created with non-NULL value - ur_result_t result = - urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc); - ASSERT_EQ(UR_RESULT_ERROR_INVALID_OPERATION, result); -} +//// Test setting `pNewLocalWorkSize` to a non-NULL value when the command was +//// created with a NULL local work size gives the correct error. +//TEST_P(InvalidUpdateTest, ImplToUserDefinedLocalSize) { +// // Append kernel command to command-buffer using NULL local work size +// ur_exp_command_buffer_command_handle_t second_command_handle = nullptr; +// ASSERT_SUCCESS(urCommandBufferAppendKernelLaunchExp( +// updatable_cmd_buf_handle, kernel, n_dimensions, &global_offset, +// &global_size, nullptr, 0, nullptr, 0, nullptr, nullptr, +// &second_command_handle)); +// ASSERT_NE(second_command_handle, nullptr); +// +// EXPECT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); +// finalized = true; +// +// size_t new_global_size = 64; +// size_t new_local_size = 16; +// ur_exp_command_buffer_update_kernel_launch_desc_t update_desc = { +// UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype +// nullptr, // pNext +// kernel, // hNewKernel +// 0, // numNewMemObjArgs +// 0, // numNewPointerArgs +// 0, // numNewValueArgs +// n_dimensions, // newWorkDim +// nullptr, // pNewMemObjArgList +// nullptr, // pNewPointerArgList +// nullptr, // pNewValueArgList +// nullptr, // pNewGlobalWorkOffset +// &new_global_size, // pNewGlobalWorkSize +// &new_local_size, // pNewLocalWorkSize +// }; +// +// // Update command local size to non-NULL when created with NULL value +// ur_result_t result = urCommandBufferUpdateKernelLaunchExp( +// second_command_handle, &update_desc); +// EXPECT_EQ(UR_RESULT_ERROR_INVALID_OPERATION, result); +// +// if (second_command_handle) { +// EXPECT_SUCCESS(urCommandBufferReleaseCommandExp(second_command_handle)); +// } +//} + +//// Test setting `pNewLocalWorkSize` to a NULL value when the command was +//// created with a non-NULL local work size gives the correct error. +//TEST_P(InvalidUpdateTest, UserToImplDefinedLocalSize) { +// ASSERT_SUCCESS(urCommandBufferFinalizeExp(updatable_cmd_buf_handle)); +// finalized = true; +// +// size_t new_global_size = 64; +// ur_exp_command_buffer_update_kernel_launch_desc_t update_desc = { +// UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype +// nullptr, // pNext +// kernel, // hNewKernel +// 0, // numNewMemObjArgs +// 0, // numNewPointerArgs +// 0, // numNewValueArgs +// n_dimensions, // newWorkDim +// nullptr, // pNewMemObjArgList +// nullptr, // pNewPointerArgList +// nullptr, // pNewValueArgList +// nullptr, // pNewGlobalWorkOffset +// &new_global_size, // pNewGlobalWorkSize +// nullptr, // pNewLocalWorkSize +// }; +// +// // Update command local size to NULL when created with non-NULL value +// ur_result_t result = +// urCommandBufferUpdateKernelLaunchExp(command_handle, &update_desc); +// ASSERT_EQ(UR_RESULT_ERROR_INVALID_OPERATION, result); +//} // If the kernel handle is not being updated, then it's invalid to change // the number of dimensions. diff --git a/test/conformance/exp_command_buffer/update/ndrange_update.cpp b/test/conformance/exp_command_buffer/update/ndrange_update.cpp index dd3f17a90a..946be64165 100644 --- a/test/conformance/exp_command_buffer/update/ndrange_update.cpp +++ b/test/conformance/exp_command_buffer/update/ndrange_update.cpp @@ -99,7 +99,7 @@ struct NDRangeUpdateTest } static constexpr size_t elements_per_id = 6; - static constexpr size_t n_dimensions = 3; + static constexpr uint32_t n_dimensions = 3; static constexpr std::array global_size = {8, 8, 8}; static constexpr std::array local_size = {1, 2, 2}; static constexpr std::array global_offset = {0, 4, 4}; @@ -132,7 +132,7 @@ TEST_P(NDRangeUpdateTest, Update3D) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 0, // numNewValueArgs - 3, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList nullptr, // pNewValueArgList @@ -177,7 +177,7 @@ TEST_P(NDRangeUpdateTest, Update2D) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 0, // numNewValueArgs - 3, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList nullptr, // pNewValueArgList @@ -222,7 +222,7 @@ TEST_P(NDRangeUpdateTest, Update1D) { 0, // numNewMemObjArgs 0, // numNewPointerArgs 0, // numNewValueArgs - 3, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList nullptr, // pNewPointerArgList nullptr, // pNewValueArgList 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 b437971e9a..ad631ff6f2 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 @@ -71,7 +71,7 @@ struct USMFillCommandTest static constexpr size_t local_size = 4; static constexpr size_t global_size = 32; static constexpr size_t global_offset = 0; - static constexpr size_t n_dimensions = 1; + static constexpr uint32_t n_dimensions = 1; static constexpr size_t allocation_size = sizeof(val) * global_size; void *shared_ptr = nullptr; void *new_shared_ptr = nullptr; @@ -120,17 +120,17 @@ TEST_P(USMFillCommandTest, UpdateParameters) { ur_exp_command_buffer_update_kernel_launch_desc_t update_desc = { UR_STRUCTURE_TYPE_EXP_COMMAND_BUFFER_UPDATE_KERNEL_LAUNCH_DESC, // stype nullptr, // pNext - kernel, // hNewKernel - 0, // numNewMemObjArgs - 1, // numNewPointerArgs - 1, // numNewValueArgs - static_cast(n_dimensions), // newWorkDim - nullptr, // pNewMemObjArgList - &new_output_desc, // pNewPointerArgList - &new_input_desc, // pNewValueArgList - nullptr, // pNewGlobalWorkOffset - &new_global_size, // pNewGlobalWorkSize - &new_local_size, // pNewLocalWorkSize + kernel, // hNewKernel + 0, // numNewMemObjArgs + 1, // numNewPointerArgs + 1, // numNewValueArgs + n_dimensions, // newWorkDim + nullptr, // pNewMemObjArgList + &new_output_desc, // pNewPointerArgList + &new_input_desc, // pNewValueArgList + nullptr, // pNewGlobalWorkOffset + &new_global_size, // pNewGlobalWorkSize + &new_local_size, // pNewLocalWorkSize }; // Update kernel and enqueue command-buffer again @@ -178,7 +178,7 @@ TEST_P(USMFillCommandTest, UpdateBeforeEnqueue) { 0, // numNewMemObjArgs 1, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList &new_output_desc, // pNewPointerArgList &new_input_desc, // pNewValueArgList @@ -330,7 +330,7 @@ TEST_P(USMMultipleFillCommandTest, UpdateAllKernels) { 0, // numNewMemObjArgs 1, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList &new_output_desc, // pNewPointerArgList &new_input_desc, // pNewValueArgList 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 21f21afa11..1735efdd74 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 @@ -152,7 +152,7 @@ TEST_P(USMSaxpyKernelTest, UpdateParameters) { 0, // numNewMemObjArgs 2, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList new_input_descs, // pNewPointerArgList &new_A_desc, // pNewValueArgList @@ -258,7 +258,7 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateParameters) { 0, // numNewMemObjArgs 2, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList new_input_descs, // pNewPointerArgList &new_A_desc, // pNewValueArgList @@ -324,7 +324,7 @@ TEST_P(USMMultiSaxpyKernelTest, UpdateWithoutBlocking) { 0, // numNewMemObjArgs 2, // numNewPointerArgs 1, // numNewValueArgs - 0, // newWorkDim + n_dimensions, // newWorkDim nullptr, // pNewMemObjArgList new_input_descs, // pNewPointerArgList &new_A_desc, // pNewValueArgList