Add isEvenContextCountRequired function

Change-Id: I6b0b16aca93fac587b9552493f24f329636cf8e0
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
Maciej Dziuban
2020-06-16 16:25:46 +02:00
committed by sys_ocldev
parent 10f3157828
commit 5293b26dc6
6 changed files with 59 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ using Family = NEO::TGLLPFamily;
#include "shared/source/helpers/flat_batch_buffer_helper_hw.inl"
#include "shared/source/helpers/hw_helper_bdw_plus.inl"
#include "shared/source/helpers/hw_helper_tgllp_plus.inl"
#include "shared/source/os_interface/hw_info_config.h"
#include "engine_node.h"
@@ -132,6 +133,11 @@ const HwHelper::EngineInstancesContainer HwHelperHw<Family>::getGpgpuEngineInsta
engines.push_back(aub_stream::ENGINE_BCS);
}
auto hwInfoConfig = HwInfoConfig::get(hwInfo.platform.eProductFamily);
if (hwInfoConfig->isEvenContextCountRequired() && engines.size() & 1) {
engines.push_back(aub_stream::ENGINE_RCS);
}
return engines;
};

View File

@@ -33,6 +33,7 @@ class HwInfoConfig {
virtual uint64_t getSingleDeviceSharedMemCapabilities() = 0;
virtual uint64_t getCrossDeviceSharedMemCapabilities() = 0;
virtual uint64_t getSharedSystemMemCapabilities() = 0;
virtual bool isEvenContextCountRequired() = 0;
uint32_t threadsPerEu;
};
@@ -50,6 +51,7 @@ class HwInfoConfigHw : public HwInfoConfig {
uint64_t getSingleDeviceSharedMemCapabilities() override;
uint64_t getCrossDeviceSharedMemCapabilities() override;
uint64_t getSharedSystemMemCapabilities() override;
bool isEvenContextCountRequired() override;
protected:
HwInfoConfigHw() {}

View File

@@ -13,4 +13,9 @@ template <PRODUCT_FAMILY gfxProduct>
void HwInfoConfigHw<gfxProduct>::adjustPlatformForProductFamily(HardwareInfo *hwInfo) {
}
template <PRODUCT_FAMILY gfxProduct>
bool HwInfoConfigHw<gfxProduct>::isEvenContextCountRequired() {
return false;
}
} // namespace NEO