ULT: setup productFamily and renderCoreFamily before using them

Change-Id: I005afe541f1bf01b6e28adf48d0e10eda121b03b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-06-17 15:58:36 +02:00
committed by sys_ocldev
parent 8f30d87a1e
commit e5671d8e22
2 changed files with 6 additions and 6 deletions

View File

@@ -185,6 +185,9 @@ int main(int argc, char **argv) {
useDefaultListener = true; useDefaultListener = true;
} }
} }
productFamily = hwInfoForTests.platform.eProductFamily;
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
// Platforms with uninitialized factory are not supported // Platforms with uninitialized factory are not supported
if (L0::commandListFactory[productFamily] == nullptr) { if (L0::commandListFactory[productFamily] == nullptr) {
std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl; std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl;
@@ -227,9 +230,6 @@ int main(int argc, char **argv) {
// set Gt and FeatureTable to initial state // set Gt and FeatureTable to initial state
NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig); NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig);
productFamily = hwInfoForTests.platform.eProductFamily;
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>(); NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>();
*NEO::defaultHwInfo = hwInfoForTests; *NEO::defaultHwInfo = hwInfoForTests;

View File

@@ -160,6 +160,9 @@ int main(int argc, char **argv) {
useDefaultListener = true; useDefaultListener = true;
} }
} }
productFamily = hwInfoForTests.platform.eProductFamily;
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
// Platforms with uninitialized factory are not supported // Platforms with uninitialized factory are not supported
if (L0::commandListFactory[productFamily] == nullptr) { if (L0::commandListFactory[productFamily] == nullptr) {
std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl; std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl;
@@ -192,9 +195,6 @@ int main(int argc, char **argv) {
// set Gt and FeatureTable to initial state // set Gt and FeatureTable to initial state
NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig); NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig);
productFamily = hwInfoForTests.platform.eProductFamily;
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>(); NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>();
*NEO::defaultHwInfo = hwInfoForTests; *NEO::defaultHwInfo = hwInfoForTests;