Add EngineType suffix to aub file name in AubFixture
Change-Id: I9b8f27461e6d36d596e85fde973aa1b2f34dbede
This commit is contained in:
parent
9a1adc3095
commit
5f11e68861
|
@ -70,9 +70,8 @@ Device::Device(const HardwareInfo &hwInfo, ExecutionEnvironment *executionEnviro
|
||||||
deviceExtensions.reserve(1000);
|
deviceExtensions.reserve(1000);
|
||||||
name.reserve(100);
|
name.reserve(100);
|
||||||
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
|
preemptionMode = PreemptionHelper::getDefaultPreemptionMode(hwInfo);
|
||||||
engineType = DebugManager.flags.NodeOrdinal.get() == -1
|
engineType = getChosenEngineType(hwInfo);
|
||||||
? hwInfo.capabilityTable.defaultEngineType
|
|
||||||
: static_cast<EngineType>(DebugManager.flags.NodeOrdinal.get());
|
|
||||||
if (!getSourceLevelDebugger()) {
|
if (!getSourceLevelDebugger()) {
|
||||||
this->executionEnvironment->initSourceLevelDebugger(hwInfo);
|
this->executionEnvironment->initSourceLevelDebugger(hwInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#include "hw_info.h"
|
#include "hw_info.h"
|
||||||
#include "hw_cmds.h"
|
#include "hw_cmds.h"
|
||||||
|
#include "runtime/os_interface/debug_settings_manager.h"
|
||||||
|
|
||||||
namespace OCLRT {
|
namespace OCLRT {
|
||||||
HardwareInfo::HardwareInfo(const PLATFORM *platform, const FeatureTable *skuTable, const WorkaroundTable *waTable,
|
HardwareInfo::HardwareInfo(const PLATFORM *platform, const FeatureTable *skuTable, const WorkaroundTable *waTable,
|
||||||
|
@ -42,4 +43,10 @@ bool getHwInfoForPlatformString(const char *str, const HardwareInfo *&hwInfoIn)
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EngineType getChosenEngineType(const HardwareInfo &hwInfo) {
|
||||||
|
return DebugManager.flags.NodeOrdinal.get() == -1
|
||||||
|
? hwInfo.capabilityTable.defaultEngineType
|
||||||
|
: static_cast<EngineType>(DebugManager.flags.NodeOrdinal.get());
|
||||||
|
}
|
||||||
} // namespace OCLRT
|
} // namespace OCLRT
|
||||||
|
|
|
@ -113,4 +113,5 @@ struct EnableGfxFamilyHw {
|
||||||
|
|
||||||
const char *getPlatformType(const HardwareInfo &hwInfo);
|
const char *getPlatformType(const HardwareInfo &hwInfo);
|
||||||
bool getHwInfoForPlatformString(const char *str, const HardwareInfo *&hwInfoIn);
|
bool getHwInfoForPlatformString(const char *str, const HardwareInfo *&hwInfoIn);
|
||||||
|
EngineType getChosenEngineType(const HardwareInfo &hwInfo);
|
||||||
} // namespace OCLRT
|
} // namespace OCLRT
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
target_sources(igdrcl_aub_tests PRIVATE
|
target_sources(igdrcl_aub_tests PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_fixture.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_parent_kernel_fixture.h
|
${CMAKE_CURRENT_SOURCE_DIR}/aub_parent_kernel_fixture.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/fixture_tests.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/fixture_tests.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/hello_world_fixture.h
|
${CMAKE_CURRENT_SOURCE_DIR}/hello_world_fixture.h
|
||||||
|
|
|
@ -28,9 +28,12 @@ class AUBFixture : public CommandQueueHwFixture {
|
||||||
const HardwareInfo &hwInfo = hardwareInfo ? *hardwareInfo : *platformDevices[0];
|
const HardwareInfo &hwInfo = hardwareInfo ? *hardwareInfo : *platformDevices[0];
|
||||||
uint32_t deviceIndex = 0;
|
uint32_t deviceIndex = 0;
|
||||||
|
|
||||||
|
auto &hwHelper = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily);
|
||||||
|
EngineType engineType = getChosenEngineType(hwInfo);
|
||||||
|
|
||||||
const ::testing::TestInfo *const testInfo = ::testing::UnitTest::GetInstance()->current_test_info();
|
const ::testing::TestInfo *const testInfo = ::testing::UnitTest::GetInstance()->current_test_info();
|
||||||
std::stringstream strfilename;
|
std::stringstream strfilename;
|
||||||
strfilename << testInfo->test_case_name() << "_" << testInfo->name();
|
strfilename << testInfo->test_case_name() << "_" << testInfo->name() << "_" << hwHelper.getCsTraits(engineType).name;
|
||||||
|
|
||||||
executionEnvironment = new ExecutionEnvironment;
|
executionEnvironment = new ExecutionEnvironment;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,9 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "unit_tests/helpers/hw_helper_tests.h"
|
|
||||||
#include "runtime/helpers/options.h"
|
#include "runtime/helpers/options.h"
|
||||||
|
#include "unit_tests/helpers/debug_manager_state_restore.h"
|
||||||
|
#include "unit_tests/helpers/hw_helper_tests.h"
|
||||||
|
|
||||||
void HwHelperTest::SetUp() {
|
void HwHelperTest::SetUp() {
|
||||||
memcpy(&testPlatform, platformDevices[0]->pPlatform, sizeof(testPlatform));
|
memcpy(&testPlatform, platformDevices[0]->pPlatform, sizeof(testPlatform));
|
||||||
|
@ -153,3 +154,19 @@ TEST(HwInfoTest, givenHwInfoWhenIsNotCoreThenPlatformTypeIsLp) {
|
||||||
auto platformType = getPlatformType(hwInfo);
|
auto platformType = getPlatformType(hwInfo);
|
||||||
EXPECT_STREQ("lp", platformType);
|
EXPECT_STREQ("lp", platformType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST(HwInfoTest, givenHwInfoWhenChosenEngineTypeQueriedThenDefaultIsReturned) {
|
||||||
|
HardwareInfo hwInfo;
|
||||||
|
hwInfo.capabilityTable.defaultEngineType = EngineType::ENGINE_RCS;
|
||||||
|
auto engineType = getChosenEngineType(hwInfo);
|
||||||
|
EXPECT_EQ(EngineType::ENGINE_RCS, engineType);
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST(HwInfoTest, givenNodeOrdinalSetWhenChosenEngineTypeQueriedThenSetValueIsReturned) {
|
||||||
|
DebugManagerStateRestore dbgRestore;
|
||||||
|
DebugManager.flags.NodeOrdinal.set(EngineType::ENGINE_VECS);
|
||||||
|
HardwareInfo hwInfo;
|
||||||
|
hwInfo.capabilityTable.defaultEngineType = EngineType::ENGINE_RCS;
|
||||||
|
auto engineType = getChosenEngineType(hwInfo);
|
||||||
|
EXPECT_EQ(EngineType::ENGINE_VECS, engineType);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue