Skip to content

Commit e5671d8

Browse files
ULT: setup productFamily and renderCoreFamily before using them
Change-Id: I005afe541f1bf01b6e28adf48d0e10eda121b03b Signed-off-by: Mateusz Jablonski <[email protected]>
1 parent 8f30d87 commit e5671d8

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

level_zero/core/test/unit_tests/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ int main(int argc, char **argv) {
185185
useDefaultListener = true;
186186
}
187187
}
188+
productFamily = hwInfoForTests.platform.eProductFamily;
189+
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
190+
188191
// Platforms with uninitialized factory are not supported
189192
if (L0::commandListFactory[productFamily] == nullptr) {
190193
std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl;
@@ -227,9 +230,6 @@ int main(int argc, char **argv) {
227230
// set Gt and FeatureTable to initial state
228231
NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig);
229232

230-
productFamily = hwInfoForTests.platform.eProductFamily;
231-
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
232-
233233
NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>();
234234
*NEO::defaultHwInfo = hwInfoForTests;
235235

level_zero/tools/test/unit_tests/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ int main(int argc, char **argv) {
160160
useDefaultListener = true;
161161
}
162162
}
163+
productFamily = hwInfoForTests.platform.eProductFamily;
164+
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
165+
163166
// Platforms with uninitialized factory are not supported
164167
if (L0::commandListFactory[productFamily] == nullptr) {
165168
std::cout << "unsupported product family has been set: " << NEO::hardwarePrefix[::productFamily] << std::endl;
@@ -192,9 +195,6 @@ int main(int argc, char **argv) {
192195
// set Gt and FeatureTable to initial state
193196
NEO::hardwareInfoSetup[productFamily](&hwInfoForTests, false, hwInfoConfig);
194197

195-
productFamily = hwInfoForTests.platform.eProductFamily;
196-
renderCoreFamily = hwInfoForTests.platform.eRenderCoreFamily;
197-
198198
NEO::defaultHwInfo = std::make_unique<NEO::HardwareInfo>();
199199
*NEO::defaultHwInfo = hwInfoForTests;
200200

0 commit comments

Comments
 (0)