mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-20 00:24:58 +08:00
Move isMidThreadPreemptionSupported helper to hwHelper
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
361a35e8a2
commit
ae88789bce
@@ -141,6 +141,7 @@ class HwHelper {
|
||||
virtual uint32_t getPlanarYuvMaxHeight() const = 0;
|
||||
virtual bool isBlitterForImagesSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual size_t getPreemptionAllocationAlignment() const = 0;
|
||||
virtual bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual std::unique_ptr<TagAllocatorBase> createTimestampPacketAllocator(const std::vector<uint32_t> &rootDeviceIndices, MemoryManager *memoryManager,
|
||||
size_t initialTagCount, CommandStreamReceiverType csrType,
|
||||
DeviceBitfield deviceBitfield) const = 0;
|
||||
@@ -382,6 +383,8 @@ class HwHelperHw : public HwHelper {
|
||||
|
||||
bool additionalPipeControlArgsRequired() const override;
|
||||
|
||||
bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
bool isEngineTypeRemappingToHwSpecificRequired() const override;
|
||||
|
||||
bool isSipKernelAsHexadecimalArrayPreferred() const override;
|
||||
|
||||
@@ -651,6 +651,11 @@ bool HwHelperHw<GfxFamily>::isEngineTypeRemappingToHwSpecificRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool HwHelperHw<GfxFamily>::isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const {
|
||||
return static_cast<bool>(hwInfo.featureTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool HwHelperHw<GfxFamily>::isSipKernelAsHexadecimalArrayPreferred() const {
|
||||
return false;
|
||||
|
||||
@@ -40,7 +40,6 @@ class HwInfoConfig {
|
||||
virtual uint64_t getSharedSystemMemCapabilities() = 0;
|
||||
virtual void convertTimestampsFromOaToCsDomain(uint64_t ×tampData) = 0;
|
||||
virtual uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo *hwInfo) = 0;
|
||||
virtual bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isAdditionalStateBaseAddressWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const = 0;
|
||||
@@ -78,7 +77,6 @@ class HwInfoConfigHw : public HwInfoConfig {
|
||||
void convertTimestampsFromOaToCsDomain(uint64_t ×tampData) override;
|
||||
uint32_t getDeviceMemoryMaxClkRate(const HardwareInfo *hwInfo) override;
|
||||
bool isAdditionalStateBaseAddressWARequired(const HardwareInfo &hwInfo) const override;
|
||||
bool isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const override;
|
||||
bool isMaxThreadsForWorkgroupWARequired(const HardwareInfo &hwInfo) const override;
|
||||
uint32_t getMaxThreadsForWorkgroupInDSSOrSS(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice, uint32_t maxNumEUsPerDualSubSlice) const override;
|
||||
uint32_t getMaxThreadsForWorkgroup(const HardwareInfo &hwInfo, uint32_t maxNumEUsPerSubSlice) const override;
|
||||
|
||||
@@ -96,11 +96,6 @@ uint32_t HwInfoConfigHw<gfxProduct>::getMaxThreadsForWorkgroup(const HardwareInf
|
||||
return maxNumEUsPerSubSlice * numThreadsPerEU;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool HwInfoConfigHw<gfxProduct>::isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const {
|
||||
return static_cast<bool>(hwInfo.featureTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void HwInfoConfigHw<gfxProduct>::setForceNonCoherent(void *const commandPtr, const StateComputeModeProperties &properties) {}
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@ int HwInfoConfig::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
|
||||
drm->checkPreemptionSupport();
|
||||
bool preemption = drm->isPreemptionSupported();
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
|
||||
isMidThreadPreemptionSupported(*outHwInfo) && preemption,
|
||||
hwHelper.isMidThreadPreemptionSupported(*outHwInfo) && preemption,
|
||||
static_cast<bool>(outHwInfo->featureTable.ftrGpGpuThreadGroupLevelPreempt) && preemption,
|
||||
static_cast<bool>(outHwInfo->featureTable.ftrGpGpuMidBatchPreempt) && preemption);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ int HwInfoConfig::configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo
|
||||
outHwInfo->capabilityTable.ftrSupportsCoherency &= inHwInfo->featureTable.ftrL3IACoherency;
|
||||
|
||||
PreemptionHelper::adjustDefaultPreemptionMode(outHwInfo->capabilityTable,
|
||||
isMidThreadPreemptionSupported(*outHwInfo),
|
||||
hwHelper.isMidThreadPreemptionSupported(*outHwInfo),
|
||||
static_cast<bool>(outHwInfo->featureTable.ftrGpGpuThreadGroupLevelPreempt),
|
||||
static_cast<bool>(outHwInfo->featureTable.ftrGpGpuMidBatchPreempt));
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ struct UnitTestHelper {
|
||||
|
||||
static bool requiresTimestampPacketsInSystemMemory();
|
||||
|
||||
static void setExtraMidThreadPreemptionFlag(HardwareInfo &hwInfo);
|
||||
|
||||
static const bool tiledImagesSupported;
|
||||
|
||||
static const uint32_t smallestTestableSimdSize;
|
||||
|
||||
@@ -80,6 +80,10 @@ inline bool UnitTestHelper<GfxFamily>::requiresTimestampPacketsInSystemMemory()
|
||||
return true;
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void UnitTestHelper<GfxFamily>::setExtraMidThreadPreemptionFlag(HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
auto UnitTestHelper<GfxFamily>::getCoherencyTypeSupported(COHERENCY_TYPE coherencyType) -> decltype(coherencyType) {
|
||||
return coherencyType;
|
||||
|
||||
@@ -13,11 +13,6 @@ template <>
|
||||
void HwInfoConfigHw<IGFX_UNKNOWN>::adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<IGFX_UNKNOWN>::isMidThreadPreemptionSupported(const HardwareInfo &hwInfo) const {
|
||||
return static_cast<bool>(hwInfo.featureTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
}
|
||||
|
||||
template <>
|
||||
void HwInfoConfigHw<IGFX_UNKNOWN>::convertTimestampsFromOaToCsDomain(uint64_t ×tampData) {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user