From 9700c9bc42d95aa99d284bf95bfeca0f47deb112 Mon Sep 17 00:00:00 2001 From: "Jobczyk, Lukasz" Date: Fri, 23 Mar 2018 10:35:30 +0100 Subject: [PATCH] Add missing devices IDs in master branch Change-Id: Ie73cf42f1d7ef6bb414630016d85e27038fab03b --- runtime/dll/linux/devices/devices_base.m | 1 + runtime/gen9/hw_cmds_glk.h | 9 ++++++ runtime/gen9/hw_info_bxt.cpp | 2 +- runtime/gen9/hw_info_glk.cpp | 29 +++++++++++++++++++ .../gen9/glk/linux/hw_info_config_tests.cpp | 6 ++-- unit_tests/gen9/glk/test_device_caps_glk.cpp | 4 +-- 6 files changed, 43 insertions(+), 8 deletions(-) diff --git a/runtime/dll/linux/devices/devices_base.m b/runtime/dll/linux/devices/devices_base.m index d2fc6040b8..032ae14e00 100644 --- a/runtime/dll/linux/devices/devices_base.m +++ b/runtime/dll/linux/devices/devices_base.m @@ -115,6 +115,7 @@ DEVICE( ICFL_GT3_ULT_DEVICE_F0_ID, CFL_2x3x8, GTTYPE_GT3 ) #ifdef SUPPORT_GLK DEVICE( IGLK_GT2_ULT_18EU_DEVICE_F0_ID, GLK_1x3x6, GTTYPE_GTA ) +DEVICE( IGLK_GT2_ULT_12EU_DEVICE_F0_ID, GLK_1x2x6, GTTYPE_GTA ) #endif #ifdef SUPPORT_BXT diff --git a/runtime/gen9/hw_cmds_glk.h b/runtime/gen9/hw_cmds_glk.h index d01413f6e8..faace27448 100644 --- a/runtime/gen9/hw_cmds_glk.h +++ b/runtime/gen9/hw_cmds_glk.h @@ -46,4 +46,13 @@ class GLK_1x3x6 : public GLK { private: static GT_SYSTEM_INFO gtSystemInfo; }; + +class GLK_1x2x6 : public GLK { + public: + static void setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo); + static const HardwareInfo hwInfo; + + private: + static GT_SYSTEM_INFO gtSystemInfo; +}; } // namespace OCLRT diff --git a/runtime/gen9/hw_info_bxt.cpp b/runtime/gen9/hw_info_bxt.cpp index d698211ddb..5631e814ef 100644 --- a/runtime/gen9/hw_info_bxt.cpp +++ b/runtime/gen9/hw_info_bxt.cpp @@ -113,7 +113,7 @@ void BXT_1x3x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) { gtSysInfo->EUCount = 18; gtSysInfo->ThreadCount = 18 * BXT::threadsPerEu; gtSysInfo->SliceCount = 1; - gtSysInfo->SubSliceCount = 6; + gtSysInfo->SubSliceCount = 3; gtSysInfo->L3CacheSizeInKb = 384; gtSysInfo->L3BankCount = 1; gtSysInfo->MaxFillRate = 8; diff --git a/runtime/gen9/hw_info_glk.cpp b/runtime/gen9/hw_info_glk.cpp index 34497d89bc..b2f841f02e 100644 --- a/runtime/gen9/hw_info_glk.cpp +++ b/runtime/gen9/hw_info_glk.cpp @@ -96,6 +96,35 @@ void GLK_1x3x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) { gtSysInfo->IsDynamicallyPopulated = false; }; +const HardwareInfo GLK_1x2x6::hwInfo = { + &GLK::platform, + &emptySkuTable, + &emptyWaTable, + &GLK_1x2x6::gtSystemInfo, + GLK::capabilityTable, +}; +GT_SYSTEM_INFO GLK_1x2x6::gtSystemInfo = {0}; +void GLK_1x2x6::setupGtSystemInfo(GT_SYSTEM_INFO *gtSysInfo) { + gtSysInfo->EUCount = 12; + gtSysInfo->ThreadCount = 12 * GLK::threadsPerEu; + gtSysInfo->SliceCount = 1; + gtSysInfo->SubSliceCount = 2; + gtSysInfo->L3CacheSizeInKb = 384; + gtSysInfo->L3BankCount = 2; + gtSysInfo->MaxFillRate = 8; + gtSysInfo->TotalVsThreads = 112; + gtSysInfo->TotalHsThreads = 112; + gtSysInfo->TotalDsThreads = 112; + gtSysInfo->TotalGsThreads = 112; + gtSysInfo->TotalPsThreadsWindowerRange = 64; + gtSysInfo->CsrSizeInMb = 8; + gtSysInfo->MaxEuPerSubSlice = GLK::maxEuPerSubslice; + gtSysInfo->MaxSlicesSupported = GLK::maxSlicesSupported; + gtSysInfo->MaxSubSlicesSupported = GLK::maxSubslicesSupported; + gtSysInfo->IsL3HashModeEnabled = false; + gtSysInfo->IsDynamicallyPopulated = false; +}; + const HardwareInfo GLK::hwInfo = GLK_1x3x6::hwInfo; void (*GLK::setupGtSystemInfo)(GT_SYSTEM_INFO *) = GLK_1x3x6::setupGtSystemInfo; } // namespace OCLRT diff --git a/unit_tests/gen9/glk/linux/hw_info_config_tests.cpp b/unit_tests/gen9/glk/linux/hw_info_config_tests.cpp index c118a234fd..3a7a55cfbe 100644 --- a/unit_tests/gen9/glk/linux/hw_info_config_tests.cpp +++ b/unit_tests/gen9/glk/linux/hw_info_config_tests.cpp @@ -26,7 +26,6 @@ using namespace OCLRT; using namespace std; -#if defined IGLK_GT2_ULT_12EU_DEVICE_F0_ID struct HwInfoConfigTestLinuxGlk : HwInfoConfigTestLinux { void SetUp() override { HwInfoConfigTestLinux::SetUp(); @@ -109,7 +108,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfo) { ReleaseOutHwInfoStructs(); - drm->StoredDeviceID = IGLK_GT2_ULT_18EU_DEVICE_F0_ID; + drm->StoredDeviceID = IGLK_GT2_ULT_12EU_DEVICE_F0_ID; drm->setGtType(GTTYPE_GTX); //IGLK_GT2_ULT_18EU_DEVICE_F0_ID is GTA, but fot test sake make it GTX drm->StoredMinEUinPool = 9; ret = hwInfoConfig->configureHwInfo(pInHwInfo, &outHwInfo, osInterface); @@ -255,7 +254,7 @@ GLKTEST_F(HwInfoConfigTestLinuxGlk, configureHwInfoWaFlags) { template class GlkHwInfoTests : public ::testing::Test { }; -typedef ::testing::Types glkTestTypes; +typedef ::testing::Types glkTestTypes; TYPED_TEST_CASE(GlkHwInfoTests, glkTestTypes); TYPED_TEST(GlkHwInfoTests, gtSetupIsCorrect) { GT_SYSTEM_INFO gtSystemInfo; @@ -269,4 +268,3 @@ TYPED_TEST(GlkHwInfoTests, gtSetupIsCorrect) { EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u); EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated); } -#endif diff --git a/unit_tests/gen9/glk/test_device_caps_glk.cpp b/unit_tests/gen9/glk/test_device_caps_glk.cpp index 6a756c1ccc..376a18c6eb 100644 --- a/unit_tests/gen9/glk/test_device_caps_glk.cpp +++ b/unit_tests/gen9/glk/test_device_caps_glk.cpp @@ -57,20 +57,18 @@ GLKTEST_F(Gen9DeviceCaps, GlkIs32BitOsAllocatorAvailable) { typedef Test GlkUsDeviceIdTest; GLKTEST_F(GlkUsDeviceIdTest, isSimulationCap) { -#ifdef IGLK_GT2_ULT_18EU_DEVICE_F0_ID unsigned short glkSimulationIds[3] = { IGLK_GT2_ULT_18EU_DEVICE_F0_ID, + IGLK_GT2_ULT_12EU_DEVICE_F0_ID, 0, // default, non-simulation }; OCLRT::MockDevice *mockDevice = nullptr; - for (auto id : glkSimulationIds) { mockDevice = createWithUsDeviceId(id); ASSERT_NE(mockDevice, nullptr); EXPECT_FALSE(mockDevice->isSimulation()); delete mockDevice; } -#endif } GLKTEST_F(GlkUsDeviceIdTest, GivenGLKWhenCheckftr64KBpagesThenFalse) {