mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 03:01:20 +08:00
Move IFP support flag to RuntimeCapabilityTable
Remove HwHelper::isIndependentForwardProgressSupported function. Related-To: NEO-4368 Change-Id: I97061620ee6e96c4666bb8af5f009129ff0d9175 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
2930c8feba
commit
fe13f0b522
@@ -122,13 +122,12 @@ void ClDevice::initializeCaps() {
|
|||||||
auto supportsVme = hwInfo.capabilityTable.supportsVme;
|
auto supportsVme = hwInfo.capabilityTable.supportsVme;
|
||||||
auto supportsAdvancedVme = 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].name[0] = 0;
|
||||||
deviceInfo.ilsWithVersion[0].version = 0;
|
deviceInfo.ilsWithVersion[0].version = 0;
|
||||||
|
|
||||||
if (ocl21FeaturesEnabled) {
|
if (ocl21FeaturesEnabled) {
|
||||||
if (hwHelper.isIndependentForwardProgressSupported()) {
|
if (deviceInfo.independentForwardProgress) {
|
||||||
deviceInfo.independentForwardProgress = true;
|
|
||||||
deviceExtensions += "cl_khr_subgroups ";
|
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");
|
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_work_group_collective_functions");
|
||||||
deviceInfo.openclCFeatures.push_back(openClCFeature);
|
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");
|
strcpy_s(openClCFeature.name, CL_NAME_VERSION_MAX_NAME_SIZE, "__opencl_c_subgroups");
|
||||||
deviceInfo.openclCFeatures.push_back(openClCFeature);
|
deviceInfo.openclCFeatures.push_back(openClCFeature);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
|||||||
false, // supportsPipes
|
false, // supportsPipes
|
||||||
false, // supportsOcl21Features
|
false, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
false, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
false // levelZeroSupported
|
false // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
|||||||
true, // supportsPipes
|
true, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
true, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
true // levelZeroSupported
|
true // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
|||||||
false, // supportsPipes
|
false, // supportsPipes
|
||||||
false, // supportsOcl21Features
|
false, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
false, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
false // levelZeroSupported
|
false // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
|||||||
false, // supportsPipes
|
false, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
false, // supportsIndependentForwardProgress
|
||||||
false, // hostPtrTrackingEnabled
|
false, // hostPtrTrackingEnabled
|
||||||
true // levelZeroSupported
|
true // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
|||||||
true, // supportsPipes
|
true, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
true, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
false // levelZeroSupported
|
false // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
|||||||
false, // supportsPipes
|
false, // supportsPipes
|
||||||
false, // supportsOcl21Features
|
false, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
false, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
false // levelZeroSupported
|
false // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
|||||||
true, // supportsPipes
|
true, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
true, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
true // levelZeroSupported
|
true // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
|||||||
false, // supportsPipes
|
false, // supportsPipes
|
||||||
false, // supportsOcl21Features
|
false, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
false, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
false // levelZeroSupported
|
false // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
|||||||
true, // supportsPipes
|
true, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
true, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
true // levelZeroSupported
|
true // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
|||||||
true, // supportsPipes
|
true, // supportsPipes
|
||||||
true, // supportsOcl21Features
|
true, // supportsOcl21Features
|
||||||
false, // supportsOnDemandPageFaults
|
false, // supportsOnDemandPageFaults
|
||||||
|
true, // supportsIndependentForwardProgress
|
||||||
true, // hostPtrTrackingEnabled
|
true, // hostPtrTrackingEnabled
|
||||||
true // levelZeroSupported
|
true // levelZeroSupported
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ struct DeviceGetCapsTest : public ::testing::Test {
|
|||||||
EXPECT_STREQ("__opencl_c_read_write_images", (++openclCFeatureIterator)->name);
|
EXPECT_STREQ("__opencl_c_read_write_images", (++openclCFeatureIterator)->name);
|
||||||
EXPECT_STREQ("__opencl_c_work_group_collective_functions", (++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);
|
EXPECT_STREQ("__opencl_c_subgroups", (++openclCFeatureIterator)->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -150,6 +150,7 @@ TEST_F(DeviceGetCapsTest, WhenCreatingDeviceThenCapsArePopulatedCorrectly) {
|
|||||||
EXPECT_LT(0u, sharedCaps.globalMemSize);
|
EXPECT_LT(0u, sharedCaps.globalMemSize);
|
||||||
EXPECT_EQ(sharedCaps.maxMemAllocSize, caps.maxConstantBufferSize);
|
EXPECT_EQ(sharedCaps.maxMemAllocSize, caps.maxConstantBufferSize);
|
||||||
EXPECT_NE(nullptr, sharedCaps.ilVersion);
|
EXPECT_NE(nullptr, sharedCaps.ilVersion);
|
||||||
|
EXPECT_EQ(defaultHwInfo->capabilityTable.supportsIndependentForwardProgress, caps.independentForwardProgress);
|
||||||
|
|
||||||
EXPECT_EQ(static_cast<cl_bool>(CL_TRUE), caps.deviceAvailable);
|
EXPECT_EQ(static_cast<cl_bool>(CL_TRUE), caps.deviceAvailable);
|
||||||
EXPECT_EQ(static_cast<cl_device_mem_cache_type>(CL_READ_WRITE_CACHE), caps.globalMemCacheType);
|
EXPECT_EQ(static_cast<cl_device_mem_cache_type>(CL_READ_WRITE_CACHE), caps.globalMemCacheType);
|
||||||
|
|||||||
@@ -96,10 +96,11 @@ TEST_F(PlatformTest, PlatformgetAsCompilerEnabledExtensionsString) {
|
|||||||
pPlatform->initializeWithNewDevices();
|
pPlatform->initializeWithNewDevices();
|
||||||
auto compilerExtensions = pPlatform->getClDevice(0)->peekCompilerExtensions();
|
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")));
|
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")));
|
EXPECT_THAT(compilerExtensions, ::testing::HasSubstr(std::string("cl_khr_subgroups")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,11 +160,6 @@ std::string HwHelperHw<Family>::getExtensions() const {
|
|||||||
return "cl_intel_subgroup_local_block_io ";
|
return "cl_intel_subgroup_local_block_io ";
|
||||||
}
|
}
|
||||||
|
|
||||||
template <>
|
|
||||||
bool HwHelperHw<Family>::isIndependentForwardProgressSupported() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
inline void MemorySynchronizationCommands<Family>::setPipeControlExtraProperties(PIPE_CONTROL &pipeControl, PipeControlArgs &args) {
|
inline void MemorySynchronizationCommands<Family>::setPipeControlExtraProperties(PIPE_CONTROL &pipeControl, PipeControlArgs &args) {
|
||||||
pipeControl.setHdcPipelineFlush(args.hdcPipelineFlush);
|
pipeControl.setHdcPipelineFlush(args.hdcPipelineFlush);
|
||||||
|
|||||||
@@ -92,7 +92,6 @@ class HwHelper {
|
|||||||
virtual bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool isOffsetToSkipSetFFIDGPWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0;
|
virtual bool is3DPipelineSelectWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||||
virtual bool isFusedEuDispatchEnabled(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 uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const = 0;
|
||||||
virtual uint32_t getBindlessSurfaceExtendedMessageDescriptorValue(uint32_t surfStateOffset) const = 0;
|
virtual uint32_t getBindlessSurfaceExtendedMessageDescriptorValue(uint32_t surfStateOffset) const = 0;
|
||||||
virtual void setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties) const = 0;
|
virtual void setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties) const = 0;
|
||||||
@@ -254,8 +253,6 @@ class HwHelperHw : public HwHelper {
|
|||||||
|
|
||||||
uint32_t getMinimalSIMDSize() override;
|
uint32_t getMinimalSIMDSize() override;
|
||||||
|
|
||||||
bool isIndependentForwardProgressSupported() override;
|
|
||||||
|
|
||||||
uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const override;
|
uint64_t getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const override;
|
||||||
|
|
||||||
bool isSpecialWorkgroupSizeRequired(const HardwareInfo &hwInfo, bool isSimulation) const override;
|
bool isSpecialWorkgroupSizeRequired(const HardwareInfo &hwInfo, bool isSimulation) const override;
|
||||||
|
|||||||
@@ -76,10 +76,6 @@ uint32_t HwHelperHw<GfxFamily>::calculateAvailableThreadCount(PRODUCT_FAMILY fam
|
|||||||
return threadsPerEu * euCount;
|
return threadsPerEu * euCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename GfxFamily>
|
|
||||||
bool HwHelperHw<GfxFamily>::isIndependentForwardProgressSupported() {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
template <typename GfxFamily>
|
template <typename GfxFamily>
|
||||||
uint64_t HwHelperHw<GfxFamily>::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const {
|
uint64_t HwHelperHw<GfxFamily>::getGpuTimeStampInNS(uint64_t timeStamp, double frequency) const {
|
||||||
return static_cast<uint64_t>(timeStamp * frequency);
|
return static_cast<uint64_t>(timeStamp * frequency);
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ struct RuntimeCapabilityTable {
|
|||||||
bool supportsPipes;
|
bool supportsPipes;
|
||||||
bool supportsOcl21Features;
|
bool supportsOcl21Features;
|
||||||
bool supportsOnDemandPageFaults;
|
bool supportsOnDemandPageFaults;
|
||||||
|
bool supportsIndependentForwardProgress;
|
||||||
bool hostPtrTrackingEnabled;
|
bool hostPtrTrackingEnabled;
|
||||||
bool levelZeroSupported;
|
bool levelZeroSupported;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user