From 689f674194efd74a35badc92355afbabe853e947 Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Thu, 18 Jul 2019 16:14:41 +0200 Subject: [PATCH] Remove not used code Change-Id: I0a0e58ad4a521a4a337180aca66e65ed328692cc Signed-off-by: Dunajski, Bartosz --- runtime/command_queue/gpgpu_walker.h | 10 +++---- .../scheduler_dispatch_tests.cpp | 15 ++++++++--- .../gen8/scheduler_dispatch_tests_gen8.cpp | 5 +++- unit_tests/profiling/profiling_tests.cpp | 26 ++++++++++++++----- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/runtime/command_queue/gpgpu_walker.h b/runtime/command_queue/gpgpu_walker.h index 312bff2abb..7785d0fc0d 100644 --- a/runtime/command_queue/gpgpu_walker.h +++ b/runtime/command_queue/gpgpu_walker.h @@ -190,13 +190,9 @@ struct EnqueueOperation { }; template -LinearStream &getCommandStream(CommandQueue &commandQueue, bool reserveProfilingCmdsSpace, bool reservePerfCounterCmdsSpace, const Kernel *pKernel) { - auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(eventType, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, commandQueue, pKernel); - return commandQueue.getCS(expectedSizeCS); -} - -template -LinearStream &getCommandStream(CommandQueue &commandQueue, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, bool reservePerfCounterCmdsSpace, bool blitEnqueue, const MultiDispatchInfo &multiDispatchInfo, Surface **surfaces, size_t numSurfaces) { +LinearStream &getCommandStream(CommandQueue &commandQueue, const CsrDependencies &csrDeps, bool reserveProfilingCmdsSpace, + bool reservePerfCounterCmdsSpace, bool blitEnqueue, const MultiDispatchInfo &multiDispatchInfo, + Surface **surfaces, size_t numSurfaces) { size_t expectedSizeCS = EnqueueOperation::getTotalSizeRequiredCS(eventType, csrDeps, reserveProfilingCmdsSpace, reservePerfCounterCmdsSpace, blitEnqueue, commandQueue, multiDispatchInfo); return commandQueue.getCS(expectedSizeCS); } diff --git a/unit_tests/execution_model/scheduler_dispatch_tests.cpp b/unit_tests/execution_model/scheduler_dispatch_tests.cpp index edf51c08ea..771d5c325d 100644 --- a/unit_tests/execution_model/scheduler_dispatch_tests.cpp +++ b/unit_tests/execution_model/scheduler_dispatch_tests.cpp @@ -55,7 +55,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) { size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel); // Setup heaps in pCmdQ - LinearStream &commandStream = getCommandStream(*pCmdQ, false, false, &scheduler); + MultiDispatchInfo multiDispatchinfo(&scheduler); + LinearStream &commandStream = getCommandStream(*pCmdQ, CsrDependencies(), + false, false, false, multiDispatchinfo, + nullptr, 0); pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( @@ -173,7 +176,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel); // Setup heaps in pCmdQ - getCommandStream(*pCmdQ, false, false, &scheduler); + + MultiDispatchInfo multiDispatchinfo(&scheduler); + getCommandStream(*pCmdQ, CsrDependencies(), false, false, false, multiDispatchinfo, + nullptr, 0); pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( @@ -206,7 +212,10 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWi size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper::getSizeRequiredSSH(scheduler); // Setup heaps in pCmdQ - LinearStream &commandStream = getCommandStream(*pCmdQ, false, false, &scheduler); + MultiDispatchInfo multiDispatchinfo(&scheduler); + LinearStream &commandStream = getCommandStream(*pCmdQ, CsrDependencies(), + false, false, false, multiDispatchinfo, + nullptr, 0); pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( diff --git a/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp b/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp index da497244b7..b754b238d9 100644 --- a/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp +++ b/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp @@ -33,7 +33,10 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta size_t minRequiredSizeForSchedulerSSH = HardwareCommandsHelper::getSizeRequiredForExecutionModel(IndirectHeap::SURFACE_STATE, *parentKernel); // Setup heaps in pCmdQ - LinearStream &commandStream = getCommandStream(*pCmdQ, false, false, &scheduler); + MultiDispatchInfo multiDispatchinfo(&scheduler); + LinearStream &commandStream = getCommandStream(*pCmdQ, CsrDependencies(), + false, false, false, multiDispatchinfo, + nullptr, 0); pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( diff --git a/unit_tests/profiling/profiling_tests.cpp b/unit_tests/profiling/profiling_tests.cpp index 4286a0e4fc..3b0f29c236 100644 --- a/unit_tests/profiling/profiling_tests.cpp +++ b/unit_tests/profiling/profiling_tests.cpp @@ -84,12 +84,15 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GIVENCommandQueueWithProfilingAndFor uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 2 * sizeof(MI_STORE_REGISTER_MEM) + sizeof(GPGPU_WALKER) + HardwareCommandsHelper::getSizeRequiredCS(&kernel); - auto &commandStreamNDRangeKernel = getCommandStream(*pCmdQ, true, false, &kernel); + MultiDispatchInfo multiDispatchInfo(&kernel); + auto &commandStreamNDRangeKernel = getCommandStream(*pCmdQ, CsrDependencies(), true, false, false, + multiDispatchInfo, nullptr, 0); auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_NDRANGE_KERNEL, true, false, *pCmdQ, &kernel); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamNDRangeKernel.getAvailableSpace(), requiredSize); - auto &commandStreamTask = getCommandStream(*pCmdQ, true, false, &kernel); + auto &commandStreamTask = getCommandStream(*pCmdQ, CsrDependencies(), true, false, false, + multiDispatchInfo, nullptr, 0); expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_TASK, true, false, *pCmdQ, &kernel); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamTask.getAvailableSpace(), requiredSize); @@ -102,12 +105,16 @@ HWTEST_F(ProfilingTests, GIVENCommandQueueWithProfilingAndForWorkloadWithNoKerne uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM); - auto &commandStreamMigrateMemObjects = getCommandStream(*pCmdQ, true, false, nullptr); + MultiDispatchInfo multiDispatchInfo(nullptr); + auto &commandStreamMigrateMemObjects = getCommandStream(*pCmdQ, CsrDependencies(), + true, false, false, + multiDispatchInfo, nullptr, 0); auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, false, *pCmdQ, nullptr); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize); - auto &commandStreamMarker = getCommandStream(*pCmdQ, true, false, nullptr); + auto &commandStreamMarker = getCommandStream(*pCmdQ, CsrDependencies(), true, + false, false, multiDispatchInfo, nullptr, 0); expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_MARKER, true, false, *pCmdQ, nullptr); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize); @@ -128,7 +135,8 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ProfilingTests, GIVENCommandQueueWithProfilingAndFor MultiDispatchInfo multiDispatchInfo; multiDispatchInfo.push(dispatchInfo); multiDispatchInfo.push(dispatchInfo); - auto &commandStreamTask = getCommandStream(*pCmdQ, true, false, &kernel); + auto &commandStreamTask = getCommandStream(*pCmdQ, CsrDependencies(), true, false, false, + multiDispatchInfo, nullptr, 0); auto expectedSizeCS = EnqueueOperation::getTotalSizeRequiredCS(CL_COMMAND_TASK, CsrDependencies(), true, false, false, *pCmdQ, multiDispatchInfo); EXPECT_GE(expectedSizeCS, requiredSize); @@ -550,12 +558,16 @@ HWTEST_F(ProfilingWithPerfCountersTests, uint64_t requiredSize = 2 * sizeof(PIPE_CONTROL) + 4 * sizeof(MI_STORE_REGISTER_MEM); - auto &commandStreamMigrateMemObjects = getCommandStream(*pCmdQ, true, true, nullptr); + MultiDispatchInfo multiDispatchInfo(nullptr); + auto &commandStreamMigrateMemObjects = getCommandStream(*pCmdQ, CsrDependencies(), + true, true, false, multiDispatchInfo, + nullptr, 0); auto expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_MIGRATE_MEM_OBJECTS, true, true, *pCmdQ, nullptr); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamMigrateMemObjects.getAvailableSpace(), requiredSize); - auto &commandStreamMarker = getCommandStream(*pCmdQ, true, true, nullptr); + auto &commandStreamMarker = getCommandStream(*pCmdQ, CsrDependencies(), true, true, false, + multiDispatchInfo, nullptr, 0); expectedSizeCS = EnqueueOperation::getSizeRequiredCS(CL_COMMAND_MARKER, true, true, *pCmdQ, nullptr); EXPECT_GE(expectedSizeCS, requiredSize); EXPECT_GE(commandStreamMarker.getAvailableSpace(), requiredSize);