mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 03:01:20 +08:00
For all of the devices, preferredPlatformName is initialized with nullptr by default and platform name will be initialized to driver's default platform name, at the moment this is "Intel(R) OpenCL Graphics". When Platform is initialized and preferredPlatformName is not nullptr then Platform name will be set to the value stored in preferredPlatformName. Add ENABLE_LEGACY_PLATFORM_NAME AIL enum related to added functionality. Move PlatformInfo to NEO namespace. Related-To: HSD-22018809561 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
258 lines
12 KiB
C++
258 lines
12 KiB
C++
/*
|
|
* Copyright (C) 2018-2023 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "shared/source/aub_mem_dump/definitions/aub_services.h"
|
|
#include "shared/source/command_stream/preemption_mode.h"
|
|
#include "shared/source/gen9/hw_cmds_skl.h"
|
|
#include "shared/source/helpers/compiler_product_helper.h"
|
|
#include "shared/source/helpers/constants.h"
|
|
|
|
#include "aubstream/engine_node.h"
|
|
|
|
namespace NEO {
|
|
|
|
const char *HwMapper<IGFX_SKYLAKE>::abbreviation = "skl";
|
|
|
|
const PLATFORM SKL::platform = {
|
|
IGFX_SKYLAKE,
|
|
PCH_UNKNOWN,
|
|
IGFX_GEN9_CORE,
|
|
IGFX_GEN9_CORE,
|
|
PLATFORM_NONE, // default init
|
|
0, // usDeviceID
|
|
9, // usRevId. 0 sets the stepping to A0
|
|
0, // usDeviceID_PCH
|
|
0, // usRevId_PCH
|
|
GTTYPE_UNDEFINED};
|
|
|
|
const RuntimeCapabilityTable SKL::capabilityTable{
|
|
EngineDirectSubmissionInitVec{
|
|
{aub_stream::ENGINE_RCS, {true, true}}}, // directSubmissionEngines
|
|
{0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties
|
|
MemoryConstants::max48BitAddress, // gpuAddressSpace
|
|
0, // sharedSystemMemCapabilities
|
|
83.333, // defaultProfilingTimerResolution
|
|
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
|
|
"", // deviceName
|
|
nullptr, // preferredPlatformName
|
|
PreemptionMode::MidThread, // defaultPreemptionMode
|
|
aub_stream::ENGINE_RCS, // defaultEngineType
|
|
0, // maxRenderFrequency
|
|
30, // clVersionSupport
|
|
CmdServicesMemTraceVersion::DeviceValues::Skl, // aubDeviceId
|
|
0, // extraQuantityThreadsPerEU
|
|
64, // slmSize
|
|
sizeof(SKL::GRF), // grfSize
|
|
36u, // timestampValidBits
|
|
32u, // kernelTimestampValidBits
|
|
false, // blitterOperationsSupported
|
|
true, // ftrSupportsInteger64BitAtomics
|
|
true, // ftrSupportsFP64
|
|
false, // ftrSupportsFP64Emulation
|
|
true, // ftrSupports64BitMath
|
|
true, // ftrSvm
|
|
true, // ftrSupportsCoherency
|
|
true, // ftrSupportsVmeAvcTextureSampler
|
|
false, // ftrSupportsVmeAvcPreemption
|
|
false, // ftrRenderCompressedBuffers
|
|
false, // ftrRenderCompressedImages
|
|
true, // ftr64KBpages
|
|
true, // instrumentationEnabled
|
|
true, // supportsVme
|
|
false, // supportCacheFlushAfterWalker
|
|
true, // supportsImages
|
|
false, // supportsDeviceEnqueue
|
|
true, // supportsPipes
|
|
true, // supportsOcl21Features
|
|
false, // supportsOnDemandPageFaults
|
|
true, // supportsIndependentForwardProgress
|
|
true, // hostPtrTrackingEnabled
|
|
true, // levelZeroSupported
|
|
true, // isIntegratedDevice
|
|
true, // supportsMediaBlock
|
|
false, // p2pAccessSupported
|
|
false, // p2pAtomicAccessSupported
|
|
false, // fusedEuEnabled
|
|
false, // l0DebuggerSupported;
|
|
false // supportsFloatAtomics
|
|
};
|
|
|
|
WorkaroundTable SKL::workaroundTable = {};
|
|
FeatureTable SKL::featureTable = {};
|
|
void SKL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
|
FeatureTable *featureTable = &hwInfo->featureTable;
|
|
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
|
|
|
|
featureTable->flags.ftrGpGpuMidBatchPreempt = true;
|
|
featureTable->flags.ftrGpGpuThreadGroupLevelPreempt = true;
|
|
featureTable->flags.ftrL3IACoherency = true;
|
|
featureTable->flags.ftrGpGpuMidThreadLevelPreempt = true;
|
|
featureTable->flags.ftrPPGTT = true;
|
|
featureTable->flags.ftrSVM = true;
|
|
featureTable->flags.ftrIA32eGfxPTEs = true;
|
|
featureTable->flags.ftrDisplayYTiling = true;
|
|
featureTable->flags.ftrTranslationTable = true;
|
|
featureTable->flags.ftrUserModeTranslationTable = true;
|
|
featureTable->flags.ftrFbc = true;
|
|
featureTable->flags.ftrTileY = true;
|
|
|
|
workaroundTable->flags.waSendMIFLUSHBeforeVFE = true;
|
|
workaroundTable->flags.waDisableLSQCROPERFforOCL = true;
|
|
workaroundTable->flags.waMsaa8xTileYDepthPitchAlignment = true;
|
|
workaroundTable->flags.waLosslessCompressionSurfaceStride = true;
|
|
workaroundTable->flags.waFbcLinearSurfaceStride = true;
|
|
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
|
|
workaroundTable->flags.waEncryptedEdramOnlyPartials = true;
|
|
workaroundTable->flags.waDisableEdramForDisplayRT = true;
|
|
workaroundTable->flags.waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
|
|
|
|
if ((1 << hwInfo->platform.usRevId) & 0x0eu) {
|
|
workaroundTable->flags.waCompressedResourceRequiresConstVA21 = true;
|
|
}
|
|
if ((1 << hwInfo->platform.usRevId) & 0x0fu) {
|
|
workaroundTable->flags.waDisablePerCtxtPreemptionGranularityControl = true;
|
|
workaroundTable->flags.waModifyVFEStateAfterGPGPUPreemption = true;
|
|
}
|
|
if ((1 << hwInfo->platform.usRevId) & 0x3f) {
|
|
workaroundTable->flags.waCSRUncachable = true;
|
|
}
|
|
}
|
|
|
|
void SKL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->ThreadCount = gtSysInfo->EUCount * compilerProductHelper.getNumThreadsPerEu();
|
|
gtSysInfo->TotalVsThreads = 336;
|
|
gtSysInfo->TotalHsThreads = 336;
|
|
gtSysInfo->TotalDsThreads = 336;
|
|
gtSysInfo->TotalGsThreads = 336;
|
|
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
|
gtSysInfo->CsrSizeInMb = 8;
|
|
gtSysInfo->MaxEuPerSubSlice = SKL::maxEuPerSubslice;
|
|
gtSysInfo->MaxSlicesSupported = SKL::maxSlicesSupported;
|
|
gtSysInfo->MaxSubSlicesSupported = SKL::maxSubslicesSupported;
|
|
gtSysInfo->IsL3HashModeEnabled = false;
|
|
gtSysInfo->IsDynamicallyPopulated = false;
|
|
|
|
if (setupFeatureTableAndWorkaroundTable) {
|
|
setupFeatureAndWorkaroundTable(hwInfo);
|
|
}
|
|
}
|
|
|
|
const HardwareInfo SklHw1x2x6::hwInfo = {
|
|
&SKL::platform,
|
|
&SKL::featureTable,
|
|
&SKL::workaroundTable,
|
|
&SklHw1x2x6::gtSystemInfo,
|
|
SKL::capabilityTable};
|
|
|
|
GT_SYSTEM_INFO SklHw1x2x6::gtSystemInfo = {0};
|
|
void SklHw1x2x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->SliceCount = 1;
|
|
gtSysInfo->L3CacheSizeInKb = 384;
|
|
gtSysInfo->L3BankCount = 2;
|
|
gtSysInfo->MaxFillRate = 8;
|
|
};
|
|
|
|
const HardwareInfo SklHw1x3x6::hwInfo = {
|
|
&SKL::platform,
|
|
&SKL::featureTable,
|
|
&SKL::workaroundTable,
|
|
&SklHw1x3x6::gtSystemInfo,
|
|
SKL::capabilityTable};
|
|
|
|
GT_SYSTEM_INFO SklHw1x3x6::gtSystemInfo = {0};
|
|
void SklHw1x3x6::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->SliceCount = 1;
|
|
gtSysInfo->L3CacheSizeInKb = 768;
|
|
gtSysInfo->L3BankCount = 4;
|
|
gtSysInfo->MaxFillRate = 8;
|
|
};
|
|
|
|
const HardwareInfo SklHw1x3x8::hwInfo = {
|
|
&SKL::platform,
|
|
&SKL::featureTable,
|
|
&SKL::workaroundTable,
|
|
&SklHw1x3x8::gtSystemInfo,
|
|
SKL::capabilityTable};
|
|
|
|
GT_SYSTEM_INFO SklHw1x3x8::gtSystemInfo = {0};
|
|
void SklHw1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->SliceCount = 1;
|
|
gtSysInfo->L3CacheSizeInKb = 768;
|
|
gtSysInfo->L3BankCount = 4;
|
|
gtSysInfo->MaxFillRate = 8;
|
|
};
|
|
|
|
const HardwareInfo SklHw2x3x8::hwInfo = {
|
|
&SKL::platform,
|
|
&SKL::featureTable,
|
|
&SKL::workaroundTable,
|
|
&SklHw2x3x8::gtSystemInfo,
|
|
SKL::capabilityTable};
|
|
|
|
GT_SYSTEM_INFO SklHw2x3x8::gtSystemInfo = {0};
|
|
void SklHw2x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->SliceCount = 2;
|
|
gtSysInfo->L3CacheSizeInKb = 1536;
|
|
gtSysInfo->L3BankCount = 8;
|
|
gtSysInfo->MaxFillRate = 16;
|
|
};
|
|
|
|
const HardwareInfo SklHw3x3x8::hwInfo = {
|
|
&SKL::platform,
|
|
&SKL::featureTable,
|
|
&SKL::workaroundTable,
|
|
&SklHw3x3x8::gtSystemInfo,
|
|
SKL::capabilityTable};
|
|
|
|
GT_SYSTEM_INFO SklHw3x3x8::gtSystemInfo = {0};
|
|
void SklHw3x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const CompilerProductHelper &compilerProductHelper) {
|
|
setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
|
|
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
|
gtSysInfo->SliceCount = 3;
|
|
gtSysInfo->L3CacheSizeInKb = 2304;
|
|
gtSysInfo->L3BankCount = 12;
|
|
gtSysInfo->MaxFillRate = 24;
|
|
};
|
|
|
|
const HardwareInfo SKL::hwInfo = SklHw1x3x8::hwInfo;
|
|
|
|
void setupSKLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const CompilerProductHelper &compilerProductHelper) {
|
|
if (hwInfoConfig == 0x100030008) {
|
|
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else if (hwInfoConfig == 0x200030008) {
|
|
SklHw2x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else if (hwInfoConfig == 0x300030008) {
|
|
SklHw3x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else if (hwInfoConfig == 0x100020006) {
|
|
SklHw1x2x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else if (hwInfoConfig == 0x100030006) {
|
|
SklHw1x3x6::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else if (hwInfoConfig == 0x0) {
|
|
// Default config
|
|
SklHw1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, compilerProductHelper);
|
|
} else {
|
|
UNRECOVERABLE_IF(true);
|
|
}
|
|
}
|
|
|
|
void (*SKL::setupHardwareInfo)(HardwareInfo *, bool, uint64_t, const CompilerProductHelper &) = setupSKLHardwareInfoImpl;
|
|
} // namespace NEO
|