From 50e22ef5e76c1d13e63877e64d1af3b3d71c77bf Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Mon, 24 Feb 2025 09:57:08 +0000 Subject: [PATCH] refactor: remove device enqueue specific code Signed-off-by: Mateusz Jablonski --- .../unit_test/device/device_caps_tests.cpp | 28 +++++-------------- shared/source/gen12lp/hw_info_adln.cpp | 1 - shared/source/gen12lp/hw_info_adlp.cpp | 1 - shared/source/gen12lp/hw_info_adls.cpp | 1 - shared/source/gen12lp/hw_info_dg1.cpp | 1 - shared/source/gen12lp/hw_info_rkl.cpp | 1 - shared/source/gen12lp/hw_info_tgllp.cpp | 1 - shared/source/helpers/hw_info.h | 2 -- shared/source/xe2_hpg_core/hw_info_bmg.cpp | 1 - shared/source/xe2_hpg_core/hw_info_lnl.cpp | 1 - shared/source/xe3_core/hw_info_ptl.cpp | 1 - shared/source/xe_hpc_core/hw_info_pvc.cpp | 1 - shared/source/xe_hpg_core/hw_info_arl.cpp | 1 - shared/source/xe_hpg_core/hw_info_dg2.cpp | 1 - shared/source/xe_hpg_core/hw_info_mtl.cpp | 1 - .../unit_test/device/neo_device_tests.cpp | 4 --- .../gen12lp/test_device_caps_gen12lp.inl | 6 +--- 17 files changed, 8 insertions(+), 45 deletions(-) diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index 5261b50301..1078566f29 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -108,9 +108,6 @@ struct DeviceGetCapsTest : public ::testing::Test { EXPECT_STREQ("__opencl_c_ext_fp16_local_atomic_min_max", (++openclCFeatureIterator)->name); } } - if (hwInfo.capabilityTable.supportsDeviceEnqueue) { - EXPECT_STREQ("__opencl_c_device_enqueue", (++openclCFeatureIterator)->name); - } if (hwInfo.capabilityTable.supportsPipes) { EXPECT_STREQ("__opencl_c_pipes", (++openclCFeatureIterator)->name); } @@ -1349,25 +1346,14 @@ TEST_F(DeviceGetCapsTest, givenOcl21DeviceWhenCheckingPipesSupportThenPipesAreSu TEST_F(DeviceGetCapsTest, givenCapsDeviceEnqueueWhenCheckingDeviceEnqueueSupportThenNoSupportReported) { auto hwInfo = *defaultHwInfo; - for (auto isDeviceEnqueueSupportedByHw : ::testing::Bool()) { - hwInfo.capabilityTable.supportsDeviceEnqueue = isDeviceEnqueueSupportedByHw; + auto pClDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(&hwInfo)); + auto &caps = pClDevice->getDeviceInfo(); - auto pClDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(&hwInfo)); - auto &caps = pClDevice->getDeviceInfo(); - - size_t deviceEnqueueFeaturesCount = 0; - for (auto &openclCFeature : caps.openclCFeatures) { - if (0 == strcmp(openclCFeature.name, "__opencl_c_device_enqueue")) { - deviceEnqueueFeaturesCount++; - } - } - EXPECT_EQ(0u, caps.maxOnDeviceEvents); - EXPECT_EQ(0u, caps.maxOnDeviceQueues); - EXPECT_EQ(0u, caps.queueOnDeviceMaxSize); - EXPECT_EQ(0u, caps.queueOnDevicePreferredSize); - EXPECT_EQ(static_cast(0), caps.queueOnDeviceProperties); - EXPECT_EQ(0u, deviceEnqueueFeaturesCount); - } + EXPECT_EQ(0u, caps.maxOnDeviceEvents); + EXPECT_EQ(0u, caps.maxOnDeviceQueues); + EXPECT_EQ(0u, caps.queueOnDeviceMaxSize); + EXPECT_EQ(0u, caps.queueOnDevicePreferredSize); + EXPECT_EQ(static_cast(0), caps.queueOnDeviceProperties); } TEST_F(DeviceGetCapsTest, givenPipeSupportForcedWhenCheckingPipeSupportThenPipeIsCorrectlyReported) { diff --git a/shared/source/gen12lp/hw_info_adln.cpp b/shared/source/gen12lp/hw_info_adln.cpp index 0ceca3c1f3..795f15830e 100644 --- a/shared/source/gen12lp/hw_info_adln.cpp +++ b/shared/source/gen12lp/hw_info_adln.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable ADLN::capabilityTable{ true, // ftr64KBpages false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/gen12lp/hw_info_adlp.cpp b/shared/source/gen12lp/hw_info_adlp.cpp index 2ea1f00099..87e1deeb34 100644 --- a/shared/source/gen12lp/hw_info_adlp.cpp +++ b/shared/source/gen12lp/hw_info_adlp.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable ADLP::capabilityTable{ true, // ftr64KBpages false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/gen12lp/hw_info_adls.cpp b/shared/source/gen12lp/hw_info_adls.cpp index f31af44fb1..ff525fed79 100644 --- a/shared/source/gen12lp/hw_info_adls.cpp +++ b/shared/source/gen12lp/hw_info_adls.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable ADLS::capabilityTable{ true, // ftr64KBpages false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/gen12lp/hw_info_dg1.cpp b/shared/source/gen12lp/hw_info_dg1.cpp index 8d07dff8ba..b532e60245 100644 --- a/shared/source/gen12lp/hw_info_dg1.cpp +++ b/shared/source/gen12lp/hw_info_dg1.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable DG1::capabilityTable{ true, // instrumentationEnabled true, // supportCacheFlushAfterWalker true, // supportsImages, - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/gen12lp/hw_info_rkl.cpp b/shared/source/gen12lp/hw_info_rkl.cpp index 1da567f26f..7444b0f5c3 100644 --- a/shared/source/gen12lp/hw_info_rkl.cpp +++ b/shared/source/gen12lp/hw_info_rkl.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable RKL::capabilityTable{ true, // instrumentationEnabled false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/gen12lp/hw_info_tgllp.cpp b/shared/source/gen12lp/hw_info_tgllp.cpp index 841e951aa6..2a68c782fd 100644 --- a/shared/source/gen12lp/hw_info_tgllp.cpp +++ b/shared/source/gen12lp/hw_info_tgllp.cpp @@ -63,7 +63,6 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ true, // ftr64KBpages false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index cae0269b12..5935f97128 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -50,7 +50,6 @@ struct RuntimeCapabilityTable { bool instrumentationEnabled; bool supportCacheFlushAfterWalker; bool supportsImages; - bool supportsDeviceEnqueue; bool supportsPipes; bool supportsOcl21Features; bool supportsOnDemandPageFaults; @@ -113,7 +112,6 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit result &= (lhs.deviceName == rhs.deviceName); result &= (lhs.supportCacheFlushAfterWalker == rhs.supportCacheFlushAfterWalker); result &= (lhs.supportsImages == rhs.supportsImages); - result &= (lhs.supportsDeviceEnqueue == rhs.supportsDeviceEnqueue); result &= (lhs.supportsPipes == rhs.supportsPipes); result &= (lhs.supportsOcl21Features == rhs.supportsOcl21Features); result &= (lhs.supportsOnDemandPageFaults == rhs.supportsOnDemandPageFaults); diff --git a/shared/source/xe2_hpg_core/hw_info_bmg.cpp b/shared/source/xe2_hpg_core/hw_info_bmg.cpp index 651ff2810c..df43775e9d 100644 --- a/shared/source/xe2_hpg_core/hw_info_bmg.cpp +++ b/shared/source/xe2_hpg_core/hw_info_bmg.cpp @@ -66,7 +66,6 @@ const RuntimeCapabilityTable BMG::capabilityTable{ true, // instrumentationEnabled false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features true, // supportsOnDemandPageFaults diff --git a/shared/source/xe2_hpg_core/hw_info_lnl.cpp b/shared/source/xe2_hpg_core/hw_info_lnl.cpp index 9b2874876d..25c0106e31 100644 --- a/shared/source/xe2_hpg_core/hw_info_lnl.cpp +++ b/shared/source/xe2_hpg_core/hw_info_lnl.cpp @@ -64,7 +64,6 @@ const RuntimeCapabilityTable LNL::capabilityTable{ true, // instrumentationEnabled false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features true, // supportsOnDemandPageFaults diff --git a/shared/source/xe3_core/hw_info_ptl.cpp b/shared/source/xe3_core/hw_info_ptl.cpp index 332eb91588..6dc8e86782 100644 --- a/shared/source/xe3_core/hw_info_ptl.cpp +++ b/shared/source/xe3_core/hw_info_ptl.cpp @@ -64,7 +64,6 @@ const RuntimeCapabilityTable PTL::capabilityTable{ true, // instrumentationEnabled false, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features true, // supportsOnDemandPageFaults diff --git a/shared/source/xe_hpc_core/hw_info_pvc.cpp b/shared/source/xe_hpc_core/hw_info_pvc.cpp index 0ceca4e5f6..7853024a11 100644 --- a/shared/source/xe_hpc_core/hw_info_pvc.cpp +++ b/shared/source/xe_hpc_core/hw_info_pvc.cpp @@ -76,7 +76,6 @@ const RuntimeCapabilityTable PVC::capabilityTable{ true, // instrumentationEnabled false, // supportCacheFlushAfterWalker false, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features true, // supportsOnDemandPageFaults diff --git a/shared/source/xe_hpg_core/hw_info_arl.cpp b/shared/source/xe_hpg_core/hw_info_arl.cpp index 89e3e65075..5c41f01723 100644 --- a/shared/source/xe_hpg_core/hw_info_arl.cpp +++ b/shared/source/xe_hpg_core/hw_info_arl.cpp @@ -61,7 +61,6 @@ const RuntimeCapabilityTable ARL::capabilityTable{ true, // instrumentationEnabled true, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/xe_hpg_core/hw_info_dg2.cpp b/shared/source/xe_hpg_core/hw_info_dg2.cpp index 35040db113..888289af70 100644 --- a/shared/source/xe_hpg_core/hw_info_dg2.cpp +++ b/shared/source/xe_hpg_core/hw_info_dg2.cpp @@ -66,7 +66,6 @@ const RuntimeCapabilityTable DG2::capabilityTable{ true, // instrumentationEnabled true, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index ce32437059..2152cbf9bb 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -62,7 +62,6 @@ const RuntimeCapabilityTable MTL::capabilityTable{ true, // instrumentationEnabled true, // supportCacheFlushAfterWalker true, // supportsImages - false, // supportsDeviceEnqueue false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults diff --git a/shared/test/unit_test/device/neo_device_tests.cpp b/shared/test/unit_test/device/neo_device_tests.cpp index 388b3f5198..7c02a5dcd6 100644 --- a/shared/test/unit_test/device/neo_device_tests.cpp +++ b/shared/test/unit_test/device/neo_device_tests.cpp @@ -1229,10 +1229,6 @@ HWTEST2_F(DeviceTests, givenHwInfoWhenSlmSizeIsRequiredThenReturnCorrectValue, I EXPECT_EQ(64u, defaultHwInfo->capabilityTable.slmSize); } -HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenXeHPAndLaterProductWhenCheckingDeviceEnqueueSupportThenFalseIsReturned) { - EXPECT_FALSE(defaultHwInfo->capabilityTable.supportsDeviceEnqueue); -} - HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTests, givenXeHPAndLaterProductWhenCheckingPipesSupportThenFalseIsReturned) { EXPECT_FALSE(defaultHwInfo->capabilityTable.supportsPipes); } diff --git a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl index 1473865e26..fad15f3be4 100644 --- a/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl +++ b/shared/test/unit_test/gen12lp/test_device_caps_gen12lp.inl @@ -1,5 +1,5 @@ /* - * Copyright (C) 2019-2024 Intel Corporation + * Copyright (C) 2019-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -68,10 +68,6 @@ HWTEST2_F(Gen12LpDeviceCaps, givenTglLpWhenCheckSupportCacheFlushAfterWalkerThen EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportCacheFlushAfterWalker); } -GEN12LPTEST_F(Gen12LpDeviceCaps, givenGen12LpDeviceWhenCheckingDeviceEnqueueSupportThenFalseIsReturned) { - EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsDeviceEnqueue); -} - GEN12LPTEST_F(Gen12LpDeviceCaps, givenGen12LpDeviceWhenCheckingPipesSupportThenFalseIsReturned) { EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.supportsPipes); }