mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
feature: add check for product and hw info override in non hw mode
Related-To: HSD-18043580274 Signed-off-by: Katarzyna Cencelewska <katarzyna.cencelewska@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9b3417ec1a
commit
1f524e9d1c
@@ -125,7 +125,7 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
|
||||
auto aubCenter = rootDeviceEnvironment.aubCenter.get();
|
||||
rootDeviceEnvironment.memoryOperationsInterface = std::make_unique<AubMemoryOperationsHandler>(aubCenter->getAubManager());
|
||||
|
||||
if (csrType == CommandStreamReceiverType::tbx || csrType == CommandStreamReceiverType::tbxWithAub) {
|
||||
if (DeviceFactory::isTbxModeSelected()) {
|
||||
auto capsReader = productHelper.getDeviceCapsReader(*aubCenter->getAubManager());
|
||||
if (capsReader) {
|
||||
if (!productHelper.setupHardwareInfo(*hardwareInfo, *capsReader)) {
|
||||
@@ -183,6 +183,34 @@ bool DeviceFactory::isHwModeSelected() {
|
||||
}
|
||||
}
|
||||
|
||||
bool DeviceFactory::isTbxModeSelected() {
|
||||
CommandStreamReceiverType csrType = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware);
|
||||
switch (csrType) {
|
||||
case CommandStreamReceiverType::tbx:
|
||||
case CommandStreamReceiverType::tbxWithAub:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool DeviceFactory::validateDeviceFlags(const ProductHelper &productHelper) {
|
||||
bool ret = true;
|
||||
if (!DeviceFactory::isHwModeSelected()) {
|
||||
|
||||
if (debugManager.flags.ProductFamilyOverride.get() == "unk") {
|
||||
PRINT_DEBUG_STRING(true, stderr, "Missing override for product family, required to set flag ProductFamilyOverride in non hw mode\n");
|
||||
ret = false;
|
||||
}
|
||||
|
||||
if (!(productHelper.isDeviceCapsReaderSupported()) && debugManager.flags.HardwareInfoOverride.get() == "default") {
|
||||
PRINT_DEBUG_STRING(true, stderr, "Missing override for hardware info, required to set flag HardwareInfoOverride in non hw mode\n");
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool initHwDeviceIdResources(ExecutionEnvironment &executionEnvironment,
|
||||
std::unique_ptr<NEO::HwDeviceId> &&hwDeviceId, uint32_t rootDeviceIndex) {
|
||||
if (!executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->initOsInterface(std::move(hwDeviceId), rootDeviceIndex)) {
|
||||
|
||||
Reference in New Issue
Block a user