feature: add support for null aub mode

In this mode AUB csr will be created, however, no aub file will be created

Related-To: NEO-11097
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-04-09 12:43:12 +00:00
committed by Compute-Runtime-Automation
parent 097615cef6
commit cb2b572e94
59 changed files with 262 additions and 239 deletions

View File

@@ -447,7 +447,7 @@ inline uint32_t GfxCoreHelperHw<GfxFamily>::getMinimalSIMDSize() const {
template <typename GfxFamily>
std::unique_ptr<TagAllocatorBase> GfxCoreHelperHw<GfxFamily>::createTimestampPacketAllocator(const RootDeviceIndicesContainer &rootDeviceIndices, MemoryManager *memoryManager,
size_t initialTagCount, CommandStreamReceiverType csrType, DeviceBitfield deviceBitfield) const {
bool doNotReleaseNodes = (csrType > CommandStreamReceiverType::CSR_HW) ||
bool doNotReleaseNodes = (csrType > CommandStreamReceiverType::hardware) ||
debugManager.flags.DisableTimestampPacketOptimizations.get();
auto tagAlignment = getTimestampPacketAllocatorAlignment();

View File

@@ -9,21 +9,29 @@
#include <cstdint>
namespace NEO {
enum CommandStreamReceiverType {
enum class CommandStreamReceiverType {
// Use receiver for real HW
CSR_HW = 0,
hardware = 0,
// Capture an AUB file automatically for all traffic going through Device -> CommandStreamReceiver
CSR_AUB,
aub,
// Capture an AUB and tunnel all commands going through Device -> CommandStreamReceiver to a TBX server
CSR_TBX,
tbx,
// Use receiver for real HW and capture AUB file
CSR_HW_WITH_AUB,
hardwareWithAub,
// Use TBX server and capture AUB file
CSR_TBX_WITH_AUB,
tbxWithAub,
// all traffic goes through AUB path but aubstream creates no file
nullAub,
// Number of CSR types
CSR_TYPES_NUM
typesNum
};
inline CommandStreamReceiverType obtainCsrTypeFromIntegerValue(int32_t selectedCsrType, CommandStreamReceiverType defaultType) {
if (selectedCsrType >= 0 && selectedCsrType <= static_cast<int32_t>(CommandStreamReceiverType::typesNum)) {
return static_cast<CommandStreamReceiverType>(selectedCsrType);
}
return defaultType;
}
// AUB file folder location
extern const char *folderAUB;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,7 +18,7 @@ template <typename GfxFamily>
long __stdcall DeviceCallbacks<GfxFamily>::notifyAubCapture(void *csrHandle, uint64_t gfxAddress, size_t gfxSize, bool allocate) {
auto csr = reinterpret_cast<CommandStreamReceiverHw<GfxFamily> *>(csrHandle);
if (debugManager.flags.SetCommandStreamReceiver.get() == CSR_HW_WITH_AUB) {
if (obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware) == CommandStreamReceiverType::hardwareWithAub) {
auto csrWithAub = static_cast<CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<GfxFamily>> *>(csr);
auto aubCsr = static_cast<AUBCommandStreamReceiverHw<GfxFamily> *>(csrWithAub->aubCSR.get());
if (allocate) {