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:
Aravind Gopalakrishnan
2025-03-19 01:28:15 +00:00
committed by Compute-Runtime-Automation
parent 356557f202
commit 724ba20e41
8 changed files with 171 additions and 30 deletions

View File

@@ -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());
}
}