mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-23 03:01:20 +08:00
fix: Parse CCS mode setting for non PVC platforms
Related-To: GSD-8785 Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7f607427fa
commit
5ca78dfdd1
@@ -371,7 +371,7 @@ void ExecutionEnvironment::adjustCcsCount(const uint32_t rootDeviceIndex) const
|
||||
auto &rootDeviceEnvironment = rootDeviceEnvironments[rootDeviceIndex];
|
||||
UNRECOVERABLE_IF(!rootDeviceEnvironment);
|
||||
if (rootDeviceNumCcsMap.find(rootDeviceIndex) != rootDeviceNumCcsMap.end()) {
|
||||
rootDeviceEnvironment->limitNumberOfCcs(rootDeviceNumCcsMap.at(rootDeviceIndex));
|
||||
rootDeviceEnvironment->setNumberOfCcs(rootDeviceNumCcsMap.at(rootDeviceIndex));
|
||||
} else {
|
||||
adjustCcsCountImpl(rootDeviceEnvironment.get());
|
||||
}
|
||||
@@ -385,21 +385,11 @@ void ExecutionEnvironment::parseCcsCountLimitations() {
|
||||
return;
|
||||
}
|
||||
|
||||
const uint32_t numRootDevices = static_cast<uint32_t>(rootDeviceEnvironments.size());
|
||||
|
||||
auto numberOfCcsEntries = StringHelpers::split(numberOfCcsString, ",");
|
||||
|
||||
for (const auto &entry : numberOfCcsEntries) {
|
||||
auto subEntries = StringHelpers::split(entry, ":");
|
||||
uint32_t rootDeviceIndex = StringHelpers::toUint32t(subEntries[0]);
|
||||
|
||||
if (rootDeviceIndex < numRootDevices) {
|
||||
if (subEntries.size() > 1) {
|
||||
uint32_t maxCcsCount = StringHelpers::toUint32t(subEntries[1]);
|
||||
rootDeviceNumCcsMap.insert({rootDeviceIndex, maxCcsCount});
|
||||
rootDeviceEnvironments[rootDeviceIndex]->limitNumberOfCcs(maxCcsCount);
|
||||
}
|
||||
}
|
||||
for (auto rootDeviceIndex = 0u; rootDeviceIndex < rootDeviceEnvironments.size(); rootDeviceIndex++) {
|
||||
auto &rootDeviceEnvironment = rootDeviceEnvironments[rootDeviceIndex];
|
||||
UNRECOVERABLE_IF(!rootDeviceEnvironment);
|
||||
auto &productHelper = rootDeviceEnvironment->getHelper<ProductHelper>();
|
||||
productHelper.parseCcsMode(numberOfCcsString, rootDeviceNumCcsMap, rootDeviceIndex, rootDeviceEnvironment.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ BuiltIns *RootDeviceEnvironment::getBuiltIns() {
|
||||
return this->builtins.get();
|
||||
}
|
||||
|
||||
void RootDeviceEnvironment::limitNumberOfCcs(uint32_t numberOfCcs) {
|
||||
void RootDeviceEnvironment::setNumberOfCcs(uint32_t numberOfCcs) {
|
||||
|
||||
hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled = std::min(hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled, numberOfCcs);
|
||||
limitedNumberOfCcs = true;
|
||||
|
||||
@@ -78,7 +78,7 @@ struct RootDeviceEnvironment : NonCopyableClass {
|
||||
BindlessHeapsHelper *getBindlessHeapsHelper() const;
|
||||
AssertHandler *getAssertHandler(Device *neoDevice);
|
||||
void createBindlessHeapsHelper(Device *rootDevice, bool availableDevices);
|
||||
void limitNumberOfCcs(uint32_t numberOfCcs);
|
||||
void setNumberOfCcs(uint32_t numberOfCcs);
|
||||
bool isNumberOfCcsLimited() const;
|
||||
void setRcsExposure();
|
||||
void initProductHelper();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace aub_stream {
|
||||
@@ -228,6 +229,8 @@ class ProductHelper {
|
||||
virtual void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport) const = 0;
|
||||
|
||||
virtual void parseCcsMode(std::string ccsModeString, std::unordered_map<uint32_t, uint32_t> &rootDeviceNumCcsMap, uint32_t rootDeviceIndex, RootDeviceEnvironment *rootDeviceEnvironment) const = 0;
|
||||
|
||||
virtual bool isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount, const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isCalculationForDisablingEuFusionWithDpasNeeded(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual uint32_t getNumberOfPartsInTileForConcurrentKernel(uint32_t ccsCount) const = 0;
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "shared/source/helpers/kernel_helpers.h"
|
||||
#include "shared/source/helpers/local_memory_access_modes.h"
|
||||
#include "shared/source/helpers/preamble.h"
|
||||
#include "shared/source/helpers/string_helpers.h"
|
||||
#include "shared/source/kernel/kernel_descriptor.h"
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
@@ -770,6 +771,15 @@ void ProductHelperHw<gfxProduct>::fillStateBaseAddressPropertiesSupportStructure
|
||||
propertiesSupport.bindingTablePoolBaseAddress = getStateBaseAddressPropertyBindingTablePoolBaseAddressSupport();
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
void ProductHelperHw<gfxProduct>::parseCcsMode(std::string ccsModeString, std::unordered_map<uint32_t, uint32_t> &rootDeviceNumCcsMap, uint32_t rootDeviceIndex, RootDeviceEnvironment *rootDeviceEnvironment) const {
|
||||
|
||||
auto ccsCount = StringHelpers::toUint32t(ccsModeString);
|
||||
|
||||
rootDeviceNumCcsMap.insert({rootDeviceIndex, ccsCount});
|
||||
rootDeviceEnvironment->setNumberOfCcs(ccsCount);
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::getPreemptionDbgPropertyPreemptionModeSupport() const {
|
||||
using GfxProduct = typename HwMapper<gfxProduct>::GfxProduct;
|
||||
|
||||
@@ -168,6 +168,7 @@ class ProductHelperHw : public ProductHelper {
|
||||
void fillFrontEndPropertiesSupportStructure(FrontEndPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override;
|
||||
void fillPipelineSelectPropertiesSupportStructure(PipelineSelectPropertiesSupport &propertiesSupport, const HardwareInfo &hwInfo) const override;
|
||||
void fillStateBaseAddressPropertiesSupportStructure(StateBaseAddressPropertiesSupport &propertiesSupport) const override;
|
||||
void parseCcsMode(std::string ccsModeString, std::unordered_map<uint32_t, uint32_t> &rootDeviceNumCcsMap, uint32_t rootDeviceIndex, RootDeviceEnvironment *rootDeviceEnvironment) const override;
|
||||
|
||||
bool isFusedEuDisabledForDpas(bool kernelHasDpasInstructions, const uint32_t *lws, const uint32_t *groupCount, const HardwareInfo &hwInfo) const override;
|
||||
bool isCalculationForDisablingEuFusionWithDpasNeeded(const HardwareInfo &hwInfo) const override;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/helpers/definitions/indirect_detection_versions.h"
|
||||
#include "shared/source/helpers/string_helpers.h"
|
||||
#include "shared/source/os_interface/product_helper_xe_hpg_and_xe_hpc.inl"
|
||||
|
||||
#include "aubstream/product_family.h"
|
||||
@@ -144,6 +145,25 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const RootDev
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
void ProductHelperHw<gfxProduct>::parseCcsMode(std::string ccsModeString, std::unordered_map<uint32_t, uint32_t> &rootDeviceNumCcsMap, uint32_t rootDeviceIndex, RootDeviceEnvironment *rootDeviceEnvironment) const {
|
||||
|
||||
auto numberOfCcsEntries = StringHelpers::split(ccsModeString, ",");
|
||||
|
||||
for (const auto &entry : numberOfCcsEntries) {
|
||||
auto subEntries = StringHelpers::split(entry, ":");
|
||||
uint32_t rootDeviceIndexParsed = StringHelpers::toUint32t(subEntries[0]);
|
||||
|
||||
if (rootDeviceIndexParsed == rootDeviceIndex) {
|
||||
if (subEntries.size() > 1) {
|
||||
uint32_t maxCcsCount = StringHelpers::toUint32t(subEntries[1]);
|
||||
rootDeviceNumCcsMap.insert({rootDeviceIndex, maxCcsCount});
|
||||
rootDeviceEnvironment->setNumberOfCcs(maxCcsCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
bool ProductHelperHw<gfxProduct>::isTlbFlushRequired() const {
|
||||
bool tlbFlushRequired = false;
|
||||
|
||||
Reference in New Issue
Block a user