mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 22:08:53 +08:00
Add EHL device IDs
Change-Id: Ic65fab67d0943023caecfc07b63e2853fb58d0c4 Signed-off-by: Koska, Andrzej <andrzej.koska@intel.com> Related-To: NEO-3321, NEO-3221
This commit is contained in:
committed by
sys_ocldev
parent
277786d433
commit
382bc8547d
@@ -162,7 +162,7 @@ endmacro()
|
||||
|
||||
SET_FLAGS_FOR("GEN8" "BDW")
|
||||
SET_FLAGS_FOR("GEN9" "SKL" "KBL" "BXT" "GLK" "CFL")
|
||||
SET_FLAGS_FOR("GEN11" "ICLLP" "LKF")
|
||||
SET_FLAGS_FOR("GEN11" "ICLLP" "LKF" "EHL")
|
||||
|
||||
# Init lists
|
||||
INIT_LIST("FAMILY_NAME" "TESTED")
|
||||
@@ -262,6 +262,7 @@ if(SUPPORT_GEN11)
|
||||
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "UNIT_TESTS" "GEN11" "icllp/1/8/8")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SUPPORT_LKF)
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN11" "LKF" "LP")
|
||||
if(TESTS_LKF)
|
||||
@@ -270,6 +271,13 @@ if(SUPPORT_GEN11)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(SUPPORT_EHL)
|
||||
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN11" "EHL" "LP")
|
||||
if(TESTS_EHL)
|
||||
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "GEN11" "EHL")
|
||||
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "UNIT_TESTS" "GEN11" "ehl/1/4/8")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,8 @@ struct CmdServicesMemTraceVersion {
|
||||
Bdw = 11,
|
||||
Icllp = 19,
|
||||
Cfl = 24,
|
||||
Lkf = 25
|
||||
Lkf = 25,
|
||||
Ehl = 28
|
||||
};
|
||||
};
|
||||
struct RecordingMethodValues {
|
||||
|
||||
@@ -26,6 +26,13 @@ DEVICE( IICL_LP_1x8x8_ULX_DEVICE_F0_ID, ICLLP_1x8x8, GTTYPE_GT2 )
|
||||
#ifdef SUPPORT_LKF
|
||||
DEVICE( ILKF_1x8x8_DESK_DEVICE_F0_ID, LKF_1x8x8, GTTYPE_GT1 )
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_EHL
|
||||
DEVICE( IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID, EHL_1x4x8, GTTYPE_GT1 )
|
||||
DEVICE( IEHL_1x2x4_DEVICE_A0_ID, EHL_1x2x4, GTTYPE_GT1 )
|
||||
DEVICE( IEHL_1x4x4_DEVICE_A0_ID, EHL_1x4x4, GTTYPE_GT1 )
|
||||
DEVICE( IEHL_1x4x8_DEVICE_A0_ID, EHL_1x4x8, GTTYPE_GT1 )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_GEN9
|
||||
|
||||
@@ -19,4 +19,8 @@ static EnableGfxProductHw<IGFX_ICELAKE_LP> enableGfxProductHwICLLP;
|
||||
static EnableGfxProductHw<IGFX_LAKEFIELD> enableGfxProductHwLKF;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_EHL
|
||||
static EnableGfxProductHw<IGFX_ELKHARTLAKE> enableGfxProductHwEHL;
|
||||
#endif
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -17,5 +17,8 @@ static EnableProductHwInfoConfig<IGFX_ICELAKE_LP> enableICLLP;
|
||||
#ifdef SUPPORT_LKF
|
||||
static EnableProductHwInfoConfig<IGFX_LAKEFIELD> enableLKF;
|
||||
#endif
|
||||
#ifdef SUPPORT_EHL
|
||||
static EnableProductHwInfoConfig<IGFX_ELKHARTLAKE> enableEHL;
|
||||
#endif
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -12,3 +12,6 @@
|
||||
#ifdef SUPPORT_LKF
|
||||
#include "hw_cmds_lkf.h"
|
||||
#endif
|
||||
#ifdef SUPPORT_EHL
|
||||
#include "hw_cmds_ehl.h"
|
||||
#endif
|
||||
|
||||
54
runtime/gen11/hw_cmds_ehl.h
Normal file
54
runtime/gen11/hw_cmds_ehl.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/gen11/hw_cmds_base.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct EHL : public ICLFamily {
|
||||
static const PLATFORM platform;
|
||||
static const HardwareInfo hwInfo;
|
||||
static FeatureTable featureTable;
|
||||
static WorkaroundTable workaroundTable;
|
||||
static const uint32_t threadsPerEu = 7;
|
||||
static const uint32_t maxEuPerSubslice = 8;
|
||||
static const uint32_t maxSlicesSupported = 1;
|
||||
static const uint32_t maxSubslicesSupported = 4;
|
||||
static const RuntimeCapabilityTable capabilityTable;
|
||||
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const std::string &hwInfoConfig);
|
||||
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
|
||||
};
|
||||
|
||||
class EHL_1x2x4 : public EHL {
|
||||
public:
|
||||
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class EHL_1x4x4 : public EHL {
|
||||
public:
|
||||
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
class EHL_1x4x8 : public EHL {
|
||||
public:
|
||||
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
|
||||
static const HardwareInfo hwInfo;
|
||||
|
||||
private:
|
||||
static GT_SYSTEM_INFO gtSystemInfo;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
@@ -12,3 +12,6 @@
|
||||
#ifdef SUPPORT_LKF
|
||||
#include "hw_info_lkf.h"
|
||||
#endif
|
||||
#ifdef SUPPORT_EHL
|
||||
#include "hw_info_ehl.h"
|
||||
#endif
|
||||
|
||||
23
runtime/gen11/hw_info_ehl.h
Normal file
23
runtime/gen11/hw_info_ehl.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "hw_info_gen11.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
struct EHL;
|
||||
|
||||
template <>
|
||||
struct HwMapper<IGFX_ELKHARTLAKE> {
|
||||
enum { gfxFamily = IGFX_GEN11_CORE };
|
||||
|
||||
static const char *abbreviation;
|
||||
typedef GfxFamilyMapper<static_cast<GFXCORE_FAMILY>(gfxFamily)>::GfxFamily GfxFamily;
|
||||
typedef EHL GfxProduct;
|
||||
};
|
||||
} // namespace NEO
|
||||
225
runtime/gen11/hw_info_ehl.inl
Normal file
225
runtime/gen11/hw_info_ehl.inl
Normal file
@@ -0,0 +1,225 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/aub_mem_dump/aub_services.h"
|
||||
#include "runtime/memory_manager/memory_constants.h"
|
||||
|
||||
#include "engine_node.h"
|
||||
#include "hw_cmds_ehl.h"
|
||||
#include "hw_info_ehl.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
const char *HwMapper<IGFX_ELKHARTLAKE>::abbreviation = "ehl";
|
||||
|
||||
bool isSimulationEHL(unsigned short deviceId) {
|
||||
switch (deviceId) {
|
||||
case IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
const PLATFORM EHL::platform = {
|
||||
IGFX_ELKHARTLAKE,
|
||||
PCH_UNKNOWN,
|
||||
IGFX_GEN11_CORE,
|
||||
IGFX_GEN11_CORE,
|
||||
PLATFORM_NONE, // default init
|
||||
0, // usDeviceID
|
||||
0, // usRevId. 0 sets the stepping to A0
|
||||
0, // usDeviceID_PCH
|
||||
0, // usRevId_PCH
|
||||
GTTYPE_UNDEFINED};
|
||||
|
||||
const RuntimeCapabilityTable EHL::capabilityTable{
|
||||
{0, 0, 0, false, false, false}, // kmdNotifyProperties
|
||||
{true, false}, // whitelistedRegisters
|
||||
MemoryConstants::max36BitAddress, // gpuAddressSpace
|
||||
83.333, // defaultProfilingTimerResolution
|
||||
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
||||
&isSimulationEHL, // isSimulation
|
||||
PreemptionMode::MidThread, // defaultPreemptionMode
|
||||
aub_stream::ENGINE_RCS, // defaultEngineType
|
||||
0, // maxRenderFrequency
|
||||
12, // clVersionSupport
|
||||
CmdServicesMemTraceVersion::DeviceValues::Ehl, // aubDeviceId
|
||||
1, // extraQuantityThreadsPerEU
|
||||
64, // slmSize
|
||||
false, // blitterOperationsSupported
|
||||
false, // ftrSupportsFP64
|
||||
false, // ftrSupports64BitMath
|
||||
false, // ftrSvm
|
||||
true, // ftrSupportsCoherency
|
||||
true, // ftrSupportsVmeAvcTextureSampler
|
||||
true, // ftrSupportsVmeAvcPreemption
|
||||
false, // ftrRenderCompressedBuffers
|
||||
false, // ftrRenderCompressedImages
|
||||
true, // ftr64KBpages
|
||||
true, // instrumentationEnabled
|
||||
true, // forceStatelessCompilationFor32Bit
|
||||
false, // isCore
|
||||
true, // sourceLevelDebuggerSupported
|
||||
true, // supportsVme
|
||||
false, // supportCacheFlushAfterWalker
|
||||
true // supportsImages
|
||||
};
|
||||
|
||||
WorkaroundTable EHL::workaroundTable = {};
|
||||
FeatureTable EHL::featureTable = {};
|
||||
|
||||
void EHL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
FeatureTable *featureTable = &hwInfo->featureTable;
|
||||
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
|
||||
|
||||
featureTable->ftrL3IACoherency = true;
|
||||
featureTable->ftrPPGTT = true;
|
||||
featureTable->ftrSVM = true;
|
||||
featureTable->ftrIA32eGfxPTEs = true;
|
||||
featureTable->ftrStandardMipTailFormat = true;
|
||||
|
||||
featureTable->ftrDisplayYTiling = true;
|
||||
featureTable->ftrTranslationTable = true;
|
||||
featureTable->ftrUserModeTranslationTable = true;
|
||||
featureTable->ftrTileMappedResource = true;
|
||||
featureTable->ftrEnableGuC = true;
|
||||
|
||||
featureTable->ftrFbc = true;
|
||||
featureTable->ftrFbc2AddressTranslation = true;
|
||||
featureTable->ftrFbcBlitterTracking = true;
|
||||
featureTable->ftrFbcCpuTracking = true;
|
||||
featureTable->ftrTileY = true;
|
||||
|
||||
featureTable->ftrAstcHdr2D = true;
|
||||
featureTable->ftrAstcLdr2D = true;
|
||||
|
||||
featureTable->ftr3dMidBatchPreempt = true;
|
||||
featureTable->ftrGpGpuMidBatchPreempt = true;
|
||||
featureTable->ftrGpGpuMidThreadLevelPreempt = true;
|
||||
featureTable->ftrGpGpuThreadGroupLevelPreempt = true;
|
||||
featureTable->ftrPerCtxtPreemptionGranularityControl = true;
|
||||
|
||||
workaroundTable->wa4kAlignUVOffsetNV12LinearSurface = true;
|
||||
workaroundTable->waReportPerfCountUseGlobalContextID = true;
|
||||
};
|
||||
|
||||
const HardwareInfo EHL_1x2x4::hwInfo = {
|
||||
&EHL::platform,
|
||||
&EHL::featureTable,
|
||||
&EHL::workaroundTable,
|
||||
&EHL_1x2x4::gtSystemInfo,
|
||||
EHL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO EHL_1x2x4::gtSystemInfo = {0};
|
||||
void EHL_1x2x4::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->EUCount = 8;
|
||||
gtSysInfo->ThreadCount = 7 * EHL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 2;
|
||||
gtSysInfo->L3CacheSizeInKb = 1280;
|
||||
gtSysInfo->L3BankCount = 4;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 56;
|
||||
gtSysInfo->TotalHsThreads = 56;
|
||||
gtSysInfo->TotalDsThreads = 56;
|
||||
gtSysInfo->TotalGsThreads = 56;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = EHL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = EHL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = EHL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
};
|
||||
|
||||
const HardwareInfo EHL_1x4x4::hwInfo = {
|
||||
&EHL::platform,
|
||||
&EHL::featureTable,
|
||||
&EHL::workaroundTable,
|
||||
&EHL_1x4x4::gtSystemInfo,
|
||||
EHL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO EHL_1x4x4::gtSystemInfo = {0};
|
||||
void EHL_1x4x4::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->EUCount = 16;
|
||||
gtSysInfo->ThreadCount = 7 * EHL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 4;
|
||||
gtSysInfo->L3CacheSizeInKb = 1280;
|
||||
gtSysInfo->L3BankCount = 4;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 112;
|
||||
gtSysInfo->TotalHsThreads = 112;
|
||||
gtSysInfo->TotalDsThreads = 112;
|
||||
gtSysInfo->TotalGsThreads = 112;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = EHL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = EHL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = EHL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
};
|
||||
|
||||
const HardwareInfo EHL_1x4x8::hwInfo = {
|
||||
&EHL::platform,
|
||||
&EHL::featureTable,
|
||||
&EHL::workaroundTable,
|
||||
&EHL_1x4x8::gtSystemInfo,
|
||||
EHL::capabilityTable,
|
||||
};
|
||||
GT_SYSTEM_INFO EHL_1x4x8::gtSystemInfo = {0};
|
||||
void EHL_1x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->EUCount = 32;
|
||||
gtSysInfo->ThreadCount = 7 * EHL::threadsPerEu;
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 4;
|
||||
gtSysInfo->L3CacheSizeInKb = 1280;
|
||||
gtSysInfo->L3BankCount = 4;
|
||||
gtSysInfo->MaxFillRate = 8;
|
||||
gtSysInfo->TotalVsThreads = 224;
|
||||
gtSysInfo->TotalHsThreads = 224;
|
||||
gtSysInfo->TotalDsThreads = 224;
|
||||
gtSysInfo->TotalGsThreads = 224;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = EHL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = EHL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = EHL::maxSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
};
|
||||
|
||||
const HardwareInfo EHL::hwInfo = EHL_1x4x8::hwInfo;
|
||||
|
||||
void setupEHLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const std::string &hwInfoConfig) {
|
||||
if (hwInfoConfig == "1x4x8") {
|
||||
EHL_1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else if (hwInfoConfig == "1x4x4") {
|
||||
EHL_1x4x4::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else if (hwInfoConfig == "1x2x4") {
|
||||
EHL_1x2x4::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else if (hwInfoConfig == "default") {
|
||||
// Default config
|
||||
EHL_1x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
|
||||
} else {
|
||||
UNRECOVERABLE_IF(true);
|
||||
}
|
||||
}
|
||||
void (*EHL::setupHardwareInfo)(HardwareInfo *, bool, const std::string &) = setupEHLHardwareInfoImpl;
|
||||
} // namespace NEO
|
||||
@@ -11,6 +11,9 @@
|
||||
#ifdef SUPPORT_LKF
|
||||
#include "hw_info_lkf.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_EHL
|
||||
#include "hw_info_ehl.inl"
|
||||
#endif
|
||||
|
||||
namespace NEO {
|
||||
const char *GfxFamilyMapper<IGFX_GEN11_CORE>::name = "Gen11";
|
||||
|
||||
26
runtime/gen11/linux/hw_info_config_ehl.inl
Normal file
26
runtime/gen11/linux/hw_info_config_ehl.inl
Normal file
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/os_interface/hw_info_config.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_ELKHARTLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
if (nullptr == osIface) {
|
||||
return 0;
|
||||
}
|
||||
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
|
||||
|
||||
gtSystemInfo->SliceCount = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_ELKHARTLAKE>;
|
||||
} // namespace NEO
|
||||
@@ -14,3 +14,6 @@
|
||||
#ifdef SUPPORT_LKF
|
||||
#include "hw_info_config_lkf.inl"
|
||||
#endif
|
||||
#ifdef SUPPORT_EHL
|
||||
#include "hw_info_config_ehl.inl"
|
||||
#endif
|
||||
|
||||
@@ -29,4 +29,12 @@ int HwInfoConfigHw<IGFX_LAKEFIELD>::configureHardwareCustom(HardwareInfo *hwInfo
|
||||
template class HwInfoConfigHw<IGFX_LAKEFIELD>;
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_EHL
|
||||
template <>
|
||||
int HwInfoConfigHw<IGFX_ELKHARTLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
template class HwInfoConfigHw<IGFX_ELKHARTLAKE>;
|
||||
#endif
|
||||
} // namespace NEO
|
||||
|
||||
15
unit_tests/gen11/ehl/CMakeLists.txt
Normal file
15
unit_tests/gen11/ehl/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(TESTS_EHL)
|
||||
set(IGDRCL_SRCS_tests_gen11_ehl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_ehl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_ehl.cpp
|
||||
)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl})
|
||||
add_subdirectories()
|
||||
endif()
|
||||
14
unit_tests/gen11/ehl/linux/CMakeLists.txt
Normal file
14
unit_tests/gen11/ehl/linux/CMakeLists.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(IGDRCL_SRCS_tests_gen11_ehl_linux
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_ehl.cpp
|
||||
)
|
||||
if(UNIX)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl_linux})
|
||||
add_subdirectory(dll)
|
||||
endif()
|
||||
11
unit_tests/gen11/ehl/linux/dll/CMakeLists.txt
Normal file
11
unit_tests/gen11/ehl/linux/dll/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(IGDRCL_SRCS_linux_dll_tests_gen11_ehl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_ehl.cpp
|
||||
)
|
||||
target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen11_ehl})
|
||||
41
unit_tests/gen11/ehl/linux/dll/device_id_tests_ehl.cpp
Normal file
41
unit_tests/gen11/ehl/linux/dll/device_id_tests_ehl.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/os_interface/linux/drm_neo.h"
|
||||
#include "test.h"
|
||||
|
||||
#include "hw_cmds.h"
|
||||
|
||||
#include <array>
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(EhlDeviceIdTest, supportedDeviceId) {
|
||||
std::array<DeviceDescriptor, 4> expectedDescriptors = {{
|
||||
{IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID, &EHL_1x4x8::hwInfo, &EHL_1x4x8::setupHardwareInfo, GTTYPE_GT1},
|
||||
{IEHL_1x2x4_DEVICE_A0_ID, &EHL_1x2x4::hwInfo, &EHL_1x2x4::setupHardwareInfo, GTTYPE_GT1},
|
||||
{IEHL_1x4x4_DEVICE_A0_ID, &EHL_1x4x4::hwInfo, &EHL_1x4x4::setupHardwareInfo, GTTYPE_GT1},
|
||||
{IEHL_1x4x8_DEVICE_A0_ID, &EHL_1x4x8::hwInfo, &EHL_1x4x8::setupHardwareInfo, GTTYPE_GT1},
|
||||
}};
|
||||
|
||||
auto compareStructs = [](const DeviceDescriptor *first, const DeviceDescriptor *second) {
|
||||
return first->deviceId == second->deviceId && first->pHwInfo == second->pHwInfo &&
|
||||
first->setupHardwareInfo == second->setupHardwareInfo && first->eGtType == second->eGtType;
|
||||
};
|
||||
|
||||
size_t startIndex = 0;
|
||||
while (!compareStructs(&expectedDescriptors[0], &deviceDescriptorTable[startIndex]) &&
|
||||
deviceDescriptorTable[startIndex].deviceId != 0) {
|
||||
startIndex++;
|
||||
};
|
||||
EXPECT_NE(0u, deviceDescriptorTable[startIndex].deviceId);
|
||||
|
||||
for (auto &expected : expectedDescriptors) {
|
||||
EXPECT_TRUE(compareStructs(&expected, &deviceDescriptorTable[startIndex]));
|
||||
startIndex++;
|
||||
}
|
||||
}
|
||||
85
unit_tests/gen11/ehl/linux/hw_info_config_tests_ehl.cpp
Normal file
85
unit_tests/gen11/ehl/linux/hw_info_config_tests_ehl.cpp
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "unit_tests/helpers/gtest_helpers.h"
|
||||
#include "unit_tests/os_interface/linux/hw_info_config_linux_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
struct HwInfoConfigTestLinuxEhl : HwInfoConfigTestLinux {
|
||||
void SetUp() override {
|
||||
HwInfoConfigTestLinux::SetUp();
|
||||
|
||||
drm->StoredDeviceID = IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID;
|
||||
drm->setGtType(GTTYPE_GT1);
|
||||
drm->StoredSSVal = 8;
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(HwInfoConfigTestLinuxEhl, configureHwInfoEhl) {
|
||||
auto hwInfoConfig = HwInfoConfigHw<IGFX_ELKHARTLAKE>::get();
|
||||
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(0, ret);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.platform.usDeviceID);
|
||||
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.platform.usRevId);
|
||||
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.gtSystemInfo.EUCount);
|
||||
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(1u, outHwInfo.gtSystemInfo.SliceCount);
|
||||
|
||||
EXPECT_EQ(GTTYPE_GT1, outHwInfo.platform.eGTType);
|
||||
EXPECT_TRUE(outHwInfo.featureTable.ftrGT1);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGT1_5);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGT2);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGT3);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGT4);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGTA);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGTC);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrGTX);
|
||||
EXPECT_FALSE(outHwInfo.featureTable.ftrTileY);
|
||||
}
|
||||
|
||||
TEST_F(HwInfoConfigTestLinuxEhl, negative) {
|
||||
auto hwInfoConfig = HwInfoConfigHw<IGFX_ELKHARTLAKE>::get();
|
||||
|
||||
drm->StoredRetValForDeviceID = -1;
|
||||
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->StoredRetValForDeviceID = 0;
|
||||
drm->StoredRetValForDeviceRevID = -1;
|
||||
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->StoredRetValForDeviceRevID = 0;
|
||||
drm->StoredRetValForEUVal = -1;
|
||||
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-1, ret);
|
||||
|
||||
drm->StoredRetValForEUVal = 0;
|
||||
drm->StoredRetValForSSVal = -1;
|
||||
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
|
||||
EXPECT_EQ(-1, ret);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class EhlHwInfoTests : public ::testing::Test {};
|
||||
typedef ::testing::Types<EHL_1x4x8> ehlTestTypes;
|
||||
TYPED_TEST_CASE(EhlHwInfoTests, ehlTestTypes);
|
||||
TYPED_TEST(EhlHwInfoTests, gtSetupIsCorrect) {
|
||||
HardwareInfo hwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
gtSystemInfo = {};
|
||||
|
||||
TypeParam::setupHardwareInfo(&hwInfo, false);
|
||||
EXPECT_GT(gtSystemInfo.EUCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.ThreadCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.SliceCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.SubSliceCount, 0u);
|
||||
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
|
||||
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
35
unit_tests/gen11/ehl/test_device_caps_ehl.cpp
Normal file
35
unit_tests/gen11/ehl/test_device_caps_ehl.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
#include "unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using EhlTest = Test<DeviceFixture>;
|
||||
|
||||
EHLTEST_F(EhlTest, givenDeviceIdWhenAskingForSimulationThenReturnValidValue) {
|
||||
unsigned short ehlSimulationIds[2] = {
|
||||
IEHL_1x4x8_SUPERSKU_DEVICE_A0_ID,
|
||||
0, // default, non-simulation
|
||||
};
|
||||
|
||||
for (auto id : ehlSimulationIds) {
|
||||
auto mockDevice = std::unique_ptr<MockDevice>(createWithUsDeviceId(id));
|
||||
EXPECT_NE(nullptr, mockDevice);
|
||||
|
||||
if (id == 0) {
|
||||
EXPECT_FALSE(mockDevice->isSimulation());
|
||||
} else {
|
||||
EXPECT_TRUE(mockDevice->isSimulation());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EHLTEST_F(EhlTest, givenEhlWhenSlmSizeIsRequiredThenReturnCorrectValue) {
|
||||
EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize);
|
||||
}
|
||||
104
unit_tests/gen11/ehl/test_hw_info_config_ehl.cpp
Normal file
104
unit_tests/gen11/ehl/test_hw_info_config_ehl.cpp
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
TEST(EhlHwInfoConfig, givenHwInfoConfigStringThenAfterSetupResultingHwInfoIsCorrect) {
|
||||
if (IGFX_ELKHARTLAKE != productFamily) {
|
||||
return;
|
||||
}
|
||||
HardwareInfo hwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
std::string strConfig = "1x4x8";
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(4u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(32u, gtSystemInfo.EUCount);
|
||||
|
||||
strConfig = "1x4x4";
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(4u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(16u, gtSystemInfo.EUCount);
|
||||
|
||||
strConfig = "1x2x4";
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(2u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(8u, gtSystemInfo.EUCount);
|
||||
|
||||
strConfig = "default";
|
||||
gtSystemInfo = {0};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
|
||||
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(4u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(32u, gtSystemInfo.EUCount);
|
||||
|
||||
strConfig = "erroneous";
|
||||
gtSystemInfo = {0};
|
||||
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, strConfig));
|
||||
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
|
||||
EXPECT_EQ(0u, gtSystemInfo.EUCount);
|
||||
}
|
||||
|
||||
using EhlHwInfo = ::testing::Test;
|
||||
|
||||
EHLTEST_F(EhlHwInfo, givenBoolWhenCallEhlHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
|
||||
bool boolValue[]{
|
||||
true, false};
|
||||
HardwareInfo hwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
FeatureTable &featureTable = hwInfo.featureTable;
|
||||
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
|
||||
|
||||
std::string strConfig[] = {
|
||||
"1x4x8",
|
||||
"1x4x4",
|
||||
"1x2x4"};
|
||||
|
||||
for (auto &config : strConfig) {
|
||||
for (auto setParamBool : boolValue) {
|
||||
|
||||
gtSystemInfo = {0};
|
||||
featureTable = {};
|
||||
workaroundTable = {};
|
||||
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
|
||||
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrL3IACoherency);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrPPGTT);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrSVM);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrIA32eGfxPTEs);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrStandardMipTailFormat);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrDisplayYTiling);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrUserModeTranslationTable);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrTileMappedResource);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrEnableGuC);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrFbc);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrFbc2AddressTranslation);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrFbcBlitterTracking);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrFbcCpuTracking);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrTileY);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrAstcHdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrAstcLdr2D);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftr3dMidBatchPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuMidBatchPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuMidThreadLevelPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuThreadGroupLevelPreempt);
|
||||
EXPECT_EQ(setParamBool, featureTable.ftrPerCtxtPreemptionGranularityControl);
|
||||
|
||||
EXPECT_EQ(setParamBool, workaroundTable.wa4kAlignUVOffsetNV12LinearSurface);
|
||||
EXPECT_EQ(setParamBool, workaroundTable.waReportPerfCountUseGlobalContextID);
|
||||
}
|
||||
}
|
||||
}
|
||||
13
unit_tests/gen11/ehl/windows/CMakeLists.txt
Normal file
13
unit_tests/gen11/ehl/windows/CMakeLists.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(IGDRCL_SRCS_tests_gen11_ehl_windows
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_ehl.cpp
|
||||
)
|
||||
if(WIN32)
|
||||
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen11_ehl_windows})
|
||||
endif()
|
||||
22
unit_tests/gen11/ehl/windows/hw_info_config_tests_ehl.cpp
Normal file
22
unit_tests/gen11/ehl/windows/hw_info_config_tests_ehl.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/os_interface/windows/os_interface.h"
|
||||
#include "unit_tests/os_interface/windows/hw_info_config_win_tests.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
||||
using HwInfoConfigTestWindowsEhl = HwInfoConfigTestWindows;
|
||||
|
||||
EHLTEST_F(HwInfoConfigTestWindowsEhl, whenCallAdjustPlatformThenDoNothing) {
|
||||
EXPECT_EQ(IGFX_ELKHARTLAKE, productFamily);
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
hwInfoConfig->adjustPlatformForProductFamily(&outHwInfo);
|
||||
|
||||
int ret = memcmp(&outHwInfo.platform, &pInHwInfo.platform, sizeof(PLATFORM));
|
||||
EXPECT_EQ(0, ret);
|
||||
}
|
||||
@@ -631,6 +631,14 @@ extern GFXCORE_FAMILY renderCoreFamily;
|
||||
FAMILYTEST_TEST_P(test_suite_name, test_name, \
|
||||
IGFX_GEN11_CORE, \
|
||||
IGFX_LAKEFIELD)
|
||||
#define EHLTEST_F(test_fixture, test_name) \
|
||||
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
|
||||
::testing::internal::GetTypeId<test_fixture>(), \
|
||||
IGFX_GEN11_CORE, IGFX_ELKHARTLAKE)
|
||||
#define EHLTEST_P(test_suite_name, test_name) \
|
||||
FAMILYTEST_TEST_P(test_suite_name, test_name, \
|
||||
IGFX_GEN11_CORE, \
|
||||
IGFX_ELKHARTLAKE)
|
||||
#endif
|
||||
#define HWTEST_TYPED_TEST(CaseName, TestName) \
|
||||
CHECK_TEST_NAME_LENGTH(CaseName, TestName) \
|
||||
|
||||
Reference in New Issue
Block a user