Files
compute-runtime/shared/source/execution_environment/execution_environment.h
Mateusz Jablonski 7b86c8da2e Add support for limiting number of CCS engines
This commit adds support for ZEX_NUMBER_OF_CCS flag which can be used
for limiting number of CCS engines

Format is as follows:

ZEX_NUMBER_OF_CCS=RootDeviceIndex:NumberOfCCS;RootDeviceIndex:NumberOfCCS...

i.e. setting Root Device Index 0 to 4 CCS, and Root Device Index 1 To 1 CCS

ZEX_NUMBER_OF_CCS=0:4,1:1

Related-To: NEO-7195
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2022-08-10 19:38:03 +02:00

52 lines
1.5 KiB
C++

/*
* Copyright (C) 2018-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/utilities/reference_tracked_object.h"
#include <vector>
namespace NEO {
class DirectSubmissionController;
class MemoryManager;
struct OsEnvironment;
struct RootDeviceEnvironment;
class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment> {
public:
ExecutionEnvironment();
~ExecutionEnvironment() override;
MOCKABLE_VIRTUAL bool initializeMemoryManager();
void calculateMaxOsContextCount();
virtual void prepareRootDeviceEnvironments(uint32_t numRootDevices);
void prepareRootDeviceEnvironment(const uint32_t rootDeviceIndexForReInit);
void parseAffinityMask();
void adjustCcsCount() const;
void sortNeoDevices();
void sortNeoDevicesDRM();
void sortNeoDevicesWDDM();
void prepareForCleanup() const;
void setDebuggingEnabled() {
debuggingEnabled = true;
}
bool isDebuggingEnabled() { return debuggingEnabled; }
DirectSubmissionController *initializeDirectSubmissionController();
std::unique_ptr<MemoryManager> memoryManager;
std::unique_ptr<DirectSubmissionController> directSubmissionController;
std::unique_ptr<OsEnvironment> osEnvironment;
std::vector<std::unique_ptr<RootDeviceEnvironment>> rootDeviceEnvironments;
void releaseRootDeviceEnvironmentResources(RootDeviceEnvironment *rootDeviceEnvironment);
protected:
void parseCcsCountLimitations() const;
bool debuggingEnabled = false;
};
} // namespace NEO