mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 13:54:58 +08:00
fix: extract common logic for filling default gt system info
gt system info should be queried from KMD Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1702526c40
commit
66d4d141e1
@@ -19,7 +19,7 @@ namespace L0 {
|
||||
template <typename Family>
|
||||
void L0GfxCoreHelperHw<Family>::getAttentionBitmaskForSingleThreads(const std::vector<EuThread::ThreadId> &threads, const NEO::HardwareInfo &hwInfo, std::unique_ptr<uint8_t[]> &bitmask, size_t &bitmaskSize) const {
|
||||
const uint32_t numSubslicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
const uint32_t numEuPerSubslice = hwInfo.gtSystemInfo.MaxEuPerSubSlice;
|
||||
const uint32_t numEuPerSubslice = std::min(hwInfo.gtSystemInfo.MaxEuPerSubSlice, 8u);
|
||||
const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount);
|
||||
const uint32_t bytesPerEu = alignUp(numThreadsPerEu, 8) / 8;
|
||||
const uint32_t threadsSizePerSlice = numSubslicesPerSlice * numEuPerSubslice * bytesPerEu;
|
||||
|
||||
@@ -23,7 +23,7 @@ void L0GfxCoreHelperHw<Family>::setAdditionalGroupProperty(ze_command_queue_grou
|
||||
template <typename Family>
|
||||
void L0GfxCoreHelperHw<Family>::getAttentionBitmaskForSingleThreads(const std::vector<EuThread::ThreadId> &threads, const NEO::HardwareInfo &hwInfo, std::unique_ptr<uint8_t[]> &bitmask, size_t &bitmaskSize) const {
|
||||
const uint32_t numSubslicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
const uint32_t numEuPerSubslice = hwInfo.gtSystemInfo.MaxEuPerSubSlice;
|
||||
const uint32_t numEuPerSubslice = std::min(hwInfo.gtSystemInfo.MaxEuPerSubSlice, 8u);
|
||||
const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount);
|
||||
const uint32_t bytesPerEu = alignUp(numThreadsPerEu, 8) / 8;
|
||||
const uint32_t threadsSizePerSlice = numSubslicesPerSlice * numEuPerSubslice * bytesPerEu;
|
||||
|
||||
@@ -128,7 +128,12 @@ HWTEST_F(L0GfxCoreHelperTest, givenSliceSubsliceEuAndThreadIdsWhenGettingBitmask
|
||||
};
|
||||
|
||||
auto hwInfo = *NEO::defaultHwInfo.get();
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
const auto threadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount);
|
||||
|
||||
hwInfo.gtSystemInfo.MaxEuPerSubSlice = 16u;
|
||||
hwInfo.gtSystemInfo.EUCount = hwInfo.gtSystemInfo.MaxEuPerSubSlice * hwInfo.gtSystemInfo.SubSliceCount;
|
||||
hwInfo.gtSystemInfo.ThreadCount = hwInfo.gtSystemInfo.EUCount * threadsPerEu;
|
||||
MockExecutionEnvironment executionEnvironment(&hwInfo);
|
||||
auto &l0GfxCoreHelper = executionEnvironment.rootDeviceEnvironments[0]->getHelper<L0GfxCoreHelper>();
|
||||
|
||||
std::unique_ptr<uint8_t[]> bitmask;
|
||||
@@ -137,8 +142,6 @@ HWTEST_F(L0GfxCoreHelperTest, givenSliceSubsliceEuAndThreadIdsWhenGettingBitmask
|
||||
uint32_t subslicesPerSlice = hwInfo.gtSystemInfo.MaxSubSlicesSupported / hwInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
uint32_t subslice = subslicesPerSlice > 1 ? subslicesPerSlice - 1 : 0;
|
||||
|
||||
const auto threadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount);
|
||||
|
||||
auto releaseHelper = executionEnvironment.rootDeviceEnvironments[0]->getReleaseHelper();
|
||||
auto bytesPerEu = releaseHelper ? Math::divideAndRoundUp(releaseHelper->getNumThreadsPerEu(), 8u) : 1u;
|
||||
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/gtest_helpers.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
@@ -297,7 +298,7 @@ TEST(DebugSession, givenAllSlicesWhenGettingSingleThreadsThenCorrectThreadsAreRe
|
||||
auto debugSession = std::make_unique<DebugSessionMock>(config, &deviceImp);
|
||||
|
||||
ze_device_thread_t physicalThread = {UINT32_MAX, 0, 0, 0};
|
||||
const uint32_t numSlices = hwInfo.gtSystemInfo.MaxSlicesSupported;
|
||||
const uint32_t numSlices = neoDevice->getGfxCoreHelper().getHighestEnabledSlice(hwInfo);
|
||||
|
||||
auto threads = debugSession->getSingleThreadsForDevice(0, physicalThread, hwInfo);
|
||||
|
||||
|
||||
@@ -5707,7 +5707,9 @@ TEST_F(DebugApiLinuxTest, GivenSliceALLWhenCallingResumeThenSliceIdIsNotRemapped
|
||||
ze_device_thread_t thread = {};
|
||||
thread.slice = UINT32_MAX;
|
||||
|
||||
for (uint32_t i = 0; i < device->getHwInfo().gtSystemInfo.MaxSlicesSupported; i++) {
|
||||
const auto &hwInfo = device->getHwInfo();
|
||||
auto numSlices = neoDevice->getGfxCoreHelper().getHighestEnabledSlice(hwInfo);
|
||||
for (uint32_t i = 0; i < numSlices; i++) {
|
||||
ze_device_thread_t singleThread = thread;
|
||||
singleThread.slice = i;
|
||||
sessionMock->allThreads[EuThread::ThreadId(0, singleThread)]->stopThread(1u);
|
||||
@@ -6306,7 +6308,7 @@ TEST_F(DebugApiLinuxAttentionTest, GivenSentInterruptWhenHandlingAttEventThenAtt
|
||||
sessionMock->handleEvent(reinterpret_cast<prelim_drm_i915_debug_event *>(data));
|
||||
|
||||
EXPECT_EQ(2u, sessionMock->newlyStoppedThreads.size());
|
||||
auto expectedThreadsToCheck = (hwInfo.capabilityTable.fusedEuEnabled && hwInfo.gtSystemInfo.MaxEuPerSubSlice != 8) ? 4u : 2u;
|
||||
auto expectedThreadsToCheck = hwInfo.capabilityTable.fusedEuEnabled ? 4u : 2u;
|
||||
EXPECT_EQ(expectedThreadsToCheck, sessionMock->addThreadToNewlyStoppedFromRaisedAttentionCallCount);
|
||||
EXPECT_EQ(expectedThreadsToCheck, sessionMock->readSystemRoutineIdentFromMemoryCallCount);
|
||||
EXPECT_EQ(0u, sessionMock->readSystemRoutineIdentCallCount);
|
||||
|
||||
@@ -2093,7 +2093,7 @@ TEST_F(DebugApiLinuxTestXe, GivenSentInterruptWhenHandlingAttEventThenAttBitsAre
|
||||
sessionMock->handleEvent(reinterpret_cast<drm_xe_eudebug_event *>(data));
|
||||
|
||||
EXPECT_EQ(1u, sessionMock->newlyStoppedThreads.size());
|
||||
auto expectedThreadsToCheck = (hwInfo.capabilityTable.fusedEuEnabled && hwInfo.gtSystemInfo.MaxEuPerSubSlice != 8) ? 2u : 1u;
|
||||
auto expectedThreadsToCheck = hwInfo.capabilityTable.fusedEuEnabled ? 2u : 1u;
|
||||
EXPECT_EQ(expectedThreadsToCheck, sessionMock->addThreadToNewlyStoppedFromRaisedAttentionCallCount);
|
||||
EXPECT_EQ(expectedThreadsToCheck, sessionMock->readSystemRoutineIdentFromMemoryCallCount);
|
||||
EXPECT_EQ(0u, sessionMock->readSystemRoutineIdentCallCount);
|
||||
@@ -2302,4 +2302,4 @@ TEST(DebugSessionLinuxXeTest, GivenRootDebugSessionWhenCreateTileSessionCalledTh
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
} // namespace L0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/release_helper/release_helper.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -128,4 +129,25 @@ aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo) {
|
||||
? hwInfo.capabilityTable.defaultEngineType
|
||||
: static_cast<aub_stream::EngineType>(debugManager.flags.NodeOrdinal.get());
|
||||
}
|
||||
void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->L3CacheSizeInKb = 1;
|
||||
gtSysInfo->CCSInfo.IsValid = 1;
|
||||
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
||||
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
|
||||
// non-zero values for unit tests
|
||||
if (gtSysInfo->SliceCount == 0) {
|
||||
gtSysInfo->SliceCount = 2;
|
||||
gtSysInfo->SubSliceCount = 8;
|
||||
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->EUCount = 64;
|
||||
|
||||
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
|
||||
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxDualSubSlicesSupported = gtSysInfo->DualSubSliceCount;
|
||||
gtSysInfo->L3BankCount = 1;
|
||||
}
|
||||
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -169,5 +169,6 @@ bool getHwInfoForPlatformString(std::string &platform, const HardwareInfo *&hwIn
|
||||
void setHwInfoValuesFromConfig(const uint64_t hwInfoConfig, HardwareInfo &hwInfoIn);
|
||||
bool parseHwInfoConfigString(const std::string &hwInfoConfigStr, uint64_t &hwInfoConfig);
|
||||
aub_stream::EngineType getChosenEngineType(const HardwareInfo &hwInfo);
|
||||
void setupDefaultGtSysInfo(HardwareInfo *hwInfo, const ReleaseHelper *releaseHelper);
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -17,11 +17,6 @@ struct PVC : public XeHpcCoreFamily {
|
||||
static const HardwareInfo hwInfo;
|
||||
static FeatureTable featureTable;
|
||||
static WorkaroundTable workaroundTable;
|
||||
// Initial non-zero values for unit tests
|
||||
static const uint32_t maxEuPerSubslice = 8;
|
||||
static const uint32_t maxSlicesSupported = 8;
|
||||
static const uint32_t maxSubslicesSupported = 64;
|
||||
static const uint32_t maxDualSubslicesSupported = 64;
|
||||
static const RuntimeCapabilityTable capabilityTable;
|
||||
static constexpr uint32_t numberOfpartsInTileForConcurrentKernels = 8u;
|
||||
|
||||
|
||||
@@ -135,21 +135,8 @@ void PVC::adjustHardwareInfo(HardwareInfo *hwInfo) {
|
||||
}
|
||||
|
||||
void PVC::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
|
||||
gtSysInfo->MaxFillRate = 128;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = PVC::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = PVC::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = PVC::maxSubslicesSupported;
|
||||
gtSysInfo->MaxDualSubSlicesSupported = PVC::maxDualSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
setupDefaultGtSysInfo(hwInfo, releaseHelper);
|
||||
setupHardwareInfoMultiTileBase(hwInfo, true);
|
||||
|
||||
PVC::adjustHardwareInfo(hwInfo);
|
||||
|
||||
@@ -181,39 +168,6 @@ const HardwareInfo PvcHwConfig::hwInfo = {
|
||||
GT_SYSTEM_INFO PvcHwConfig::gtSystemInfo = {0};
|
||||
void PvcHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
PVC::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
|
||||
// non-zero values for unit tests
|
||||
if (gtSysInfo->SliceCount == 0) {
|
||||
setupHardwareInfoMultiTileBase(hwInfo, true);
|
||||
gtSysInfo->SliceCount = 2;
|
||||
gtSysInfo->SubSliceCount = 8;
|
||||
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->EUCount = 40;
|
||||
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
|
||||
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
|
||||
|
||||
gtSysInfo->L3CacheSizeInKb = 1;
|
||||
gtSysInfo->L3BankCount = 1;
|
||||
|
||||
gtSysInfo->CCSInfo.IsValid = true;
|
||||
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
||||
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
|
||||
|
||||
hwInfo->featureTable.ftrBcsInfo = 1;
|
||||
gtSysInfo->IsDynamicallyPopulated = true;
|
||||
for (uint32_t slice = 0; slice < gtSysInfo->SliceCount; slice++) {
|
||||
gtSysInfo->SliceInfo[slice].Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
PVC::setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
};
|
||||
|
||||
const HardwareInfo PVC::hwInfo = PvcHwConfig::hwInfo;
|
||||
|
||||
@@ -25,11 +25,6 @@ struct DG2 : public XeHpgCoreFamily {
|
||||
static const HardwareInfo hwInfo;
|
||||
static FeatureTable featureTable;
|
||||
static WorkaroundTable workaroundTable;
|
||||
// Initial non-zero values for unit tests
|
||||
static const uint32_t maxEuPerSubslice = 16;
|
||||
static const uint32_t maxSlicesSupported = 8;
|
||||
static const uint32_t maxSubslicesSupported = 32;
|
||||
static const uint32_t maxDualSubslicesSupported = 32;
|
||||
static const RuntimeCapabilityTable capabilityTable;
|
||||
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
|
||||
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -16,11 +16,6 @@ struct MTL : public XeHpgCoreFamily {
|
||||
static const HardwareInfo hwInfo;
|
||||
static FeatureTable featureTable;
|
||||
static WorkaroundTable workaroundTable;
|
||||
// Initial non-zero values for unit tests
|
||||
static const uint32_t maxEuPerSubslice = 16;
|
||||
static const uint32_t maxSlicesSupported = 8;
|
||||
static const uint32_t maxSubslicesSupported = 32;
|
||||
static const uint32_t maxDualSubslicesSupported = 32;
|
||||
static const RuntimeCapabilityTable capabilityTable;
|
||||
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper);
|
||||
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
|
||||
|
||||
@@ -110,26 +110,14 @@ void ARL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
featureTable->flags.ftrCCSNode = true;
|
||||
featureTable->flags.ftrCCSRing = true;
|
||||
featureTable->flags.ftrTile64Optimization = true;
|
||||
featureTable->ftrBcsInfo = 1;
|
||||
|
||||
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
|
||||
workaroundTable->flags.waUntypedBufferCompression = true;
|
||||
};
|
||||
|
||||
void ARL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
|
||||
gtSysInfo->CCSInfo.IsValid = true;
|
||||
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
||||
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
|
||||
setupDefaultGtSysInfo(hwInfo, releaseHelper);
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
@@ -146,30 +134,6 @@ const HardwareInfo ArlHwConfig::hwInfo = {
|
||||
GT_SYSTEM_INFO ArlHwConfig::gtSystemInfo = {0};
|
||||
void ArlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
ARL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
|
||||
// non-zero values for unit tests
|
||||
if (gtSysInfo->SliceCount == 0) {
|
||||
gtSysInfo->SliceCount = 1;
|
||||
gtSysInfo->SubSliceCount = 2;
|
||||
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->EUCount = 4;
|
||||
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
|
||||
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
|
||||
|
||||
gtSysInfo->L3BankCount = 1;
|
||||
|
||||
hwInfo->featureTable.ftrBcsInfo = 1;
|
||||
gtSysInfo->IsDynamicallyPopulated = true;
|
||||
for (uint32_t slice = 0; slice < gtSysInfo->SliceCount; slice++) {
|
||||
gtSysInfo->SliceInfo[slice].Enabled = true;
|
||||
}
|
||||
}
|
||||
gtSysInfo->L3CacheSizeInKb = 1;
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
ARL::setupFeatureAndWorkaroundTable(hwInfo);
|
||||
|
||||
@@ -119,25 +119,13 @@ void DG2::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
|
||||
featureTable->flags.ftrUnified3DMediaCompressionFormats = true;
|
||||
featureTable->flags.ftrTile64Optimization = true;
|
||||
hwInfo->featureTable.ftrBcsInfo = 1;
|
||||
|
||||
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
|
||||
};
|
||||
|
||||
void DG2::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = DG2::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = DG2::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = DG2::maxSubslicesSupported;
|
||||
gtSysInfo->MaxDualSubSlicesSupported = DG2::maxDualSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
setupDefaultGtSysInfo(hwInfo, releaseHelper);
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
@@ -153,42 +141,12 @@ const HardwareInfo Dg2HwConfig::hwInfo = {
|
||||
|
||||
GT_SYSTEM_INFO Dg2HwConfig::gtSystemInfo = {0};
|
||||
void Dg2HwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
|
||||
// non-zero values for unit tests
|
||||
if (gtSysInfo->SliceCount == 0) {
|
||||
gtSysInfo->SliceCount = 2;
|
||||
gtSysInfo->SubSliceCount = 8;
|
||||
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->EUCount = 40;
|
||||
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
|
||||
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->IsDynamicallyPopulated = true;
|
||||
gtSysInfo->L3BankCount = 1;
|
||||
}
|
||||
gtSysInfo->L3CacheSizeInKb = 1;
|
||||
|
||||
gtSysInfo->CCSInfo.IsValid = true;
|
||||
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
||||
|
||||
hwInfo->featureTable.ftrBcsInfo = 1;
|
||||
for (uint32_t slice = 0; slice < gtSysInfo->SliceCount; slice++) {
|
||||
gtSysInfo->SliceInfo[slice].Enabled = true;
|
||||
}
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
DG2::setupFeatureAndWorkaroundTable(hwInfo);
|
||||
}
|
||||
DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
};
|
||||
|
||||
const HardwareInfo DG2::hwInfo = Dg2HwConfig::hwInfo;
|
||||
|
||||
void setupDG2HardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, uint64_t hwInfoConfig, const ReleaseHelper *releaseHelper) {
|
||||
DG2::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
Dg2HwConfig::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,30 +111,14 @@ void MTL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||
featureTable->flags.ftrCCSNode = true;
|
||||
featureTable->flags.ftrCCSRing = true;
|
||||
featureTable->flags.ftrTile64Optimization = true;
|
||||
featureTable->ftrBcsInfo = 1;
|
||||
|
||||
workaroundTable->flags.wa4kAlignUVOffsetNV12LinearSurface = true;
|
||||
workaroundTable->flags.waUntypedBufferCompression = true;
|
||||
};
|
||||
|
||||
void MTL::setupHardwareInfoBase(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->ThreadCount = gtSysInfo->EUCount * releaseHelper->getNumThreadsPerEu();
|
||||
gtSysInfo->TotalVsThreads = 336;
|
||||
gtSysInfo->TotalHsThreads = 336;
|
||||
gtSysInfo->TotalDsThreads = 336;
|
||||
gtSysInfo->TotalGsThreads = 336;
|
||||
gtSysInfo->TotalPsThreadsWindowerRange = 64;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->MaxEuPerSubSlice = MTL::maxEuPerSubslice;
|
||||
gtSysInfo->MaxSlicesSupported = MTL::maxSlicesSupported;
|
||||
gtSysInfo->MaxSubSlicesSupported = MTL::maxSubslicesSupported;
|
||||
gtSysInfo->MaxDualSubSlicesSupported = MTL::maxDualSubslicesSupported;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
|
||||
gtSysInfo->CCSInfo.IsValid = true;
|
||||
gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1;
|
||||
gtSysInfo->CCSInfo.Instances.CCSEnableMask = 0b1;
|
||||
setupDefaultGtSysInfo(hwInfo, releaseHelper);
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
setupFeatureAndWorkaroundTable(hwInfo);
|
||||
@@ -151,30 +135,6 @@ const HardwareInfo MtlHwConfig::hwInfo = {
|
||||
GT_SYSTEM_INFO MtlHwConfig::gtSystemInfo = {0};
|
||||
void MtlHwConfig::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const ReleaseHelper *releaseHelper) {
|
||||
MTL::setupHardwareInfoBase(hwInfo, setupFeatureTableAndWorkaroundTable, releaseHelper);
|
||||
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
|
||||
gtSysInfo->CsrSizeInMb = 8;
|
||||
gtSysInfo->IsL3HashModeEnabled = false;
|
||||
gtSysInfo->IsDynamicallyPopulated = false;
|
||||
|
||||
// non-zero values for unit tests
|
||||
if (gtSysInfo->SliceCount == 0) {
|
||||
gtSysInfo->SliceCount = 2;
|
||||
gtSysInfo->SubSliceCount = 8;
|
||||
gtSysInfo->DualSubSliceCount = gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->EUCount = 40;
|
||||
gtSysInfo->MaxEuPerSubSlice = gtSysInfo->EUCount / gtSysInfo->SubSliceCount;
|
||||
gtSysInfo->MaxSlicesSupported = gtSysInfo->SliceCount;
|
||||
gtSysInfo->MaxSubSlicesSupported = gtSysInfo->SubSliceCount;
|
||||
|
||||
gtSysInfo->L3BankCount = 1;
|
||||
|
||||
hwInfo->featureTable.ftrBcsInfo = 1;
|
||||
gtSysInfo->IsDynamicallyPopulated = true;
|
||||
for (uint32_t slice = 0; slice < gtSysInfo->SliceCount; slice++) {
|
||||
gtSysInfo->SliceInfo[slice].Enabled = true;
|
||||
}
|
||||
}
|
||||
gtSysInfo->L3CacheSizeInKb = 1;
|
||||
|
||||
if (setupFeatureTableAndWorkaroundTable) {
|
||||
MTL::setupFeatureAndWorkaroundTable(hwInfo);
|
||||
|
||||
@@ -260,7 +260,7 @@ HWTEST2_F(DeviceTest, whenAllocateRTDispatchGlobalsIsCalledAndRTStackAllocationF
|
||||
|
||||
std::unique_ptr<NEO::MemoryManager> otherMemoryManager;
|
||||
otherMemoryManager = std::make_unique<NEO::MockMemoryManagerWithCapacity>(*device->executionEnvironment);
|
||||
static_cast<NEO::MockMemoryManagerWithCapacity &>(*otherMemoryManager).capacity = 50000000;
|
||||
static_cast<NEO::MockMemoryManagerWithCapacity &>(*otherMemoryManager).capacity = MemoryConstants::pageSize;
|
||||
device->executionEnvironment->memoryManager.swap(otherMemoryManager);
|
||||
|
||||
device->initializeRayTracing(5);
|
||||
@@ -1105,7 +1105,8 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DeviceTest, givenHwInfoWhenRequestedComputeUnitsUse
|
||||
|
||||
const uint32_t multiplyFactor = productHelper.getThreadEuRatioForScratch(hwInfo) / 8u;
|
||||
const uint32_t numThreadsPerEu = (hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount) * multiplyFactor;
|
||||
uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice * numThreadsPerEu;
|
||||
|
||||
uint32_t expectedValue = productHelper.computeMaxNeededSubSliceSpace(hwInfo) * hwInfo.gtSystemInfo.MaxEuPerSubSlice * numThreadsPerEu;
|
||||
|
||||
EXPECT_EQ(expectedValue, gfxCoreHelper.getComputeUnitsUsedForScratch(pDevice->getRootDeviceEnvironment()));
|
||||
EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -88,15 +88,15 @@ PVCTEST_F(PvcConfigHwInfoTests, givenPvcConfigWhenSetupHardwareInfoBaseThenGtSys
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
PVC::setupHardwareInfoBase(&hwInfo, false, releaseHelper.get());
|
||||
|
||||
EXPECT_EQ(128u, gtSystemInfo.MaxFillRate);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_EQ(0u, gtSystemInfo.MaxFillRate);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(0u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
|
||||
PVCTEST_F(PvcConfigHwInfoTests, givenPvcConfigWhenSetupMultiTileInfoBaseThenGtSystemInfoIsCorrect) {
|
||||
|
||||
@@ -82,7 +82,6 @@ ARLTEST_F(ArlHwInfoLinux, whenSetupHardwareInfoThenGtSetupIsCorrect) {
|
||||
EXPECT_GT(gtSystemInfo.SubSliceCount, 0u);
|
||||
EXPECT_GT(gtSystemInfo.DualSubSliceCount, 0u);
|
||||
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
|
||||
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
EXPECT_GT(gtSystemInfo.MaxDualSubSlicesSupported, 0u);
|
||||
EXPECT_GT(gtSystemInfo.MaxSlicesSupported, 0u);
|
||||
|
||||
@@ -152,28 +152,19 @@ DG2TEST_F(ProductHelperTestDg2, whenGettingAubstreamProductFamilyThenProperEnumV
|
||||
EXPECT_EQ(aub_stream::ProductFamily::Dg2, productHelper->getAubStreamProductFamily());
|
||||
}
|
||||
|
||||
DG2TEST_F(ProductHelperTestDg2, givenDg2ConfigWhenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
Dg2HwConfig::setupHardwareInfoBase(&hwInfo, false, releaseHelper);
|
||||
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
|
||||
DG2TEST_F(ProductHelperTestDg2, givenDg2ConfigWhenSetupHardwareInfoThenGtSystemInfoIsCorrect) {
|
||||
HardwareInfo hwInfo = *defaultHwInfo;
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
|
||||
Dg2HwConfig::setupHardwareInfo(&hwInfo, false, releaseHelper);
|
||||
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
|
||||
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(0u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
|
||||
EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
|
||||
DG2TEST_F(ProductHelperTestDg2, givenDg2ProductHelperWhenIsInitBuiltinAsyncSupportedThenReturnTrue) {
|
||||
|
||||
@@ -44,14 +44,14 @@ HWTEST2_F(XeLpgHwInfoTests, whenSetupHardwareInfoBaseThenGtSystemInfoIsCorrect,
|
||||
GT_SYSTEM_INFO >SystemInfo = hwInfo.gtSystemInfo;
|
||||
hardwareInfoSetup[hwInfo.platform.eProductFamily](&hwInfo, compilerProductHelper->getHwInfoConfig(hwInfo), false, releaseHelper.get());
|
||||
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(336u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(64u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(8u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalVsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalHsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalDsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalGsThreads);
|
||||
EXPECT_EQ(0u, gtSystemInfo.TotalPsThreadsWindowerRange);
|
||||
EXPECT_EQ(0u, gtSystemInfo.CsrSizeInMb);
|
||||
EXPECT_FALSE(gtSystemInfo.IsL3HashModeEnabled);
|
||||
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
}
|
||||
|
||||
HWTEST2_F(XeLpgHwInfoTests, whenCheckDirectSubmissionEnginesThenProperValuesAreSetToTrue, IsXeLpg) {
|
||||
@@ -173,11 +173,6 @@ HWTEST2_F(XeLpgHwInfoTests, GivenEmptyHwInfoForUnitTestsWhenSetupHardwareInfoIsC
|
||||
EXPECT_GT_VAL(gtSystemInfo.CCSInfo.NumberOfCCSEnabled, 0u);
|
||||
|
||||
EXPECT_NE_VAL(hwInfoToSet.featureTable.ftrBcsInfo, 0u);
|
||||
EXPECT_TRUE(gtSystemInfo.IsDynamicallyPopulated);
|
||||
|
||||
for (uint32_t i = 0; i < gtSystemInfo.SliceCount; i++) {
|
||||
EXPECT_TRUE(gtSystemInfo.SliceInfo[i].Enabled);
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(XeLpgProductHelperTests, whenGettingAubstreamProductFamilyThenProperEnumValueIsReturned, IsXeLpg) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Copyright (C) 2021-2023 Intel Corporation
|
||||
# Copyright (C) 2021-2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(TESTS_PVC)
|
||||
set(unit_test_config "pvc/2/4/5/47") # non-zero values for unit tests
|
||||
set(unit_test_config "pvc/2/4/8/47") # non-zero values for unit tests
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_ARL)
|
||||
set(unit_test_config "arl/2/4/5/0/0x7D41") # non-zero values for unit tests
|
||||
set(unit_test_config "arl/2/4/8/0/0x7D41") # non-zero values for unit tests
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
#
|
||||
|
||||
if(TESTS_MTL)
|
||||
set(unit_test_config "mtl/2/4/5/0/0x7D40") # non-zero values for unit tests
|
||||
set(unit_test_config "mtl/2/4/8/0/0x7D40") # non-zero values for unit tests
|
||||
include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user