fix: correct signature of zeCommandListAppendLaunchKernelWithArguments

add const to pArguments and pNext types

Related-To: NEO-14560
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-07-16 15:03:58 +00:00
committed by Compute-Runtime-Automation
parent 10dc8a52a8
commit 4dc4c45bbb
7 changed files with 18 additions and 18 deletions

View File

@@ -162,8 +162,8 @@ ze_result_t zeCommandListAppendLaunchKernelWithArguments(
ze_kernel_handle_t hKernel, ze_kernel_handle_t hKernel,
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents) { ze_event_handle_t *phWaitEvents) {
@@ -315,8 +315,8 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments(
ze_kernel_handle_t hKernel, ze_kernel_handle_t hKernel,
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents) { ze_event_handle_t *phWaitEvents) {

View File

@@ -131,8 +131,8 @@ struct CommandList : _ze_command_list_handle_t {
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents) = 0; ze_event_handle_t *phWaitEvents) = 0;

View File

@@ -134,8 +134,8 @@ struct CommandListCoreFamily : public CommandListImp {
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents) override; ze_event_handle_t *phWaitEvents) override;

View File

@@ -595,8 +595,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithArgument
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents) { ze_event_handle_t *phWaitEvents) {
@@ -627,7 +627,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithArgument
switch (arg.type) { switch (arg.type) {
case NEO::ArgDescriptor::argTPointer: case NEO::ArgDescriptor::argTPointer:
if (arg.getTraits().getAddressQualifier() == NEO::KernelArgMetadata::AddrLocal) { if (arg.getTraits().getAddressQualifier() == NEO::KernelArgMetadata::AddrLocal) {
argSize = *reinterpret_cast<size_t *>(argValue); argSize = *reinterpret_cast<const size_t *>(argValue);
argValue = nullptr; argValue = nullptr;
} }
break; break;
@@ -646,7 +646,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithArgument
L0::CmdListKernelLaunchParams launchParams = {}; L0::CmdListKernelLaunchParams launchParams = {};
launchParams.skipInOrderNonWalkerSignaling = this->skipInOrderNonWalkerSignalingAllowed(hSignalEvent); launchParams.skipInOrderNonWalkerSignaling = this->skipInOrderNonWalkerSignalingAllowed(hSignalEvent);
result = this->obtainLaunchParamsFromExtensions(reinterpret_cast<ze_base_desc_t *>(pNext), launchParams, hKernel); result = this->obtainLaunchParamsFromExtensions(reinterpret_cast<const ze_base_desc_t *>(pNext), launchParams, hKernel);
if (result != ZE_RESULT_SUCCESS) { if (result != ZE_RESULT_SUCCESS) {
return result; return result;

View File

@@ -385,8 +385,8 @@ struct Mock<CommandList> : public CommandList {
(ze_kernel_handle_t hKernel, (ze_kernel_handle_t hKernel,
const ze_group_count_t groupCounts, const ze_group_count_t groupCounts,
const ze_group_size_t groupSizes, const ze_group_size_t groupSizes,
void **pArguments, const void **pArguments,
void *pNext, const void *pNext,
ze_event_handle_t hSignalEvent, ze_event_handle_t hSignalEvent,
uint32_t numWaitEvents, uint32_t numWaitEvents,
ze_event_handle_t *phWaitEvents)); ze_event_handle_t *phWaitEvents));

View File

@@ -3673,7 +3673,7 @@ TEST_F(CommandListAppendLaunchKernelWithArgumentsTests, givenIncorrectGroupSizeW
Mock<::L0::KernelImp> kernel; Mock<::L0::KernelImp> kernel;
kernel.module = mockModule.get(); kernel.module = mockModule.get();
void *arguments = nullptr; const void *arguments = nullptr;
retVal = zeCommandListAppendLaunchKernelWithArguments(commandList->toHandle(), kernel.toHandle(), groupCounts, groupSizes, &arguments, nullptr, nullptr, 0, nullptr); retVal = zeCommandListAppendLaunchKernelWithArguments(commandList->toHandle(), kernel.toHandle(), groupCounts, groupSizes, &arguments, nullptr, nullptr, 0, nullptr);
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION, retVal); EXPECT_EQ(ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION, retVal);
} }
@@ -3739,7 +3739,7 @@ TEST_F(CommandListAppendLaunchKernelWithArgumentsTests, whenAppendLaunchKernelWi
uint8_t argImmediate[16]{}; uint8_t argImmediate[16]{};
size_t argSlm = 0x60; size_t argSlm = 0x60;
void *arguments[] = {&argBuffer, &argImage, &argSampler, &argImmediate, &argSlm}; const void *arguments[] = {&argBuffer, &argImage, &argSampler, &argImmediate, &argSlm};
retVal = zeCommandListAppendLaunchKernelWithArguments(commandList->toHandle(), kernel.toHandle(), groupCounts, groupSizes, arguments, nullptr, nullptr, 0, nullptr); retVal = zeCommandListAppendLaunchKernelWithArguments(commandList->toHandle(), kernel.toHandle(), groupCounts, groupSizes, arguments, nullptr, nullptr, 0, nullptr);
EXPECT_EQ(ZE_RESULT_SUCCESS, retVal); EXPECT_EQ(ZE_RESULT_SUCCESS, retVal);

View File

@@ -596,8 +596,8 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments(
ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object
const ze_group_count_t groupCounts, ///< [in] thread group counts const ze_group_count_t groupCounts, ///< [in] thread group counts
const ze_group_size_t groupSizes, ///< [in] thread group sizes const ze_group_size_t groupSizes, ///< [in] thread group sizes
void **pArguments, ///< [in] kernel arguments; pointer to list where each argument represents a pointer to the argument value on specific index const void **pArguments, ///< [in] kernel arguments; pointer to list where each argument represents a pointer to the argument value on specific index
void *pNext, ///< [in][optional] extensions const void *pNext, ///< [in][optional] extensions
ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion ze_event_handle_t hSignalEvent, ///< [in][optional] handle of the event to signal on completion
uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching uint32_t numWaitEvents, ///< [in][optional] number of events to wait on before launching
ze_event_handle_t *phWaitEvents); ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching ze_event_handle_t *phWaitEvents); ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching