diff --git a/core/helpers/timestamp_packet.h b/core/helpers/timestamp_packet.h index 4be73e9638..5e4289dc66 100644 --- a/core/helpers/timestamp_packet.h +++ b/core/helpers/timestamp_packet.h @@ -12,7 +12,6 @@ #include "core/helpers/aux_translation.h" #include "core/helpers/non_copyable_or_moveable.h" #include "core/utilities/tag_allocator.h" -#include "runtime/helpers/properties_helper.h" #include #include @@ -148,8 +147,8 @@ struct TimestampPacketHelper { } template - static size_t getRequiredCmdStreamSizeForAuxTranslationNodeDependency(const MemObjsForAuxTranslation *memObjsForAuxTranslation) { - return memObjsForAuxTranslation->size() * TimestampPacketHelper::getRequiredCmdStreamSizeForNodeDependencyWithBlitEnqueue(); + static size_t getRequiredCmdStreamSizeForAuxTranslationNodeDependency(size_t count) { + return count * TimestampPacketHelper::getRequiredCmdStreamSizeForNodeDependencyWithBlitEnqueue(); } template diff --git a/runtime/built_ins/aux_translation_builtin.h b/runtime/built_ins/aux_translation_builtin.h index 7637a077d2..4cad573158 100644 --- a/runtime/built_ins/aux_translation_builtin.h +++ b/runtime/built_ins/aux_translation_builtin.h @@ -68,7 +68,7 @@ class BuiltInOp : public BuiltinDispatchInfoBuilder } template - static size_t getSizeForSinglePipeControl(const MemObjsForAuxTranslation *) { + static size_t getSizeForSinglePipeControl(size_t) { return MemorySynchronizationCommands::getSizeForSinglePipeControl(); } diff --git a/runtime/command_queue/gpgpu_walker_base.inl b/runtime/command_queue/gpgpu_walker_base.inl index 2307e25f10..fc7c489771 100644 --- a/runtime/command_queue/gpgpu_walker_base.inl +++ b/runtime/command_queue/gpgpu_walker_base.inl @@ -206,8 +206,9 @@ size_t EnqueueOperation::getTotalSizeRequiredCS(uint32_t eventType, c Kernel *parentKernel = multiDispatchInfo.peekParentKernel(); for (auto &dispatchInfo : multiDispatchInfo) { expectedSizeCS += EnqueueOperation::getSizeRequiredCS(eventType, reserveProfilingCmdsSpace, reservePerfCounters, commandQueue, dispatchInfo.getKernel()); - expectedSizeCS += dispatchInfo.dispatchInitCommands.estimateCommandsSize(multiDispatchInfo.getMemObjsForAuxTranslation()); - expectedSizeCS += dispatchInfo.dispatchEpilogueCommands.estimateCommandsSize(multiDispatchInfo.getMemObjsForAuxTranslation()); + size_t memObjAuxCount = multiDispatchInfo.getMemObjsForAuxTranslation() != nullptr ? multiDispatchInfo.getMemObjsForAuxTranslation()->size() : 0; + expectedSizeCS += dispatchInfo.dispatchInitCommands.estimateCommandsSize(memObjAuxCount); + expectedSizeCS += dispatchInfo.dispatchEpilogueCommands.estimateCommandsSize(memObjAuxCount); } if (parentKernel) { SchedulerKernel &scheduler = commandQueue.getContext().getSchedulerKernel(); diff --git a/runtime/helpers/dispatch_info.h b/runtime/helpers/dispatch_info.h index 22b497ee34..017f8b2143 100644 --- a/runtime/helpers/dispatch_info.h +++ b/runtime/helpers/dispatch_info.h @@ -26,7 +26,7 @@ class DispatchInfo { public: using DispatchCommandMethodT = void(LinearStream &commandStream, TimestampPacketDependencies *timestampPacketDependencies); - using EstimateCommandsMethodT = size_t(const MemObjsForAuxTranslation *); + using EstimateCommandsMethodT = size_t(size_t); DispatchInfo() = default; DispatchInfo(Kernel *kernel, uint32_t dim, Vec3 gws, Vec3 elws, Vec3 offset) diff --git a/unit_tests/command_queue/blit_enqueue_tests.cpp b/unit_tests/command_queue/blit_enqueue_tests.cpp index dd0b17ff72..588d9878a8 100644 --- a/unit_tests/command_queue/blit_enqueue_tests.cpp +++ b/unit_tests/command_queue/blit_enqueue_tests.cpp @@ -507,11 +507,11 @@ HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitAuxTranslationWhenDispatchi EXPECT_NE(firstDispatchInfo, lastDispatchInfo); // walker split - EXPECT_EQ(dependencySize, firstDispatchInfo->dispatchInitCommands.estimateCommandsSize(&memObjects)); - EXPECT_EQ(0u, firstDispatchInfo->dispatchEpilogueCommands.estimateCommandsSize(&memObjects)); + EXPECT_EQ(dependencySize, firstDispatchInfo->dispatchInitCommands.estimateCommandsSize(memObjects.size())); + EXPECT_EQ(0u, firstDispatchInfo->dispatchEpilogueCommands.estimateCommandsSize(memObjects.size())); - EXPECT_EQ(0u, lastDispatchInfo->dispatchInitCommands.estimateCommandsSize(&memObjects)); - EXPECT_EQ(dependencySize, lastDispatchInfo->dispatchEpilogueCommands.estimateCommandsSize(&memObjects)); + EXPECT_EQ(0u, lastDispatchInfo->dispatchInitCommands.estimateCommandsSize(memObjects.size())); + EXPECT_EQ(dependencySize, lastDispatchInfo->dispatchEpilogueCommands.estimateCommandsSize(memObjects.size())); } HWTEST_TEMPLATED_F(BlitAuxTranslationTests, givenBlitTranslationWhenConstructingBlockedCommandBufferThenSynchronizeBarrier) {