From a90553b9e4b94b179ef54fcc3d30bdabb8b399da Mon Sep 17 00:00:00 2001 From: Jaime Arteaga Date: Mon, 25 May 2020 21:15:05 -0700 Subject: [PATCH] Remove non-used parameters from appendLaunchKernelWithParams Change-Id: I13d033ffec74a639d308493cb3b399029de2c036 Signed-off: Jaime Arteaga --- level_zero/core/source/cmdlist/cmdlist_hw.h | 5 +++-- level_zero/core/source/cmdlist/cmdlist_hw.inl | 10 +++++----- level_zero/core/source/cmdlist/cmdlist_hw_base.inl | 8 +++++--- .../cmdlist/test_cmdlist_append_launch_kernel.cpp | 4 ++-- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index a53784dfb0..5977a93d3e 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -172,8 +172,9 @@ struct CommandListCoreFamily : CommandListImp { ze_result_t appendLaunchKernelWithParams(ze_kernel_handle_t hKernel, const ze_group_count_t *pThreadGroupDimensions, - ze_event_handle_t hEvent, uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents, bool isIndirect, bool isPredicate); + ze_event_handle_t hEvent, + bool isIndirect, + bool isPredicate); ze_result_t prepareIndirectParams(const ze_group_count_t *pThreadGroupDimensions); diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index f05f5ca1d8..213e9191fe 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -92,8 +92,8 @@ ze_result_t CommandListCoreFamily::appendLaunchKernel(ze_kernel_h return ZE_RESULT_ERROR_INVALID_ARGUMENT; } - ze_result_t ret = appendLaunchKernelWithParams(hKernel, pThreadGroupDimensions, hEvent, - numWaitEvents, phWaitEvents, false, false); + ze_result_t ret = appendLaunchKernelWithParams(hKernel, pThreadGroupDimensions, + hEvent, false, false); if (ret != ZE_RESULT_SUCCESS) { return ret; } @@ -123,7 +123,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelIndirect(ze_ } ze_result_t ret = appendLaunchKernelWithParams(hKernel, pDispatchArgumentsBuffer, - nullptr, 0, nullptr, true, false); + nullptr, true, false); if (hEvent) { appendSignalEventPostWalker(hEvent); @@ -154,7 +154,7 @@ ze_result_t CommandListCoreFamily::appendLaunchMultipleKernelsInd auto ret = appendLaunchKernelWithParams(phKernels[i], haveLaunchArguments ? &pLaunchArgumentsBuffer[i] : nullptr, - nullptr, 0, nullptr, true, true); + nullptr, true, true); if (ret != ZE_RESULT_SUCCESS) { return ret; } @@ -709,7 +709,7 @@ ze_result_t CommandListCoreFamily::appendPageFaultCopy(NEO::Graph ze_group_count_t dispatchFuncArgs{groups, 1u, 1u}; ze_result_t ret = appendLaunchKernelWithParams(builtinFunction->toHandle(), &dispatchFuncArgs, - nullptr, 0, nullptr, false, false); + nullptr, false, false); if (ret != ZE_RESULT_SUCCESS) { return ret; } diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl index 47e2909edb..b568ef528b 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_base.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_base.inl @@ -26,12 +26,14 @@ struct DeviceImp; template ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(ze_kernel_handle_t hKernel, const ze_group_count_t *pThreadGroupDimensions, - ze_event_handle_t hEvent, uint32_t numWaitEvents, - ze_event_handle_t *phWaitEvents, bool isIndirect, bool isPredicate) { + ze_event_handle_t hEvent, + bool isIndirect, + bool isPredicate) { const auto kernel = Kernel::fromHandle(hKernel); UNRECOVERABLE_IF(kernel == nullptr); const auto functionImmutableData = kernel->getImmutableData(); - commandListPerThreadScratchSize = std::max(commandListPerThreadScratchSize, kernel->getImmutableData()->getDescriptor().kernelAttributes.perThreadScratchSize[0]); + commandListPerThreadScratchSize = std::max(commandListPerThreadScratchSize, + kernel->getImmutableData()->getDescriptor().kernelAttributes.perThreadScratchSize[0]); auto kernelPreemptionMode = obtainFunctionPreemptionMode(kernel); commandListPreemptionMode = std::min(commandListPreemptionMode, kernelPreemptionMode); diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel.cpp index d23f83932f..4c422bb348 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_append_launch_kernel.cpp @@ -151,7 +151,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, WhenAppendingFunctionThenUsedCmdBufferS auto sizeBefore = commandList->commandContainer.getCommandStream()->getUsed(); - auto result = commandList->appendLaunchKernelWithParams(kernel->toHandle(), &groupCount, nullptr, 0, nullptr, false, false); + auto result = commandList->appendLaunchKernelWithParams(kernel->toHandle(), &groupCount, nullptr, false, false); ASSERT_EQ(ZE_RESULT_SUCCESS, result); auto sizeAfter = commandList->commandContainer.getCommandStream()->getUsed(); @@ -161,7 +161,7 @@ HWTEST2_F(CommandListAppendLaunchKernel, WhenAppendingFunctionThenUsedCmdBufferS sizeBefore = commandList->commandContainer.getCommandStream()->getUsed(); - result = commandList->appendLaunchKernelWithParams(kernel->toHandle(), &groupCount, nullptr, 0, nullptr, true, false); + result = commandList->appendLaunchKernelWithParams(kernel->toHandle(), &groupCount, nullptr, true, false); ASSERT_EQ(ZE_RESULT_SUCCESS, result); sizeAfter = commandList->commandContainer.getCommandStream()->getUsed();