diff --git a/opencl/source/cl_device/cl_device_caps.cpp b/opencl/source/cl_device/cl_device_caps.cpp index cf77cc65c7..1c67fc098b 100644 --- a/opencl/source/cl_device/cl_device_caps.cpp +++ b/opencl/source/cl_device/cl_device_caps.cpp @@ -122,13 +122,12 @@ void ClDevice::initializeCaps() { auto supportsVme = hwInfo.capabilityTable.supportsVme; auto supportsAdvancedVme = hwInfo.capabilityTable.supportsVme; - deviceInfo.independentForwardProgress = false; + deviceInfo.independentForwardProgress = hwInfo.capabilityTable.supportsIndependentForwardProgress; deviceInfo.ilsWithVersion[0].name[0] = 0; deviceInfo.ilsWithVersion[0].version = 0; if (ocl21FeaturesEnabled) { - if (hwHelper.isIndependentForwardProgressSupported()) { - deviceInfo.independentForwardProgress = true; + if (deviceInfo.independentForwardProgress) { deviceExtensions += "cl_khr_subgroups "; } @@ -466,7 +465,7 @@ void ClDevice::initializeOpenclCFeatures() { strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_work_group_collective_functions"); deviceInfo.openclCFeatures.push_back(openClCFeature); - if (deviceInfo.independentForwardProgress) { + if (hwInfo.capabilityTable.supportsIndependentForwardProgress) { strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_subgroups"); deviceInfo.openclCFeatures.push_back(openClCFeature); } diff --git a/opencl/source/gen11/hw_info_ehl.inl b/opencl/source/gen11/hw_info_ehl.inl index aee367e758..d00a904b38 100644 --- a/opencl/source/gen11/hw_info_ehl.inl +++ b/opencl/source/gen11/hw_info_ehl.inl @@ -73,6 +73,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{ false, // supportsPipes false, // supportsOcl21Features false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled false // levelZeroSupported }; diff --git a/opencl/source/gen11/hw_info_icllp.inl b/opencl/source/gen11/hw_info_icllp.inl index 200e853797..5065438cc2 100644 --- a/opencl/source/gen11/hw_info_icllp.inl +++ b/opencl/source/gen11/hw_info_icllp.inl @@ -74,6 +74,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{ true, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled true // levelZeroSupported }; diff --git a/opencl/source/gen11/hw_info_lkf.inl b/opencl/source/gen11/hw_info_lkf.inl index 2065931428..6bd75925d9 100644 --- a/opencl/source/gen11/hw_info_lkf.inl +++ b/opencl/source/gen11/hw_info_lkf.inl @@ -73,6 +73,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{ false, // supportsPipes false, // supportsOcl21Features false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled false // levelZeroSupported }; diff --git a/opencl/source/gen12lp/hw_info_tgllp.inl b/opencl/source/gen12lp/hw_info_tgllp.inl index f1cf153a61..4022a37764 100644 --- a/opencl/source/gen12lp/hw_info_tgllp.inl +++ b/opencl/source/gen12lp/hw_info_tgllp.inl @@ -75,6 +75,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{ false, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress false, // hostPtrTrackingEnabled true // levelZeroSupported }; diff --git a/opencl/source/gen8/hw_info_bdw.inl b/opencl/source/gen8/hw_info_bdw.inl index 6271bedafc..c01e7633ed 100644 --- a/opencl/source/gen8/hw_info_bdw.inl +++ b/opencl/source/gen8/hw_info_bdw.inl @@ -78,6 +78,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{ true, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled false // levelZeroSupported }; diff --git a/opencl/source/gen9/hw_info_bxt.inl b/opencl/source/gen9/hw_info_bxt.inl index dadc6847f2..2a1bd48fb5 100644 --- a/opencl/source/gen9/hw_info_bxt.inl +++ b/opencl/source/gen9/hw_info_bxt.inl @@ -75,6 +75,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{ false, // supportsPipes false, // supportsOcl21Features false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled false // levelZeroSupported }; diff --git a/opencl/source/gen9/hw_info_cfl.inl b/opencl/source/gen9/hw_info_cfl.inl index bbca64f6e7..3b3f13c850 100644 --- a/opencl/source/gen9/hw_info_cfl.inl +++ b/opencl/source/gen9/hw_info_cfl.inl @@ -70,6 +70,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{ true, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled true // levelZeroSupported }; diff --git a/opencl/source/gen9/hw_info_glk.inl b/opencl/source/gen9/hw_info_glk.inl index 80a6e8bfb2..457c82a879 100644 --- a/opencl/source/gen9/hw_info_glk.inl +++ b/opencl/source/gen9/hw_info_glk.inl @@ -70,6 +70,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{ false, // supportsPipes false, // supportsOcl21Features false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled false // levelZeroSupported }; diff --git a/opencl/source/gen9/hw_info_kbl.inl b/opencl/source/gen9/hw_info_kbl.inl index 6822a07158..870d44b42d 100644 --- a/opencl/source/gen9/hw_info_kbl.inl +++ b/opencl/source/gen9/hw_info_kbl.inl @@ -70,6 +70,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{ true, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled true // levelZeroSupported }; diff --git a/opencl/source/gen9/hw_info_skl.inl b/opencl/source/gen9/hw_info_skl.inl index 605b840af3..e968b8b245 100644 --- a/opencl/source/gen9/hw_info_skl.inl +++ b/opencl/source/gen9/hw_info_skl.inl @@ -78,6 +78,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{ true, // supportsPipes true, // supportsOcl21Features false, // supportsOnDemandPageFaults + true, // supportsIndependentForwardProgress true, // hostPtrTrackingEnabled true // levelZeroSupported }; diff --git a/opencl/test/unit_test/device/device_caps_tests.cpp b/opencl/test/unit_test/device/device_caps_tests.cpp index f4da59be1d..4bea9e0370 100644 --- a/opencl/test/unit_test/device/device_caps_tests.cpp +++ b/opencl/test/unit_test/device/device_caps_tests.cpp @@ -86,7 +86,7 @@ struct DeviceGetCapsTest : public ::testing::Test { EXPECT_STREQ("__opencl_c_read_write_images", (++openclCFeatureIterator)->name); EXPECT_STREQ("__opencl_c_work_group_collective_functions", (++openclCFeatureIterator)->name); - if (clDevice.getDeviceInfo().independentForwardProgress) { + if (hwInfo.capabilityTable.supportsIndependentForwardProgress) { EXPECT_STREQ("__opencl_c_subgroups", (++openclCFeatureIterator)->name); } } @@ -150,6 +150,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) { EXPECT_LT(0u, sharedCaps.globalMemSize); EXPECT_EQ(sharedCaps.maxMemAllocSize, caps.maxConstantBufferSize); EXPECT_NE(nullptr, sharedCaps.ilVersion); + EXPECT_EQ(defaultHwInfo->capabilityTable.supportsIndependentForwardProgress, caps.independentForwardProgress); EXPECT_EQ(static_cast(CL_TRUE), caps.deviceAvailable); EXPECT_EQ(static_cast(CL_READ_WRITE_CACHE), caps.globalMemCacheType); diff --git a/opencl/test/unit_test/platform/platform_tests.cpp b/opencl/test/unit_test/platform/platform_tests.cpp index e04fc17030..ced96e6565 100644 --- a/opencl/test/unit_test/platform/platform_tests.cpp +++ b/opencl/test/unit_test/platform/platform_tests.cpp @@ -96,10 +96,11 @@ TEST_F(PlatformTest, PlatformgetAsCompilerEnabledExtensionsString) { pPlatform->initializeWithNewDevices(); auto compilerExtensions = pPlatform->getClDevice(0)->peekCompilerExtensions(); - auto &hwHelper = HwHelper::get(pPlatform->getClDevice(0)->getHardwareInfo().platform.eRenderCoreFamily); + auto isIndependentForwardProgressSupported = pPlatform->getClDevice(0)->getDeviceInfo().independentForwardProgress; EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string(" -cl-ext=-all,+cl"))); - if (std::string(pPlatform->getClDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.1") != std::string::npos && hwHelper.isIndependentForwardProgressSupported()) { + if ((std::string(pPlatform->getClDevice(0)->getDeviceInfo().clVersion).find("OpenCL 2.1") != std::string::npos) && + isIndependentForwardProgressSupported) { EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_subgroups"))); } } diff --git a/shared/source/gen12lp/hw_helper_gen12lp.cpp b/shared/source/gen12lp/hw_helper_gen12lp.cpp index e564412044..3a35b55214 100644 --- a/shared/source/gen12lp/hw_helper_gen12lp.cpp +++ b/shared/source/gen12lp/hw_helper_gen12lp.cpp @@ -160,11 +160,6 @@ std::string HwHelperHw::getExtensions() const { return "cl_intel_subgroup_local_block_io "; } -template <> -bool HwHelperHw::isIndependentForwardProgressSupported() { - return false; -} - template <> inline void MemorySynchronizationCommands::setPipeControlExtraProperties(PIPE_CONTROL &pipeControl, PipeControlArgs &args) { pipeControl.setHdcPipelineFlush(args.hdcPipelineFlush); diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 91ec7ab4c7..339f06e935 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -92,7 +92,6 @@ class HwHelper { virtual bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const = 0; virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0; virtual bool isFusedEuDispatchEnabled(const HardwareInfo &hwInfo) const = 0; - virtual bool isIndependentForwardProgressSupported() = 0; virtual uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const = 0; virtual uint32_t getBindlessSurfaceExtendedMessageDescriptorValue(uint32_t surfStateOffset) const = 0; virtual void setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties) const = 0; @@ -254,8 +253,6 @@ class HwHelperHw : public HwHelper { uint32_t getMinimalSIMDSize() override; - bool isIndependentForwardProgressSupported() override; - uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const override; bool isSpecialWorkgroupSizeRequired(const HardwareInfo &hwInfo, bool isSimulation) const override; diff --git a/shared/source/helpers/hw_helper_bdw_plus.inl b/shared/source/helpers/hw_helper_bdw_plus.inl index 94fbe6addc..3214d2259d 100644 --- a/shared/source/helpers/hw_helper_bdw_plus.inl +++ b/shared/source/helpers/hw_helper_bdw_plus.inl @@ -76,10 +76,6 @@ uint32_t HwHelperHw::calculateAvailableThreadCount(PRODUCT_FAMILY fam return threadsPerEu * euCount; } -template -bool HwHelperHw::isIndependentForwardProgressSupported() { - return true; -} template uint64_t HwHelperHw::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const { return static_cast(timeStamp * frequency); diff --git a/shared/source/helpers/hw_info.h b/shared/source/helpers/hw_info.h index 4b8816eb40..b437b195f9 100644 --- a/shared/source/helpers/hw_info.h +++ b/shared/source/helpers/hw_info.h @@ -57,6 +57,7 @@ struct RuntimeCapabilityTable { bool supportsPipes; bool supportsOcl21Features; bool supportsOnDemandPageFaults; + bool supportsIndependentForwardProgress; bool hostPtrTrackingEnabled; bool levelZeroSupported; };