mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-11 16:45:25 +08:00
fix: correct number of slice count in configureHwInfoDrm
adjust slice count to proper value based on previously calculated max slices and max subslice counts Related-To: NEO-12073 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a06cb54737
commit
b597f47a70
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/basic_math.h"
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/os_interface/linux/drm_neo.h"
|
||||
@@ -62,7 +63,7 @@ int configureCacheInfo(HardwareInfo *hwInfo) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
int ret = 0;
|
||||
auto osInterface = rootDeviceEnvironment.osInterface.get();
|
||||
Drm *drm = osInterface->getDriverModel()->as<Drm>();
|
||||
@@ -111,9 +112,13 @@ int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo
|
||||
|
||||
gtSystemInfo->MaxEuPerSubSlice = gtSystemInfo->MaxEuPerSubSlice != 0 ? gtSystemInfo->MaxEuPerSubSlice : topologyData.maxEuPerSubSlice;
|
||||
gtSystemInfo->MaxSubSlicesSupported = std::max(static_cast<uint32_t>(topologyData.maxSubSliceCount * topologyData.maxSliceCount), gtSystemInfo->MaxSubSlicesSupported);
|
||||
gtSystemInfo->MaxSlicesSupported = topologyData.maxSliceCount;
|
||||
gtSystemInfo->MaxSlicesSupported = std::max(static_cast<uint32_t>(topologyData.maxSliceCount), gtSystemInfo->MaxSlicesSupported);
|
||||
gtSystemInfo->MaxDualSubSlicesSupported = gtSystemInfo->MaxSubSlicesSupported;
|
||||
|
||||
UNRECOVERABLE_IF(gtSystemInfo->MaxSlicesSupported == 0);
|
||||
auto maxDssPerSlice = gtSystemInfo->MaxDualSubSlicesSupported / gtSystemInfo->MaxSlicesSupported;
|
||||
gtSystemInfo->SliceCount = static_cast<uint32_t>(Math::divideAndRoundUp(gtSystemInfo->DualSubSliceCount, maxDssPerSlice));
|
||||
|
||||
gtSystemInfo->IsDynamicallyPopulated = true;
|
||||
for (uint32_t slice = 0; slice < GT_MAX_SLICE; slice++) {
|
||||
gtSystemInfo->SliceInfo[slice].Enabled = slice < gtSystemInfo->SliceCount;
|
||||
|
||||
@@ -74,7 +74,7 @@ class ProductHelper {
|
||||
static constexpr uint32_t uuidSize = 16u;
|
||||
static constexpr uint32_t luidSize = 8u;
|
||||
MOCKABLE_VIRTUAL int configureHwInfoWddm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
int configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
int configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) const;
|
||||
virtual int configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) const = 0;
|
||||
virtual void adjustPlatformForProductFamily(HardwareInfo *hwInfo) = 0;
|
||||
virtual void adjustSamplerState(void *sampler, const HardwareInfo &hwInfo) const = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace NEO {
|
||||
|
||||
int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
int ProductHelper::configureHwInfoDrm(const HardwareInfo *inHwInfo, HardwareInfo *outHwInfo, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
UNRECOVERABLE_IF(true);
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user