AubManager to accept memory bank size in bytes

Change-Id: Ie98cb7c0c0eaf93c9a2312aa87428173421609a9
This commit is contained in:
Milczarek, Slawomir
2019-01-01 21:14:17 +01:00
parent 9d9b11734d
commit ba2b8f05fc
10 changed files with 29 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,8 +14,8 @@ namespace OCLRT {
AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const std::string &aubFileName) {
if (DebugManager.flags.UseAubStream.get()) {
auto devicesCount = AubHelper::getDevicesCount(pHwInfo);
auto memoryBankSizeInGB = AubHelper::getMemBankSizeInGigabytes();
aubManager.reset(createAubManager(pHwInfo->pPlatform->eRenderCoreFamily, devicesCount, memoryBankSizeInGB, localMemoryEnabled, pHwInfo->capabilityTable.aubDeviceId, aubFileName));
auto memoryBankSize = AubHelper::getMemBankSize();
aubManager.reset(createAubManager(pHwInfo->pPlatform->eRenderCoreFamily, devicesCount, memoryBankSize, localMemoryEnabled, aubFileName));
}
addressMapper = std::make_unique<AddressMapper>();
streamProvider = std::make_unique<AubFileStreamProvider>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,7 +14,7 @@
namespace OCLRT {
struct HardwareInfo;
extern AubDump::AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, size_t memoryBankSizeInGB, bool localMemorySupported, uint32_t deviceId, const std::string &aubFileName);
extern AubDump::AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, const std::string &aubFileName);
class AubCenter {
public:

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -7,6 +7,7 @@
#include "runtime/aub/aub_helper.h"
#include "runtime/aub_mem_dump/aub_mem_dump.h"
#include "runtime/helpers/basic_math.h"
#include "runtime/os_interface/debug_settings_manager.h"
namespace OCLRT {
@@ -26,8 +27,8 @@ uint32_t AubHelper::getMemType(uint32_t addressSpace) {
return 0;
}
uint32_t AubHelper::getMemBankSizeInGigabytes() {
return 2;
uint64_t AubHelper::getMemBankSize() {
return 2 * GB;
}
uint32_t AubHelper::getDevicesCount(const HardwareInfo *pHwInfo) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -30,7 +30,7 @@ class AubHelper : public NonCopyableOrMovableClass {
static uint64_t getPTEntryBits(uint64_t pdEntryBits);
static void checkPTEAddress(uint64_t address);
static uint32_t getMemType(uint32_t addressSpace);
static uint32_t getMemBankSizeInGigabytes();
static uint64_t getMemBankSize();
static uint32_t getDevicesCount(const HardwareInfo *pHwInfo);
virtual int getDataHintForPml4Entry() const = 0;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -8,7 +8,7 @@
#include "runtime/aub/aub_center.h"
using namespace AubDump;
namespace OCLRT {
AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, size_t memoryBankSizeInGB, bool localMemorySupported, uint32_t deviceId, const std::string &aubFileName) {
return AubDump::AubManager::create(gfxFamily, devicesCount, memoryBankSizeInGB, localMemorySupported, deviceId, aubFileName);
AubManager *createAubManager(uint32_t gfxFamily, uint32_t devicesCount, uint64_t memoryBankSize, bool localMemorySupported, const std::string &aubFileName) {
return AubDump::AubManager::create(gfxFamily, devicesCount, memoryBankSize, localMemorySupported, aubFileName);
}
} // namespace OCLRT