Add getDevicesCount() to AubCenter

Change-Id: I1bb91fe3f1b3155790c7d7b20c7db687c7fcfa82
This commit is contained in:
Kowalczuk, Jakub
2018-12-12 15:39:02 +01:00
committed by sys_ocldev
parent 7201346810
commit cb3e4eeb84
5 changed files with 32 additions and 6 deletions

View File

@@ -13,7 +13,7 @@
namespace OCLRT {
AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled, const std::string &aubFileName) {
if (DebugManager.flags.UseAubStream.get()) {
auto devicesCount = DebugManager.flags.CreateMultipleDevices.get() > 0 ? DebugManager.flags.CreateMultipleDevices.get() : 1u;
auto devicesCount = AubHelper::getDevicesCount(pHwInfo);
auto memoryBankSizeInGB = AubHelper::getMemBankSizeInGigabytes();
aubManager.reset(createAubManager(pHwInfo->pPlatform->eRenderCoreFamily, devicesCount, memoryBankSizeInGB, localMemoryEnabled, pHwInfo->capabilityTable.aubDeviceId, aubFileName));
}

View File

@@ -7,6 +7,7 @@
#include "runtime/aub/aub_helper.h"
#include "runtime/aub_mem_dump/aub_mem_dump.h"
#include "runtime/os_interface/debug_settings_manager.h"
namespace OCLRT {
@@ -29,4 +30,8 @@ uint32_t AubHelper::getMemBankSizeInGigabytes() {
return 2;
}
uint32_t AubHelper::getDevicesCount(const HardwareInfo *pHwInfo) {
return DebugManager.flags.CreateMultipleDevices.get() > 0 ? DebugManager.flags.CreateMultipleDevices.get() : 1u;
}
} // namespace OCLRT

View File

@@ -6,6 +6,7 @@
*/
#pragma once
#include "runtime/helpers/hw_info.h"
#include "runtime/helpers/properties_helper.h"
#include "runtime/memory_manager/graphics_allocation.h"
@@ -30,6 +31,7 @@ class AubHelper : public NonCopyableOrMovableClass {
static void checkPTEAddress(uint64_t address);
static uint32_t getMemType(uint32_t addressSpace);
static uint32_t getMemBankSizeInGigabytes();
static uint32_t getDevicesCount(const HardwareInfo *pHwInfo);
virtual int getDataHintForPml4Entry() const = 0;
virtual int getDataHintForPdpEntry() const = 0;