mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Configure env variables when CAL enabled
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a7c480b19b
commit
1f9a5b878f
@@ -54,7 +54,7 @@ class SettingsReader;
|
||||
|
||||
template <typename T>
|
||||
struct DebugVarBase {
|
||||
DebugVarBase(const T &defaultValue) : value(defaultValue) {}
|
||||
DebugVarBase(const T &defaultValue) : value(defaultValue), defaultValue(defaultValue) {}
|
||||
T get() const {
|
||||
return value;
|
||||
}
|
||||
@@ -64,9 +64,15 @@ struct DebugVarBase {
|
||||
T &getRef() {
|
||||
return value;
|
||||
}
|
||||
void setIfDefault(T data) {
|
||||
if (value == defaultValue) {
|
||||
this->set(data);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
T value;
|
||||
T defaultValue;
|
||||
};
|
||||
|
||||
struct DebugVariables { // NOLINT(clang-analyzer-optin.performance.Padding)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
DECLARE_DEBUG_VARIABLE(bool, MakeAllBuffersResident, false, "Make all buffers resident after creation")
|
||||
DECLARE_DEBUG_VARIABLE(int32_t, OverrideDefaultFP64Settings, -1, "-1: dont override, 0: disable, 1: enable.")
|
||||
DECLARE_DEBUG_VARIABLE(bool, NEO_CAL_ENABLED, false, "Set by the Compute Aggregation Layer.")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ZE_AFFINITY_MASK, std::string("default"), "Refer to the Level Zero Specification for a description")
|
||||
DECLARE_DEBUG_VARIABLE(std::string, ZEX_NUMBER_OF_CCS, std::string("default"), "Define number of CCS engines per root device, e.g. setting Root Device Index 0 to 4 CCS, and Root Device Index 1 To 1 CCS: ZEX_NUMBER_OF_CCS=0:4,1:1")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ZE_ENABLE_PCI_ID_DEVICE_ORDER, true, "Refer to the Level Zero Specification for a description")
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
namespace NEO {
|
||||
ExecutionEnvironment::ExecutionEnvironment() {
|
||||
WaitUtils::init();
|
||||
this->configureNeoEnvironment();
|
||||
}
|
||||
|
||||
void ExecutionEnvironment::releaseRootDeviceEnvironmentResources(RootDeviceEnvironment *rootDeviceEnvironment) {
|
||||
@@ -253,4 +254,17 @@ void ExecutionEnvironment::parseCcsCountLimitations() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ExecutionEnvironment::configureNeoEnvironment() {
|
||||
if (DebugManager.flags.NEO_CAL_ENABLED.get()) {
|
||||
DebugManager.flags.UseDrmVirtualEnginesForCcs.setIfDefault(0);
|
||||
DebugManager.flags.UseDrmVirtualEnginesForBcs.setIfDefault(0);
|
||||
DebugManager.flags.EnableCmdQRoundRobindBcsEngineAssignLimit.setIfDefault(6);
|
||||
DebugManager.flags.EnableCmdQRoundRobindBcsEngineAssign.setIfDefault(1);
|
||||
DebugManager.flags.ForceBCSForInternalCopyEngine.setIfDefault(7);
|
||||
DebugManager.flags.AssignBCSAtEnqueue.setIfDefault(0);
|
||||
DebugManager.flags.EnableCopyEngineSelector.setIfDefault(1);
|
||||
DebugManager.flags.SplitBcsCopy.setIfDefault(0);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -49,6 +49,7 @@ class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment>
|
||||
protected:
|
||||
void parseCcsCountLimitations();
|
||||
void adjustCcsCountImpl(RootDeviceEnvironment *rootDeviceEnvironment) const;
|
||||
void configureNeoEnvironment();
|
||||
bool debuggingEnabled = false;
|
||||
std::unordered_map<uint32_t, uint32_t> rootDeviceNumCcsMap;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user