diff --git a/level_zero/api/core/ze_cmdlist_api_entrypoints.h b/level_zero/api/core/ze_cmdlist_api_entrypoints.h index b727053d1f..87d653aa21 100644 --- a/level_zero/api/core/ze_cmdlist_api_entrypoints.h +++ b/level_zero/api/core/ze_cmdlist_api_entrypoints.h @@ -162,8 +162,8 @@ ze_result_t zeCommandListAppendLaunchKernelWithArguments( ze_kernel_handle_t hKernel, const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) { @@ -315,8 +315,8 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments( ze_kernel_handle_t hKernel, const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) { diff --git a/level_zero/core/source/cmdlist/cmdlist.h b/level_zero/core/source/cmdlist/cmdlist.h index 9126e7e71b..bf57c7ee39 100644 --- a/level_zero/core/source/cmdlist/cmdlist.h +++ b/level_zero/core/source/cmdlist/cmdlist.h @@ -131,8 +131,8 @@ struct CommandList : _ze_command_list_handle_t { const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) = 0; diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index 98ebea171a..16ed83c3ba 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -134,8 +134,8 @@ struct CommandListCoreFamily : public CommandListImp { const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) override; diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 4471880269..5b703968d0 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -595,8 +595,8 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithArgument const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents) { @@ -627,7 +627,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithArgument switch (arg.type) { case NEO::ArgDescriptor::argTPointer: if (arg.getTraits().getAddressQualifier() == NEO::KernelArgMetadata::AddrLocal) { - argSize = *reinterpret_cast(argValue); + argSize = *reinterpret_cast(argValue); argValue = nullptr; } break; @@ -646,7 +646,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithArgument L0::CmdListKernelLaunchParams launchParams = {}; launchParams.skipInOrderNonWalkerSignaling = this->skipInOrderNonWalkerSignalingAllowed(hSignalEvent); - result = this->obtainLaunchParamsFromExtensions(reinterpret_cast(pNext), launchParams, hKernel); + result = this->obtainLaunchParamsFromExtensions(reinterpret_cast(pNext), launchParams, hKernel); if (result != ZE_RESULT_SUCCESS) { return result; diff --git a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h index 00d2aae45f..102e16e3ac 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h +++ b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h @@ -385,8 +385,8 @@ struct Mock : public CommandList { (ze_kernel_handle_t hKernel, const ze_group_count_t groupCounts, const ze_group_size_t groupSizes, - void **pArguments, - void *pNext, + const void **pArguments, + const void *pNext, ze_event_handle_t hSignalEvent, uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents)); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp index ac08c1f0de..553c55c528 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_1.cpp @@ -3673,7 +3673,7 @@ TEST_F(CommandListAppendLaunchKernelWithArgumentsTests, givenIncorrectGroupSizeW Mock<::L0::KernelImp> kernel; kernel.module = mockModule.get(); - void *arguments = nullptr; + const void *arguments = nullptr; retVal = zeCommandListAppendLaunchKernelWithArguments(commandList->toHandle(), kernel.toHandle(), groupCounts, groupSizes, &arguments, nullptr, nullptr, 0, nullptr); EXPECT_EQ(ZE_RESULT_ERROR_INVALID_GROUP_SIZE_DIMENSION, retVal); } @@ -3739,7 +3739,7 @@ TEST_F(CommandListAppendLaunchKernelWithArgumentsTests, whenAppendLaunchKernelWi uint8_t argImmediate[16]{}; 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); EXPECT_EQ(ZE_RESULT_SUCCESS, retVal); diff --git a/level_zero/include/level_zero/ze_intel_gpu.h b/level_zero/include/level_zero/ze_intel_gpu.h index 54693f5531..bd91c96341 100644 --- a/level_zero/include/level_zero/ze_intel_gpu.h +++ b/level_zero/include/level_zero/ze_intel_gpu.h @@ -596,8 +596,8 @@ ze_result_t ZE_APICALL zeCommandListAppendLaunchKernelWithArguments( ze_kernel_handle_t hKernel, ///< [in] handle of the kernel object const ze_group_count_t groupCounts, ///< [in] thread group counts 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 - void *pNext, ///< [in][optional] extensions + const void **pArguments, ///< [in] kernel arguments; pointer to list where each argument represents a pointer to the argument value on specific index + const void *pNext, ///< [in][optional] extensions 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 ze_event_handle_t *phWaitEvents); ///< [in][optional][range(0, numWaitEvents)] handle of the events to wait on before launching