2018-11-11 05:25:48 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation
|
|
|
|
*
|
|
|
|
* 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"
|
|
|
|
|
|
|
|
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);
|
2018-12-12 20:09:45 +08:00
|
|
|
auto memoryBankSizeInGB = AubHelper::getMemBankSizeInGigabytes();
|
|
|
|
aubManager.reset(createAubManager(pHwInfo->pPlatform->eRenderCoreFamily, devicesCount, memoryBankSizeInGB, localMemoryEnabled, pHwInfo->capabilityTable.aubDeviceId, 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
|