mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
-Move a Device::getEnabled64kbPages method's logic to the Memory Manager constructor Change-Id: Ide88898000e5817a79f9a6ad5dfc9d680bec0533 Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
76 lines
2.2 KiB
C++
76 lines
2.2 KiB
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include "runtime/helpers/hw_info.h"
|
|
#include "runtime/helpers/options.h"
|
|
#include "runtime/memory_manager/memory_constants.h"
|
|
#include "runtime/os_interface/device_factory.h"
|
|
#include "runtime/utilities/reference_tracked_object.h"
|
|
|
|
#include "engine_node.h"
|
|
|
|
#include <mutex>
|
|
#include <vector>
|
|
|
|
namespace OCLRT {
|
|
class AubCenter;
|
|
class BuiltIns;
|
|
class CommandStreamReceiver;
|
|
class CompilerInterface;
|
|
class GmmHelper;
|
|
class MemoryManager;
|
|
class SourceLevelDebugger;
|
|
class OSInterface;
|
|
struct EngineControl;
|
|
struct HardwareInfo;
|
|
|
|
using CsrContainer = std::vector<std::vector<std::unique_ptr<CommandStreamReceiver>>>;
|
|
|
|
class ExecutionEnvironment : public ReferenceTrackedObject<ExecutionEnvironment> {
|
|
private:
|
|
std::mutex mtx;
|
|
DeviceFactoryCleaner cleaner;
|
|
|
|
protected:
|
|
std::unique_ptr<GmmHelper> gmmHelper;
|
|
const HardwareInfo *hwInfo = nullptr;
|
|
|
|
public:
|
|
ExecutionEnvironment();
|
|
~ExecutionEnvironment() override;
|
|
|
|
MOCKABLE_VIRTUAL void initAubCenter(bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType);
|
|
void initGmm();
|
|
bool initializeCommandStreamReceiver(uint32_t deviceIndex, uint32_t deviceCsrIndex);
|
|
void initializeSpecialCommandStreamReceiver();
|
|
void initializeMemoryManager();
|
|
void initSourceLevelDebugger();
|
|
void setHwInfo(const HardwareInfo *hwInfo);
|
|
const HardwareInfo *getHardwareInfo() const {
|
|
return this->hwInfo;
|
|
}
|
|
bool isFullRangeSvm() const {
|
|
return hwInfo->capabilityTable.gpuAddressSpace == MemoryConstants::max48BitAddress;
|
|
}
|
|
|
|
GmmHelper *getGmmHelper() const;
|
|
MOCKABLE_VIRTUAL CompilerInterface *getCompilerInterface();
|
|
BuiltIns *getBuiltIns();
|
|
EngineControl *getEngineControlForSpecialCsr();
|
|
|
|
std::unique_ptr<OSInterface> osInterface;
|
|
std::unique_ptr<MemoryManager> memoryManager;
|
|
std::unique_ptr<AubCenter> aubCenter;
|
|
CsrContainer commandStreamReceivers;
|
|
std::unique_ptr<CommandStreamReceiver> specialCommandStreamReceiver;
|
|
std::unique_ptr<BuiltIns> builtins;
|
|
std::unique_ptr<CompilerInterface> compilerInterface;
|
|
std::unique_ptr<SourceLevelDebugger> sourceLevelDebugger;
|
|
};
|
|
} // namespace OCLRT
|