feature: Support for ccs mode configuration via SysFs

Add support for configuring ccs mode for all applicable devices
before KMD is loaded.

Use ZEX_NUMBER_OF_CCS to configure ccs mode.

Format is as follows:

ZEX_NUMBER_OF_CCS=NumberOfCcs i,e Setting ZEX_NUMBER_OF_CCS
to 4 sets ccs mode to 4 for all devices for which configuration
is supported.

Related-To: NEO-10378

Signed-off-by: Bellekallu Rajkiran <bellekallu.rajkiran@intel.com>
This commit is contained in:
Bellekallu Rajkiran
2024-03-15 13:14:45 +00:00
committed by Compute-Runtime-Automation
parent f496233462
commit 9736313d10
12 changed files with 600 additions and 11 deletions

View File

@@ -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/utilities/reference_tracked_object.h"
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>
@@ -37,6 +38,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
void setDeviceHierarchy(const GfxCoreHelper &gfxCoreHelper);
void adjustRootDeviceEnvironments();
void prepareForCleanup() const;
void configureCcsMode();
void setDebuggingMode(DebuggingMode debuggingMode) {
debuggingEnabledMode = debuggingMode;
}
@@ -77,6 +79,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
void parseCcsCountLimitations();
void adjustCcsCountImpl(RootDeviceEnvironment *rootDeviceEnvironment) const;
void configureNeoEnvironment();
void restoreCcsMode();
bool metricsEnabled = false;
bool fp64EmulationEnabled = false;
bool subDevicesAsDevices = false;
@@ -85,5 +88,6 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
DebuggingMode debuggingEnabledMode = DebuggingMode::disabled;
std::unordered_map<uint32_t, uint32_t> rootDeviceNumCcsMap;
std::mutex initializeDirectSubmissionControllerMutex;
std::vector<std::tuple<std::string, uint32_t>> deviceCcsModeVec;
};
} // namespace NEO