Skip to content

Commit

Permalink
Adjust default engine type in Linux
Browse files Browse the repository at this point in the history
Change-Id: I2cc7e4078e830f0844d6dc6fe7b4bfcdf92b0095
  • Loading branch information
zzdanowicz authored and Compute-Runtime-Automation committed Mar 29, 2018
1 parent 961d1e2 commit 50ef7c0
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/device/device_caps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static std::string spirVersions = "1.2 ";
static const char *spirvVersion = "SPIR-V_1.0 ";
#define QTR(a) #a
#define TOSTR(b) QTR(b)
static std::string driverVersion;
static std::string driverVersion = TOSTR(NEO_DRIVER_VERSION);

const char *builtInKernels = ""; // the "always available" (extension-independent) builtin kernels

Expand Down
1 change: 1 addition & 0 deletions runtime/os_interface/linux/hw_info_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ int HwInfoConfig::configureHwInfo(const HardwareInfo *inHwInfo, HardwareInfo *ou
HwHelper &hwHelper = HwHelper::get(pPlatform->eRenderCoreFamily);
outHwInfo->capabilityTable.ftrSupportsCoherency = false;

hwHelper.adjustDefaultEngineType(outHwInfo);
outHwInfo->capabilityTable.defaultEngineType = DebugManager.flags.NodeOrdinal.get() == -1
? outHwInfo->capabilityTable.defaultEngineType
: static_cast<EngineType>(DebugManager.flags.NodeOrdinal.get());
Expand Down
3 changes: 3 additions & 0 deletions unit_tests/gen8/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -65,6 +66,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -88,6 +90,7 @@ BDWTEST_F(HwInfoConfigTestLinuxBdw, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down
3 changes: 3 additions & 0 deletions unit_tests/gen9/bxt/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin);
EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGttCacheInvalidation);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

//constant sysInfo/ftr flags
EXPECT_EQ(1u, outHwInfo.pSysInfo->VEBoxInfo.Instances.Bits.VEBox0Enabled);
Expand Down Expand Up @@ -101,6 +102,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin);
EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax);
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGttCacheInvalidation);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GTC, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -126,6 +128,7 @@ BXTTEST_F(HwInfoConfigTestLinuxBxt, configureHwInfo) {
EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled);
EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin);
EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GTX, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down
3 changes: 3 additions & 0 deletions unit_tests/gen9/cfl/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down Expand Up @@ -88,6 +89,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -111,6 +113,7 @@ CFLTEST_F(HwInfoConfigTestLinuxCfl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down
3 changes: 3 additions & 0 deletions unit_tests/gen9/glk/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GTA, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down Expand Up @@ -94,6 +95,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) {
EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled);
EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin);
EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GTC, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -119,6 +121,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) {
EXPECT_EQ((unsigned int)drm->StoredHasPooledEU, outHwInfo.pSkuTable->ftrPooledEuEnabled);
EXPECT_EQ((uint32_t)drm->StoredMinEUinPool, outHwInfo.pSysInfo->EuCountPerPoolMin);
EXPECT_EQ((outHwInfo.pSysInfo->EUCount - outHwInfo.pSysInfo->EuCountPerPoolMin), outHwInfo.pSysInfo->EuCountPerPoolMax);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GTX, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down
5 changes: 5 additions & 0 deletions unit_tests/gen9/kbl/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down Expand Up @@ -88,6 +89,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -109,6 +111,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1_5, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -132,6 +135,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -155,6 +159,7 @@ KBLTEST_F(HwInfoConfigTestLinuxKbl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT4, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down
5 changes: 5 additions & 0 deletions unit_tests/gen9/skl/linux/hw_info_config_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT2, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down Expand Up @@ -90,6 +91,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(1u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(1u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -111,6 +113,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT1_5, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -132,6 +135,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.pPlatform->usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT3, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand All @@ -155,6 +159,7 @@ SKLTEST_F(HwInfoConfigTestLinuxSkl, configureHwInfo) {
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.pSysInfo->EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.pSysInfo->SubSliceCount);
EXPECT_EQ(2u, outHwInfo.pSysInfo->SliceCount);
EXPECT_EQ(EngineType::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);

EXPECT_EQ(GTTYPE_GT4, outHwInfo.pPlatform->eGTType);
EXPECT_EQ(0u, outHwInfo.pSkuTable->ftrGT1);
Expand Down

0 comments on commit 50ef7c0

Please sign in to comment.