2018-11-11 05:25:48 +08:00
|
|
|
/*
|
2019-01-02 04:14:17 +08:00
|
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
2018-11-11 05:25:48 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: MIT
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "runtime/aub/aub_center.h"
|
2018-12-12 20:09:45 +08:00
|
|
|
#include "runtime/aub/aub_helper.h"
|
2018-11-11 05:25:48 +08:00
|
|
|
#include "runtime/helpers/hw_info.h"
|
|
|
|
#include "runtime/os_interface/debug_settings_manager.h"
|
2019-01-14 17:31:06 +08:00
|
|
|
#include "third_party/aub_stream/headers/options.h"
|
2018-11-11 05:25:48 +08:00
|
|
|
|
|
|
|
namespace OCLRT {
|
2018-11-26 06:58:12 +08:00
|
|
|
AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const std::string &aubFileName) {
|
2018-11-11 05:25:48 +08:00
|
|
|
if (DebugManager.flags.UseAubStream.get()) {
|
2018-12-12 22:39:02 +08:00
|
|
|
auto devicesCount = AubHelper::getDevicesCount(pHwInfo);
|
2019-01-02 04:14:17 +08:00
|
|
|
auto memoryBankSize = AubHelper::getMemBankSize();
|
2019-01-14 17:31:06 +08:00
|
|
|
if (DebugManager.flags.AubDumpAddMmioRegistersList.get() != "unk") {
|
|
|
|
AubDump::injectMMIOList = AubHelper::getAdditionalMmioList();
|
|
|
|
}
|
|
|
|
|
2019-01-02 04:14:17 +08:00
|
|
|
aubManager.reset(createAubManager(pHwInfo->pPlatform->eRenderCoreFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubFileName));
|
2018-11-11 05:25:48 +08:00
|
|
|
}
|
|
|
|
addressMapper = std::make_unique<AddressMapper>();
|
|
|
|
streamProvider = std::make_unique<AubFileStreamProvider>();
|
|
|
|
}
|
2018-12-11 00:12:32 +08:00
|
|
|
|
|
|
|
AubCenter::AubCenter() {
|
|
|
|
addressMapper = std::make_unique<AddressMapper>();
|
|
|
|
streamProvider = std::make_unique<AubFileStreamProvider>();
|
|
|
|
}
|
2018-11-11 05:25:48 +08:00
|
|
|
} // namespace OCLRT
|