performance: Cache host resources when mitigate dc flush
Related-To: NEO-10556 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
parent
cf8f0b9cd8
commit
c39b750790
|
@ -131,6 +131,7 @@ class ProductHelper {
|
|||
virtual bool isDcFlushAllowed() const = 0;
|
||||
virtual bool isDcFlushMitigated() const = 0;
|
||||
virtual bool overridePatAndUsageForDcFlushMitigation(AllocationType allocationType) const = 0;
|
||||
virtual bool overrideCacheableForDcFlushMitigation(AllocationType allocationType) const = 0;
|
||||
virtual uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool getUuid(NEO::DriverModel *driverModel, const uint32_t subDeviceCount, const uint32_t deviceIndex, std::array<uint8_t, ProductHelper::uuidSize> &uuid) const = 0;
|
||||
virtual bool isFlushTaskAllowed() const = 0;
|
||||
|
|
|
@ -407,16 +407,22 @@ bool ProductHelperHw<gfxProduct>::isDcFlushMitigated() const {
|
|||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::overridePatAndUsageForDcFlushMitigation(AllocationType allocationType) const {
|
||||
return this->isDcFlushMitigated() &&
|
||||
(this->overrideCacheableForDcFlushMitigation(allocationType) ||
|
||||
allocationType == AllocationType::timestampPacketTagBuffer ||
|
||||
allocationType == AllocationType::tagBuffer ||
|
||||
allocationType == AllocationType::gpuTimestampDeviceBuffer);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::overrideCacheableForDcFlushMitigation(AllocationType allocationType) const {
|
||||
return this->isDcFlushMitigated() &&
|
||||
(allocationType == AllocationType::externalHostPtr ||
|
||||
allocationType == AllocationType::bufferHostMemory ||
|
||||
allocationType == AllocationType::mapAllocation ||
|
||||
allocationType == AllocationType::svmCpu ||
|
||||
allocationType == AllocationType::svmZeroCopy ||
|
||||
allocationType == AllocationType::internalHostMemory ||
|
||||
allocationType == AllocationType::timestampPacketTagBuffer ||
|
||||
allocationType == AllocationType::tagBuffer ||
|
||||
allocationType == AllocationType::gpuTimestampDeviceBuffer);
|
||||
allocationType == AllocationType::internalHostMemory);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
|
|
|
@ -76,6 +76,7 @@ class ProductHelperHw : public ProductHelper {
|
|||
bool isDcFlushAllowed() const override;
|
||||
bool isDcFlushMitigated() const override;
|
||||
bool overridePatAndUsageForDcFlushMitigation(AllocationType allocationType) const override;
|
||||
bool overrideCacheableForDcFlushMitigation(AllocationType allocationType) const override;
|
||||
uint32_t computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const override;
|
||||
bool getUuid(NEO::DriverModel *driverModel, uint32_t subDeviceCount, uint32_t deviceIndex, std::array<uint8_t, ProductHelper::uuidSize> &uuid) const override;
|
||||
bool isFlushTaskAllowed() const override;
|
||||
|
|
|
@ -281,6 +281,11 @@ bool ProductHelperHw<IGFX_UNKNOWN>::overridePatAndUsageForDcFlushMitigation(Allo
|
|||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<IGFX_UNKNOWN>::overrideCacheableForDcFlushMitigation(AllocationType allocationType) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t ProductHelperHw<IGFX_UNKNOWN>::computeMaxNeededSubSliceSpace(const HardwareInfo &hwInfo) const {
|
||||
return hwInfo.gtSystemInfo.MaxSubSlicesSupported;
|
||||
|
|
Loading…
Reference in New Issue