From 68311588e6b2d73237c9398689901456c339310c Mon Sep 17 00:00:00 2001 From: Maciej Dziuban Date: Mon, 1 Apr 2019 10:10:01 +0200 Subject: [PATCH] Delete CommandQueue argument from dispatchScheduler Change-Id: Icbda4d6887d7f0001e3081aef1fa69edc1169782 Signed-off-by: Maciej Dziuban --- runtime/command_queue/enqueue_common.h | 1 - runtime/command_queue/gpgpu_walker.h | 1 - runtime/command_queue/gpgpu_walker_base.inl | 1 - runtime/device_queue/device_queue.cpp | 2 +- runtime/device_queue/device_queue.h | 2 +- runtime/device_queue/device_queue_hw.h | 2 +- runtime/device_queue/device_queue_hw.inl | 5 ++--- runtime/helpers/task_information.cpp | 1 - unit_tests/device_queue/device_queue_tests.cpp | 2 +- unit_tests/execution_model/scheduler_dispatch_tests.cpp | 3 --- .../execution_model/submit_blocked_parent_kernel_tests.cpp | 4 ++-- unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp | 1 - 12 files changed, 8 insertions(+), 17 deletions(-) diff --git a/runtime/command_queue/enqueue_common.h b/runtime/command_queue/enqueue_common.h index 4022c2bde4..296466762f 100644 --- a/runtime/command_queue/enqueue_common.h +++ b/runtime/command_queue/enqueue_common.h @@ -456,7 +456,6 @@ void CommandQueueHw::processDeviceEnqueue(Kernel *parentKernel, devQueueHw->getDebugQueue()); GpgpuWalkerHelper::dispatchScheduler( - *this, *this->commandStream, *devQueueHw, preemption, diff --git a/runtime/command_queue/gpgpu_walker.h b/runtime/command_queue/gpgpu_walker.h index 5cef3eda59..6fd62ba37b 100644 --- a/runtime/command_queue/gpgpu_walker.h +++ b/runtime/command_queue/gpgpu_walker.h @@ -195,7 +195,6 @@ class GpgpuWalkerHelper { TimestampPacket::WriteOperationType writeOperationType); static void dispatchScheduler( - CommandQueue &commandQueue, LinearStream &commandStream, DeviceQueueHw &devQueueHw, PreemptionMode preemptionMode, diff --git a/runtime/command_queue/gpgpu_walker_base.inl b/runtime/command_queue/gpgpu_walker_base.inl index 99750718e8..1e2f046dd8 100644 --- a/runtime/command_queue/gpgpu_walker_base.inl +++ b/runtime/command_queue/gpgpu_walker_base.inl @@ -52,7 +52,6 @@ inline size_t GpgpuWalkerHelper::setGpgpuWalkerThreadData( template void GpgpuWalkerHelper::dispatchScheduler( - CommandQueue &commandQueue, LinearStream &commandStream, DeviceQueueHw &devQueueHw, PreemptionMode preemptionMode, diff --git a/runtime/device_queue/device_queue.cpp b/runtime/device_queue/device_queue.cpp index dacf8209d9..000c136be6 100644 --- a/runtime/device_queue/device_queue.cpp +++ b/runtime/device_queue/device_queue.cpp @@ -161,7 +161,7 @@ void DeviceQueue::resetDeviceQueue() { return; } -void DeviceQueue::dispatchScheduler(CommandQueue &cmdQ, LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) { +void DeviceQueue::dispatchScheduler(LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) { return; } diff --git a/runtime/device_queue/device_queue.h b/runtime/device_queue/device_queue.h index a6f8af6394..6494cb67ca 100644 --- a/runtime/device_queue/device_queue.h +++ b/runtime/device_queue/device_queue.h @@ -80,7 +80,7 @@ class DeviceQueue : public BaseObject<_device_queue> { } virtual void resetDeviceQueue(); - virtual void dispatchScheduler(CommandQueue &cmdQ, LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh); + virtual void dispatchScheduler(LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh); virtual IndirectHeap *getIndirectHeap(IndirectHeap::Type type); void acquireEMCriticalSection() { diff --git a/runtime/device_queue/device_queue_hw.h b/runtime/device_queue/device_queue_hw.h index e24f78766e..7b71f67fb2 100644 --- a/runtime/device_queue/device_queue_hw.h +++ b/runtime/device_queue/device_queue_hw.h @@ -59,7 +59,7 @@ class DeviceQueueHw : public DeviceQueue { void addExecutionModelCleanUpSection(Kernel *parentKernel, TagNode *hwTimeStamp, uint32_t taskCount) override; void resetDeviceQueue() override; - void dispatchScheduler(CommandQueue &cmdQ, LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) override; + void dispatchScheduler(LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) override; uint32_t getSchedulerReturnInstance() { return igilQueue->m_controls.m_SchedulerEarlyReturn; diff --git a/runtime/device_queue/device_queue_hw.inl b/runtime/device_queue/device_queue_hw.inl index f7eeea0d6a..f7e90f477c 100644 --- a/runtime/device_queue/device_queue_hw.inl +++ b/runtime/device_queue/device_queue_hw.inl @@ -368,9 +368,8 @@ size_t DeviceQueueHw::setSchedulerCrossThreadData(SchedulerKernel &sc } template -void DeviceQueueHw::dispatchScheduler(CommandQueue &cmdQ, LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) { - GpgpuWalkerHelper::dispatchScheduler(cmdQ, - commandStream, +void DeviceQueueHw::dispatchScheduler(LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) { + GpgpuWalkerHelper::dispatchScheduler(commandStream, *this, preemptionMode, scheduler, diff --git a/runtime/helpers/task_information.cpp b/runtime/helpers/task_information.cpp index 887a3a046f..57707ec6a5 100644 --- a/runtime/helpers/task_information.cpp +++ b/runtime/helpers/task_information.cpp @@ -182,7 +182,6 @@ CompletionStamp &CommandComputeKernel::submit(uint32_t taskLevel, bool terminate devQueue->getDebugQueue()); devQueue->dispatchScheduler( - commandQueue, *kernelOperation->commandStream, scheduler, preemptionMode, diff --git a/unit_tests/device_queue/device_queue_tests.cpp b/unit_tests/device_queue/device_queue_tests.cpp index 8235fd3d23..e61fc65cd3 100644 --- a/unit_tests/device_queue/device_queue_tests.cpp +++ b/unit_tests/device_queue/device_queue_tests.cpp @@ -307,7 +307,7 @@ TEST_F(DeviceQueueTest, dispatchScheduler) { MockSchedulerKernel *kernel = new MockSchedulerKernel(&program, info, *device); LinearStream cmdStream; - devQueue.dispatchScheduler(cmdQ, cmdStream, *kernel, device->getPreemptionMode(), nullptr, nullptr); + devQueue.dispatchScheduler(cmdStream, *kernel, device->getPreemptionMode(), nullptr, nullptr); delete kernel; } diff --git a/unit_tests/execution_model/scheduler_dispatch_tests.cpp b/unit_tests/execution_model/scheduler_dispatch_tests.cpp index 874c213d4c..1458f035ba 100644 --- a/unit_tests/execution_model/scheduler_dispatch_tests.cpp +++ b/unit_tests/execution_model/scheduler_dispatch_tests.cpp @@ -59,7 +59,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchScheduler) { pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( - *pCmdQ, pCmdQ->getCS(0), *pDevQueueHw, pDevice->getPreemptionMode(), @@ -178,7 +177,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExecutionModelSchedulerFixture, dispatchSchedulerDoe pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( - *pCmdQ, pCmdQ->getCS(0), *pDevQueueHw, pDevice->getPreemptionMode(), @@ -212,7 +210,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ParentKernelCommandQueueFixture, dispatchSchedulerWi pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( - *pCmdQ, pCmdQ->getCS(0), mockDevQueue, device->getPreemptionMode(), diff --git a/unit_tests/execution_model/submit_blocked_parent_kernel_tests.cpp b/unit_tests/execution_model/submit_blocked_parent_kernel_tests.cpp index 23280a3823..c5b4937d5a 100644 --- a/unit_tests/execution_model/submit_blocked_parent_kernel_tests.cpp +++ b/unit_tests/execution_model/submit_blocked_parent_kernel_tests.cpp @@ -61,9 +61,9 @@ class MockDeviceQueueHwWithCriticalSectionRelease : public DeviceQueueHwtagForCpuAccess : nullptr; return BaseClass::addExecutionModelCleanUpSection(parentKernel, hwTimeStamp, taskCount); } - void dispatchScheduler(CommandQueue &cmdQ, LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) override { + void dispatchScheduler(LinearStream &commandStream, SchedulerKernel &scheduler, PreemptionMode preemptionMode, IndirectHeap *ssh, IndirectHeap *dsh) override { schedulerDispatched = true; - return BaseClass::dispatchScheduler(cmdQ, commandStream, scheduler, preemptionMode, ssh, dsh); + return BaseClass::dispatchScheduler(commandStream, scheduler, preemptionMode, ssh, dsh); } uint32_t criticalSectioncheckCounter = 0; diff --git a/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp b/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp index d2626b3f21..ab070d597a 100644 --- a/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp +++ b/unit_tests/gen8/scheduler_dispatch_tests_gen8.cpp @@ -37,7 +37,6 @@ BDWTEST_F(BdwSchedulerTest, givenCallToDispatchSchedulerWhenPipeControlWithCSSta pCmdQ->getIndirectHeap(IndirectHeap::SURFACE_STATE, minRequiredSizeForSchedulerSSH); GpgpuWalkerHelper::dispatchScheduler( - *pCmdQ, commandStream, *pDevQueueHw, pDevice->getPreemptionMode(),