mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Update aub_stream headers
- pass hwInfo and localMemoryEnabled to AubCenter ctor - initialize AubCenter in Platform:intialize() when Device is created - only when CSR is not CsrHw - move aub_center files to runtime/aub directory Change-Id: Iceb4bf1cb2bb55b42d438502cca667a449f11411
This commit is contained in:
committed by
sys_ocldev
parent
12ece3a220
commit
0942edd6af
@@ -6,6 +6,8 @@
|
||||
|
||||
set(RUNTIME_SRCS_AUB
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_center.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_center.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/aub_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aub_helper.inl
|
||||
|
||||
21
runtime/aub/aub_center.cpp
Normal file
21
runtime/aub/aub_center.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "runtime/aub/aub_center.h"
|
||||
#include "runtime/helpers/hw_info.h"
|
||||
#include "runtime/os_interface/debug_settings_manager.h"
|
||||
|
||||
namespace OCLRT {
|
||||
AubCenter::AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled) {
|
||||
if (DebugManager.flags.UseAubStream.get()) {
|
||||
std::string filename("aub.aub");
|
||||
aubManager.reset(AubDump::AubManager::create(pHwInfo->pPlatform->eRenderCoreFamily, 1, 1, localMemoryEnabled, filename));
|
||||
}
|
||||
addressMapper = std::make_unique<AddressMapper>();
|
||||
streamProvider = std::make_unique<AubFileStreamProvider>();
|
||||
}
|
||||
} // namespace OCLRT
|
||||
46
runtime/aub/aub_center.h
Normal file
46
runtime/aub/aub_center.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "runtime/command_stream/aub_stream_provider.h"
|
||||
#include "runtime/memory_manager/address_mapper.h"
|
||||
#include "runtime/memory_manager/physical_address_allocator.h"
|
||||
|
||||
#include "third_party/aub_stream/headers/aub_manager.h"
|
||||
|
||||
namespace OCLRT {
|
||||
struct HardwareInfo;
|
||||
|
||||
class AubCenter {
|
||||
public:
|
||||
AubCenter(const HardwareInfo *pHwInfo, bool localMemoryEnabled);
|
||||
virtual ~AubCenter() = default;
|
||||
|
||||
void initPhysicalAddressAllocator(PhysicalAddressAllocator *pPhysicalAddressAllocator) {
|
||||
physicalAddressAllocator = std::unique_ptr<PhysicalAddressAllocator>(pPhysicalAddressAllocator);
|
||||
}
|
||||
|
||||
PhysicalAddressAllocator *getPhysicalAddressAllocator() const {
|
||||
return physicalAddressAllocator.get();
|
||||
}
|
||||
|
||||
AddressMapper *getAddressMapper() const {
|
||||
return addressMapper.get();
|
||||
}
|
||||
|
||||
AubStreamProvider *getStreamProvider() const {
|
||||
return streamProvider.get();
|
||||
}
|
||||
|
||||
protected:
|
||||
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;
|
||||
std::unique_ptr<AddressMapper> addressMapper;
|
||||
std::unique_ptr<AubStreamProvider> streamProvider;
|
||||
|
||||
std::unique_ptr<AubDump::AubManager> aubManager;
|
||||
};
|
||||
} // namespace OCLRT
|
||||
Reference in New Issue
Block a user