mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 06:23:01 +08:00
Add isEvenContextCountRequired function
Change-Id: I6b0b16aca93fac587b9552493f24f329636cf8e0 Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
10f3157828
commit
5293b26dc6
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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() {}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user