From 28acc2c8f6e0e9aa858ad4f67598af4cfeebe25a Mon Sep 17 00:00:00 2001 From: Bartosz Dunajski Date: Mon, 28 Sep 2020 13:33:46 +0200 Subject: [PATCH] Remove lowPriorityEngineType member Change-Id: I39908addf1c3a12f7807479132d0a6d5a4398d7b Signed-off-by: Bartosz Dunajski --- opencl/source/command_queue/command_queue_hw.h | 2 +- .../api/cl_create_command_queue_with_properties_tests.cpp | 4 ++-- opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp | 2 +- opencl/test/unit_test/command_queue/command_queue_tests.cpp | 2 +- opencl/test/unit_test/helpers/hw_helper_default_tests.cpp | 5 ----- opencl/test/unit_test/helpers/timestamp_packet_tests.cpp | 2 +- opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp | 2 +- shared/source/helpers/hw_helper.h | 2 -- shared/source/helpers/hw_helper_base.inl | 3 --- 9 files changed, 7 insertions(+), 17 deletions(-) diff --git a/opencl/source/command_queue/command_queue_hw.h b/opencl/source/command_queue/command_queue_hw.h index 96df8de4d1..8a7ad22f12 100644 --- a/opencl/source/command_queue/command_queue_hw.h +++ b/opencl/source/command_queue/command_queue_hw.h @@ -42,7 +42,7 @@ class CommandQueueHw : public CommandQueue { if (clPriority & static_cast(CL_QUEUE_PRIORITY_LOW_KHR)) { priority = QueuePriority::LOW; - this->gpgpuEngine = &device->getDeviceById(0)->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + this->gpgpuEngine = &device->getDeviceById(0)->getEngine(getChosenEngineType(device->getHardwareInfo()), true, false); } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_MED_KHR)) { priority = QueuePriority::MEDIUM; } else if (clPriority & static_cast(CL_QUEUE_PRIORITY_HIGH_KHR)) { diff --git a/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp b/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp index e401a97349..daf448e528 100644 --- a/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp +++ b/opencl/test/unit_test/api/cl_create_command_queue_with_properties_tests.cpp @@ -409,7 +409,7 @@ HWTEST_F(clCreateCommandQueueWithPropertiesApi, GivenLowPriorityWhenCreatingComm auto commandQueueObj = castToObject(cmdQ); auto &osContext = commandQueueObj->getGpgpuCommandStreamReceiver().getOsContext(); - EXPECT_EQ(HwHelperHw::lowPriorityEngineType, osContext.getEngineType()); + EXPECT_EQ(getChosenEngineType(pDevice->getHardwareInfo()), osContext.getEngineType()); EXPECT_TRUE(osContext.isLowPriority()); clReleaseCommandQueue(cmdQ); @@ -494,7 +494,7 @@ HWTEST_F(LowPriorityCommandQueueTest, GivenDeviceWithSubdevicesWhenCreatingLowPr auto commandQueueObj = castToObject(cmdQ); auto subDevice = context.getDevice(0)->getDeviceById(0); - auto engine = subDevice->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + auto engine = subDevice->getEngine(getChosenEngineType(subDevice->getHardwareInfo()), true, false); EXPECT_EQ(engine.commandStreamReceiver, &commandQueueObj->getGpgpuCommandStreamReceiver()); EXPECT_EQ(engine.osContext, &commandQueueObj->getGpgpuCommandStreamReceiver().getOsContext()); diff --git a/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp b/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp index 16caf6ac37..75e3371abd 100644 --- a/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp +++ b/opencl/test/unit_test/command_queue/blit_enqueue_tests.cpp @@ -82,7 +82,7 @@ struct BlitEnqueueTests : public ::testing::Test { capabilityTable.blitterOperationsSupported = true; if (createBcsEngine) { - auto &engine = device->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + auto &engine = device->getEngine(getChosenEngineType(device->getHardwareInfo()), true, false); bcsOsContext.reset(OsContext::create(nullptr, 1, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false)); engine.osContext = bcsOsContext.get(); diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index c4c5aeb859..432a4c3e5f 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -241,7 +241,7 @@ HWTEST_P(CommandQueueWithBlitOperationsTests, givenDeviceWithSubDevicesSupportin auto subDevice = device->getDeviceById(0); if (createBcsEngine) { - auto &engine = subDevice->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + auto &engine = subDevice->getEngine(getChosenEngineType(subDevice->getHardwareInfo()), true, false); bcsOsContext.reset(OsContext::create(nullptr, 1, 0, aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false)); engine.osContext = bcsOsContext.get(); diff --git a/opencl/test/unit_test/helpers/hw_helper_default_tests.cpp b/opencl/test/unit_test/helpers/hw_helper_default_tests.cpp index 36a5ec0fe9..9885360ae5 100644 --- a/opencl/test/unit_test/helpers/hw_helper_default_tests.cpp +++ b/opencl/test/unit_test/helpers/hw_helper_default_tests.cpp @@ -24,11 +24,6 @@ HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAskedForHvAlign4Requi EXPECT_TRUE(hwHelper.hvAlign4Required()); } -HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenAskedForLowPriorityEngineTypeThenReturnRcs) { - auto hwHelperEngineType = HwHelperHw::lowPriorityEngineType; - EXPECT_EQ(aub_stream::EngineType::ENGINE_RCS, hwHelperEngineType); -} - HWCMDTEST_F(IGFX_GEN8_CORE, HwHelperTest, givenHwHelperWhenGettingBindlessSurfaceExtendedMessageDescriptorValueThenCorrectValueIsReturned) { auto &hwHelper = HwHelper::get(pDevice->getHardwareInfo().platform.eRenderCoreFamily); auto value = hwHelper.getBindlessSurfaceExtendedMessageDescriptorValue(0x200); diff --git a/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp b/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp index 19eb2a334c..4ca9296d07 100644 --- a/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp +++ b/opencl/test/unit_test/helpers/timestamp_packet_tests.cpp @@ -1639,7 +1639,7 @@ HWTEST_F(TimestampPacketTests, givenBlockedEnqueueWithoutKernelWhenSubmittingThe auto cmdQ0 = clUniquePtr(new MockCommandQueueHw(context, device.get(), nullptr)); - auto &secondEngine = device->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + auto &secondEngine = device->getEngine(getChosenEngineType(device->getHardwareInfo()), true, false); static_cast *>(secondEngine.commandStreamReceiver)->timestampPacketWriteEnabled = true; auto cmdQ1 = clUniquePtr(new MockCommandQueueHw(context, device.get(), nullptr)); diff --git a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp index fac1390359..65a938c7f8 100644 --- a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp @@ -99,7 +99,7 @@ struct BcsBufferTests : public ::testing::Test { capabilityTable.blitterOperationsSupported = true; if (createBcsEngine) { - auto &engine = device->getEngine(HwHelperHw::lowPriorityEngineType, true, false); + auto &engine = device->getEngine(getChosenEngineType(device->getHardwareInfo()), true, false); bcsOsContext.reset(OsContext::create(nullptr, 1, device->getDeviceBitfield(), aub_stream::ENGINE_BCS, PreemptionMode::Disabled, false, false, false)); engine.osContext = bcsOsContext.get(); diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index f9a58097c5..35e96af04d 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -145,8 +145,6 @@ class HwHelperHw : public HwHelper { return hwHelper; } - static const aub_stream::EngineType lowPriorityEngineType; - uint32_t getBindingTableStateSurfaceStatePointer(const void *pBindingTable, uint32_t index) override { using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE; diff --git a/shared/source/helpers/hw_helper_base.inl b/shared/source/helpers/hw_helper_base.inl index 4a0de50175..67ccbcedf3 100644 --- a/shared/source/helpers/hw_helper_base.inl +++ b/shared/source/helpers/hw_helper_base.inl @@ -26,9 +26,6 @@ namespace NEO { -template -const aub_stream::EngineType HwHelperHw::lowPriorityEngineType = aub_stream::EngineType::ENGINE_RCS; - template const AuxTranslationMode HwHelperHw::defaultAuxTranslationMode = AuxTranslationMode::Builtin;