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

@@ -1421,7 +1421,7 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
device->pciMaxSpeed.width = pciSpeedInfo.width;
}
if (device->getNEODevice()->getAllEngines()[0].commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::CSR_HW) {
if (device->getNEODevice()->getAllEngines()[0].commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::hardware) {
device->createSysmanHandle(isSubDevice);
}
device->resourcesReleased = false;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -24,7 +24,7 @@ std::unique_ptr<BuiltinFunctionsLib> BuiltinFunctionsLib::create(Device *device,
bool BuiltinFunctionsLibImpl::initBuiltinsAsyncEnabled(Device *device) {
return device->getNEODevice()->getRootDeviceEnvironment().osInterface.get() &&
device->getNEODevice()->getRootDeviceEnvironment().osInterface->getDriverModel()->getDriverModelType() == NEO::DriverModelType::drm &&
device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::CSR_HW &&
device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getType() == NEO::CommandStreamReceiverType::hardware &&
device->getNEODevice()->getRootDeviceEnvironment().getProductHelper().isInitBuiltinAsyncSupported(device->getHwInfo());
}

View File

@@ -530,7 +530,7 @@ ze_result_t EventImp<TagSizeT>::hostSynchronize(uint64_t timeout) {
ze_result_t ret = ZE_RESULT_NOT_READY;
if (this->csrs[0]->getType() == NEO::CommandStreamReceiverType::CSR_AUB) {
if (this->csrs[0]->getType() == NEO::CommandStreamReceiverType::aub) {
return ZE_RESULT_SUCCESS;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -53,7 +53,7 @@ ze_result_t Fence::hostSynchronize(uint64_t timeout) {
ze_result_t ret = ZE_RESULT_NOT_READY;
const auto csr = cmdQueue->getCsr();
if (csr->getType() == NEO::CommandStreamReceiverType::CSR_AUB) {
if (csr->getType() == NEO::CommandStreamReceiverType::aub) {
return ZE_RESULT_SUCCESS;
}

View File

@@ -1333,7 +1333,7 @@ void TbxImmediateCommandListFixture::setUpT() {
device->getNEODevice()->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
ModuleMutableCommandListFixture::setUpImpl();
ze_event_pool_desc_t eventPoolDesc = {ZE_STRUCTURE_TYPE_EVENT_POOL_DESC};

View File

@@ -3225,7 +3225,7 @@ HWTEST_F(EventTests, GivenEventWhenHostSynchronizeCalledThenExpectDownloadEventA
VariableBackup<TaskCountType> backupPauseValue(&CpuIntrinsicsTests::pauseValue, Event::STATE_CLEARED);
VariableBackup<uint32_t> backupPauseOffset(&CpuIntrinsicsTests::pauseOffset);
VariableBackup<std::function<void()>> backupSetupPauseAddress(&CpuIntrinsicsTests::setupPauseAddress);
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
auto event = whiteboxCast(getHelper<L0GfxCoreHelper>().createEvent(eventPool.get(), &eventDesc, device));
@@ -3288,7 +3288,7 @@ HWTEST_F(EventTests, GivenEventWhenHostSynchronizeCalledThenExpectDownloadEventA
HWTEST_F(EventTests, GivenEventUsedOnNonDefaultCsrWhenHostSynchronizeCalledThenAllocationIsDownloaded) {
std::map<GraphicsAllocation *, uint32_t> downloadAllocationTrack;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
auto event = whiteboxCast(getHelper<L0GfxCoreHelper>().createEvent(eventPool.get(), &eventDesc, device));
@@ -3342,7 +3342,7 @@ HWTEST_F(EventTests, GivenEventUsedOnNonDefaultCsrWhenHostSynchronizeCalledThenA
HWTEST_F(EventTests, givenInOrderEventWhenHostSynchronizeIsCalledThenAllocationIsDonwloadedOnlyAfterEventWasUsedOnGpu) {
std::map<GraphicsAllocation *, uint32_t> downloadAllocationTrack;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
MockTagAllocator<DeviceAllocNodeType<true>> tagAllocator(0, neoDevice->getMemoryManager());
@@ -3394,7 +3394,7 @@ HWTEST_F(EventTests, givenInOrderEventWhenHostSynchronizeIsCalledThenAllocationI
HWTEST_F(EventTests, givenStandaloneCbEventAndTbxModeWhenSynchronizingThenHandleCorrectly) {
auto &ultCsr = neoDevice->getUltCommandStreamReceiver<FamilyType>();
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::tbx;
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface = std::make_unique<NEO::MockMemoryOperations>();
@@ -3421,7 +3421,7 @@ HWTEST_F(EventTests, givenInOrderEventWithHostAllocWhenHostSynchronizeIsCalledTh
std::map<GraphicsAllocation *, uint32_t> downloadAllocationTrack;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::tbx;
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
@@ -3479,7 +3479,7 @@ HWTEST_F(EventTests, givenInOrderEventWithHostAllocWhenHostSynchronizeIsCalledTh
}
HWTEST_F(EventTests, GivenEventIsReadyToDownloadAllAlocationsWhenDownloadAllocationNotRequiredThenDontDownloadAllocations) {
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
neoDevice->getUltCommandStreamReceiver<FamilyType>().commandStreamReceiverType = CommandStreamReceiverType::hardware;
auto event = whiteboxCast(getHelper<L0GfxCoreHelper>().createEvent(eventPool.get(), &eventDesc, device));
@@ -3502,7 +3502,7 @@ HWTEST_F(EventTests, GivenNotReadyEventBecomesReadyWhenDownloadAllocationRequire
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->memoryOperationsInterface =
std::make_unique<NEO::MockMemoryOperations>();
CommandStreamReceiverType tbxCsrTypes[] = {CommandStreamReceiverType::CSR_TBX, CommandStreamReceiverType::CSR_TBX_WITH_AUB};
CommandStreamReceiverType tbxCsrTypes[] = {CommandStreamReceiverType::tbx, CommandStreamReceiverType::tbxWithAub};
auto &ultCsr = static_cast<UltCommandStreamReceiver<FamilyType> &>(neoDevice->getUltCommandStreamReceiver<FamilyType>());
for (auto csrType : tbxCsrTypes) {
@@ -3543,7 +3543,7 @@ HWTEST_F(EventTests, GivenCsrTbxModeWhenEventCreatedAndSignaledThenEventAllocati
mockMemIface->captureGfxAllocationsForMakeResident = true;
auto &ultCsr = neoDevice->getUltCommandStreamReceiver<FamilyType>();
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::tbx;
ze_result_t result = ZE_RESULT_SUCCESS;
eventPool = std::unique_ptr<L0::EventPool>(L0::EventPool::create(driverHandle.get(), context, 0, nullptr, &eventPoolDesc, result));

View File

@@ -1240,7 +1240,7 @@ void CommandQueue::aubCaptureHook(bool &blocking, bool &clearAllDependencies, co
}
}
if (getGpgpuCommandStreamReceiver().getType() > CommandStreamReceiverType::CSR_HW) {
if (getGpgpuCommandStreamReceiver().getType() > CommandStreamReceiverType::hardware) {
for (auto &dispatchInfo : multiDispatchInfo) {
auto &kernelName = dispatchInfo.getKernel()->getKernelInfo().kernelDescriptor.kernelMetadata.kernelName;
getGpgpuCommandStreamReceiver().addAubComment(kernelName.c_str());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,9 +22,9 @@ class UnifiedMemoryAubTest : public UnifiedMemoryAubFixture,
void SetUp() override {
if (testMode == TestMode::aubTestsWithTbx) {
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::CSR_TBX_WITH_AUB));
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::tbxWithAub));
} else {
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::CSR_AUB));
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
}
UnifiedMemoryAubFixture::setUp();
values = std::vector<char>(dataSize, 11);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -24,7 +24,7 @@ XE_HPC_CORETEST_F(XeHpcCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwar
DebugManagerStateRestore restore;
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useHwCsr = true;
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -26,7 +26,7 @@ XE_HPG_CORETEST_F(XeHpgCoreAubMemDumpTests, whenAubCsrIsCreatedThenCreateHardwar
DebugManagerStateRestore restore;
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useHwCsr = true;
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
std::unique_ptr<MockDevice> device(MockDevice::createWithNewExecutionEnvironment<MockDevice>(defaultHwInfo.get()));

View File

@@ -468,7 +468,7 @@ typedef Test<ClDeviceFixture> CommandStreamReceiverHwTest;
HWTEST_F(CommandStreamReceiverHwTest, givenCsrHwWhenTypeIsCheckedThenCsrHwIsReturned) {
auto csr = std::unique_ptr<CommandStreamReceiver>(CommandStreamReceiverHw<FamilyType>::create(*pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
EXPECT_EQ(CommandStreamReceiverType::CSR_HW, csr->getType());
EXPECT_EQ(CommandStreamReceiverType::hardware, csr->getType());
}
HWCMDTEST_F(IGFX_GEN8_CORE, CommandStreamReceiverHwTest, WhenCommandStreamReceiverHwIsCreatedThenDefaultSshSizeIs64KB) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -32,11 +32,11 @@ HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetTo
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useHwCsr = true;
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(csrType));
{
auto csr = std::unique_ptr<CommandStreamReceiver>(createCommandStream(*executionEnvironment, 0, 1));
if (csrType < CommandStreamReceiverType::CSR_TYPES_NUM) {
if (csrType < CommandStreamReceiverType::typesNum) {
EXPECT_NE(nullptr, csr.get());
} else {
EXPECT_EQ(nullptr, csr.get());
@@ -47,12 +47,13 @@ HWTEST_P(CreateCommandStreamReceiverTest, givenCreateCommandStreamWhenCsrIsSetTo
}
static CommandStreamReceiverType commandStreamReceiverTypes[] = {
CSR_HW,
CSR_AUB,
CSR_TBX,
CSR_HW_WITH_AUB,
CSR_TBX_WITH_AUB,
CSR_TYPES_NUM};
CommandStreamReceiverType::hardware,
CommandStreamReceiverType::aub,
CommandStreamReceiverType::tbx,
CommandStreamReceiverType::hardwareWithAub,
CommandStreamReceiverType::tbxWithAub,
CommandStreamReceiverType::nullAub,
CommandStreamReceiverType::typesNum};
INSTANTIATE_TEST_CASE_P(
CreateCommandStreamReceiverTest_Create,

View File

@@ -670,7 +670,7 @@ TEST(DeviceGetEngineTest, givenDeferredContextInitializationDisabledWhenCreating
TEST(DeviceGetEngineTest, givenNonHwCsrModeWhenGetEngineThenDefaultEngineIsReturned) {
DebugManagerStateRestore dbgRestorer;
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
VariableBackup<UltHwConfig> backup(&ultHwConfig);
ultHwConfig.useHwCsr = true;

View File

@@ -602,7 +602,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
bool flushBatchedSubmissions() override { return true; }
CommandStreamReceiverType getType() const override {
return CommandStreamReceiverType::CSR_HW;
return CommandStreamReceiverType::hardware;
}
void programHardwareContext(LinearStream &cmdStream) override {}

View File

@@ -857,11 +857,11 @@ TEST(DeviceTest, whenCheckBlitSplitEnabledThenReturnsTrue) {
}
TEST(DeviceTest, givenCsrHwWhenCheckIsInitDeviceWithFirstSubmissionEnabledThenReturnsTrue) {
EXPECT_TRUE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::CSR_HW));
EXPECT_TRUE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::hardware));
}
TEST(DeviceTest, givenCsrNonHwWhenCheckIsInitDeviceWithFirstSubmissionEnabledThenReturnsTrue) {
EXPECT_FALSE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::CSR_TBX));
EXPECT_FALSE(Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType::tbx));
}
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {

View File

@@ -366,18 +366,18 @@ TEST(DeviceFactory, givenCreateMultipleRootDevicesWhenCreateDevicesIsCalledThenV
TEST(DeviceFactory, givenHwModeSelectedWhenIsHwModeSelectedIsCalledThenTrueIsReturned) {
DebugManagerStateRestore stateRestore;
constexpr int32_t hwModes[] = {-1, CommandStreamReceiverType::CSR_HW, CommandStreamReceiverType::CSR_HW_WITH_AUB};
constexpr int32_t hwModes[] = {-1, static_cast<int32_t>(CommandStreamReceiverType::hardware), static_cast<int32_t>(CommandStreamReceiverType::hardwareWithAub)};
for (const auto &hwMode : hwModes) {
debugManager.flags.SetCommandStreamReceiver.set(hwMode);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(hwMode));
EXPECT_TRUE(DeviceFactory::isHwModeSelected());
}
}
TEST(DeviceFactory, givenNonHwModeSelectedWhenIsHwModeSelectedIsCalledThenFalseIsReturned) {
DebugManagerStateRestore stateRestore;
constexpr int32_t nonHwModes[] = {CommandStreamReceiverType::CSR_AUB, CommandStreamReceiverType::CSR_TBX, CommandStreamReceiverType::CSR_TBX_WITH_AUB};
constexpr CommandStreamReceiverType nonHwModes[] = {CommandStreamReceiverType::aub, CommandStreamReceiverType::tbx, CommandStreamReceiverType::tbxWithAub, CommandStreamReceiverType::nullAub};
for (const auto &nonHwMode : nonHwModes) {
debugManager.flags.SetCommandStreamReceiver.set(nonHwMode);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(nonHwMode));
EXPECT_FALSE(DeviceFactory::isHwModeSelected());
}
}

View File

@@ -27,10 +27,7 @@ AubCenter::AubCenter(const RootDeviceEnvironment &rootDeviceEnvironment, bool lo
auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto releaseHelper = rootDeviceEnvironment.getReleaseHelper();
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(hwInfo, releaseHelper);
CommandStreamReceiverType type = csrType;
if (debugManager.flags.SetCommandStreamReceiver.get() >= CommandStreamReceiverType::CSR_HW) {
type = static_cast<CommandStreamReceiverType>(debugManager.flags.SetCommandStreamReceiver.get());
}
CommandStreamReceiverType type = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), csrType);
aubStreamMode = getAubStreamMode(aubFileName, type);
@@ -85,20 +82,23 @@ AubCenter::AubCenter() {
subCaptureCommon = std::make_unique<AubSubCaptureCommon>();
}
uint32_t AubCenter::getAubStreamMode(const std::string &aubFileName, uint32_t csrType) {
uint32_t AubCenter::getAubStreamMode(const std::string &aubFileName, CommandStreamReceiverType csrType) {
uint32_t mode = aub_stream::mode::aubFile;
switch (csrType) {
case CommandStreamReceiverType::CSR_HW_WITH_AUB:
case CommandStreamReceiverType::CSR_AUB:
case CommandStreamReceiverType::hardwareWithAub:
case CommandStreamReceiverType::aub:
mode = aub_stream::mode::aubFile;
break;
case CommandStreamReceiverType::CSR_TBX:
case CommandStreamReceiverType::tbx:
mode = aub_stream::mode::tbx;
break;
case CommandStreamReceiverType::CSR_TBX_WITH_AUB:
case CommandStreamReceiverType::tbxWithAub:
mode = aub_stream::mode::aubFileAndTbx;
break;
case CommandStreamReceiverType::nullAub:
mode = aub_stream::mode::null;
break;
default:
break;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -48,7 +48,7 @@ class AubCenter {
return aubManager.get();
}
static uint32_t getAubStreamMode(const std::string &aubFileName, uint32_t csrType);
static uint32_t getAubStreamMode(const std::string &aubFileName, CommandStreamReceiverType csrType);
protected:
std::unique_ptr<PhysicalAddressAllocator> physicalAddressAllocator;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -102,7 +102,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
uint32_t getGUCWorkQueueItemHeader();
CommandStreamReceiverType getType() const override {
return CommandStreamReceiverType::CSR_AUB;
return CommandStreamReceiverType::aub;
}
int getAddressSpaceFromPTEBits(uint64_t entryBits) const;

View File

@@ -1077,7 +1077,7 @@ void CommandStreamReceiver::printTagAddressContent(TaskCountType taskCountToWait
}
bool CommandStreamReceiver::isTbxMode() const {
return (getType() == NEO::CommandStreamReceiverType::CSR_TBX || getType() == NEO::CommandStreamReceiverType::CSR_TBX_WITH_AUB);
return (getType() == NEO::CommandStreamReceiverType::tbx || getType() == NEO::CommandStreamReceiverType::tbxWithAub);
}
TaskCountType CompletionStamp::getTaskCountFromSubmissionStatusError(SubmissionStatus status) {

View File

@@ -127,7 +127,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
void resetKmdNotifyHelper(KmdNotifyHelper *newHelper);
CommandStreamReceiverType getType() const override {
return CommandStreamReceiverType::CSR_HW;
return CommandStreamReceiverType::hardware;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -36,10 +36,10 @@ class CommandStreamReceiverWithAUBDump : public BaseCSR {
void setupContext(OsContext &osContext) override;
CommandStreamReceiverType getType() const override {
if (BaseCSR::getType() == CommandStreamReceiverType::CSR_TBX) {
return CommandStreamReceiverType::CSR_TBX_WITH_AUB;
if (BaseCSR::getType() == CommandStreamReceiverType::tbx) {
return CommandStreamReceiverType::tbxWithAub;
}
return CommandStreamReceiverType::CSR_HW_WITH_AUB;
return CommandStreamReceiverType::hardwareWithAub;
}
WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -25,7 +25,7 @@ CommandStreamReceiverWithAUBDump<BaseCSR>::CommandStreamReceiverWithAUBDump(cons
const DeviceBitfield deviceBitfield)
: BaseCSR(executionEnvironment, rootDeviceIndex, deviceBitfield) {
bool isAubManager = executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter && executionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter->getAubManager();
bool isTbxMode = CommandStreamReceiverType::CSR_TBX == BaseCSR::getType();
bool isTbxMode = CommandStreamReceiverType::tbx == BaseCSR::getType();
bool createAubCsr = (isAubManager && isTbxMode) ? false : true;
if (createAubCsr) {
aubCSR.reset(AUBCommandStreamReceiver::create(baseName, false, executionEnvironment, rootDeviceIndex, deviceBitfield));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -27,25 +27,23 @@ CommandStreamReceiver *createCommandStreamImpl(ExecutionEnvironment &executionEn
return nullptr;
}
CommandStreamReceiver *commandStreamReceiver = nullptr;
int32_t csr = debugManager.flags.SetCommandStreamReceiver.get();
if (csr < 0) {
csr = CommandStreamReceiverType::CSR_HW;
}
CommandStreamReceiverType csrType = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware);
switch (csr) {
case CSR_HW:
switch (csrType) {
case CommandStreamReceiverType::hardware:
commandStreamReceiver = funcCreate(false, executionEnvironment, rootDeviceIndex, deviceBitfield);
break;
case CSR_AUB:
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::nullAub:
commandStreamReceiver = AUBCommandStreamReceiver::create(ApiSpecificConfig::getName(), true, executionEnvironment, rootDeviceIndex, deviceBitfield);
break;
case CSR_TBX:
case CommandStreamReceiverType::tbx:
commandStreamReceiver = TbxCommandStreamReceiver::create("", false, executionEnvironment, rootDeviceIndex, deviceBitfield);
break;
case CSR_HW_WITH_AUB:
case CommandStreamReceiverType::hardwareWithAub:
commandStreamReceiver = funcCreate(true, executionEnvironment, rootDeviceIndex, deviceBitfield);
break;
case CSR_TBX_WITH_AUB:
case CommandStreamReceiverType::tbxWithAub:
commandStreamReceiver = TbxCommandStreamReceiver::create(ApiSpecificConfig::getName(), true, executionEnvironment, rootDeviceIndex, deviceBitfield);
break;
default:

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -95,7 +95,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
std::set<GraphicsAllocation *> allocationsForDownload = {};
CommandStreamReceiverType getType() const override {
return CommandStreamReceiverType::CSR_TBX;
return CommandStreamReceiverType::tbx;
}
bool dumpTbxNonWritable = false;

View File

@@ -179,7 +179,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
if (debugManager.flags.AUBDumpCaptureFileName.get() != "unk") {
fullName.assign(debugManager.flags.AUBDumpCaptureFileName.get());
}
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, fullName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, fullName, CommandStreamReceiverType::tbxWithAub);
csr = new CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<GfxFamily>>(baseName, executionEnvironment, rootDeviceIndex, deviceBitfield);

View File

@@ -26,7 +26,7 @@ DECLARE_DEBUG_VARIABLE(int32_t, AUBDumpToggleCaptureOnOff, 0, "Toggle AUB captur
DECLARE_DEBUG_VARIABLE(int32_t, AubDumpOverrideMmioRegister, 0, "Override mmio offset from list with new value from AubDumpOverrideMmioRegisterValue")
DECLARE_DEBUG_VARIABLE(int32_t, AubDumpOverrideMmioRegisterValue, 0, "Value to override mmio offset from AubDumpOverrideMmioRegister")
DECLARE_DEBUG_VARIABLE(int32_t, ClDeviceGlobalMemSizeAvailablePercent, -1, "Percent of total GPU memory available; CL_DEVICE_GLOBAL_MEM_SIZE")
DECLARE_DEBUG_VARIABLE(int32_t, SetCommandStreamReceiver, -1, "Set command stream receiver to: 0 - HW, 1 - AUB, 2 - TBX, 3 - HW & AUB, 4 - TBX & AUB")
DECLARE_DEBUG_VARIABLE(int32_t, SetCommandStreamReceiver, -1, "Set command stream receiver to: 0 - HW, 1 - AUB, 2 - TBX, 3 - HW & AUB, 4 - TBX & AUB, 5 - NULL AUB")
DECLARE_DEBUG_VARIABLE(int32_t, TbxPort, 4321, "TCP-IP port of TBX server")
DECLARE_DEBUG_VARIABLE(int32_t, HBMSizePerTileInGigabytes, 0, "Size of HBM memory in GigaBytes per tile.")
DECLARE_DEBUG_VARIABLE(bool, TbxFrontdoorMode, false, "Set TBX frontdoor mode for read and write memory accesses (the default mode is via backdoor)")

View File

@@ -756,7 +756,7 @@ bool Device::isFullRangeSvm() const {
}
EngineControl &Device::getInternalEngine() {
if (this->allEngines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::CSR_HW) {
if (this->allEngines[0].commandStreamReceiver->getType() != CommandStreamReceiverType::hardware) {
return this->getDefaultEngine();
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,7 +14,7 @@ bool Device::isBlitSplitEnabled() {
}
bool Device::isInitDeviceWithFirstSubmissionEnabled(CommandStreamReceiverType csrType) {
return csrType == CommandStreamReceiverType::CSR_HW;
return csrType == CommandStreamReceiverType::hardware;
}
} // namespace NEO

View File

@@ -62,19 +62,17 @@ bool ExecutionEnvironment::initializeMemoryManager() {
return memoryManager->isInitialized();
}
int32_t setCommandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
if (debugManager.flags.SetCommandStreamReceiver.get() >= 0) {
setCommandStreamReceiverType = debugManager.flags.SetCommandStreamReceiver.get();
}
auto csrType = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware);
switch (setCommandStreamReceiverType) {
case CommandStreamReceiverType::CSR_TBX:
case CommandStreamReceiverType::CSR_TBX_WITH_AUB:
case CommandStreamReceiverType::CSR_AUB:
switch (csrType) {
case CommandStreamReceiverType::tbx:
case CommandStreamReceiverType::tbxWithAub:
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::nullAub:
memoryManager = std::make_unique<OsAgnosticMemoryManager>(*this);
break;
case CommandStreamReceiverType::CSR_HW:
case CommandStreamReceiverType::CSR_HW_WITH_AUB:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
default: {
auto driverModelType = DriverModelType::unknown;
if (this->rootDeviceEnvironments[0]->osInterface && this->rootDeviceEnvironments[0]->osInterface->getDriverModel()) {

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) {

View File

@@ -128,11 +128,13 @@ bool DeviceFactory::prepareDeviceEnvironmentsForProductFamilyOverride(ExecutionE
}
bool DeviceFactory::isHwModeSelected() {
int32_t csr = debugManager.flags.SetCommandStreamReceiver.get();
switch (csr) {
case CSR_AUB:
case CSR_TBX:
case CSR_TBX_WITH_AUB:
CommandStreamReceiverType csrType = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware);
switch (csrType) {
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::tbx:
case CommandStreamReceiverType::tbxWithAub:
case CommandStreamReceiverType::nullAub:
return false;
default:
return true;

View File

@@ -27,7 +27,7 @@ class DrmMemoryOperationsHandlerWithAubDump : public BaseOperationsHandler {
auto hardwareInfo = rootDeviceEnvironment.getMutableHardwareInfo();
auto localMemoryEnabled = gfxCoreHelper.getEnableLocalMemory(*hardwareInfo);
rootDeviceEnvironment.initGmm();
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(CommandStreamReceiverType::CSR_HW_WITH_AUB));
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(CommandStreamReceiverType::hardwareWithAub));
}
const auto aubCenter = rootDeviceEnvironment.aubCenter.get();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -52,7 +52,7 @@ bool initDrmOsInterface(std::unique_ptr<HwDeviceId> &&hwDeviceId, uint32_t rootD
return false;
}
const bool isCsrHwWithAub = debugManager.flags.SetCommandStreamReceiver.get() == CommandStreamReceiverType::CSR_HW_WITH_AUB;
const bool isCsrHwWithAub = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware) == CommandStreamReceiverType::hardwareWithAub;
rootDeviceEnv->memoryOperationsInterface = DrmMemoryOperationsHandler::create(*drm, rootDeviceIndex, isCsrHwWithAub);
return true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,7 +22,7 @@ bool initWddmOsInterface(std::unique_ptr<HwDeviceId> &&hwDeviceId, RootDeviceEnv
return false;
}
const bool isCsrHwWithAub = debugManager.flags.SetCommandStreamReceiver.get() == CommandStreamReceiverType::CSR_HW_WITH_AUB;
const bool isCsrHwWithAub = obtainCsrTypeFromIntegerValue(debugManager.flags.SetCommandStreamReceiver.get(), CommandStreamReceiverType::hardware) == CommandStreamReceiverType::hardwareWithAub;
rootDeviceEnv->memoryOperationsInterface = WddmMemoryOperationsHandler::create(wddm, rootDeviceEnv, isCsrHwWithAub);
return true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -27,7 +27,7 @@ class WddmMemoryOperationsHandlerWithAubDump : public BaseOperationsHandler {
auto hardwareInfo = rootDeviceEnvironment.getMutableHardwareInfo();
auto localMemoryEnabled = gfxCoreHelper.getEnableLocalMemory(*hardwareInfo);
rootDeviceEnvironment.initGmm();
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(CommandStreamReceiverType::CSR_HW_WITH_AUB));
rootDeviceEnvironment.initAubCenter(localMemoryEnabled, "", static_cast<CommandStreamReceiverType>(CommandStreamReceiverType::hardwareWithAub));
}
const auto aubCenter = rootDeviceEnvironment.aubCenter.get();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -143,7 +143,7 @@ inline void PageFaultManager::migrateStorageToCpuDomain(void *ptr, PageFaultData
}
void PageFaultManager::selectGpuDomainHandler() {
if (debugManager.flags.SetCommandStreamReceiver.get() > CommandStreamReceiverType::CSR_HW || debugManager.flags.NEO_CAL_ENABLED.get()) {
if (debugManager.flags.SetCommandStreamReceiver.get() > static_cast<int32_t>(CommandStreamReceiverType::hardware) || debugManager.flags.NEO_CAL_ENABLED.get()) {
this->gpuDomainHandler = &PageFaultManager::unprotectAndTransferMemory;
}
}

View File

@@ -199,7 +199,7 @@ int main(int argc, char **argv) {
} else if (!strcmp("--disable_pagefaulting_tests", argv[i])) { // disable tests which raise page fault signal during execution
NEO::PagaFaultManagerTestConfig::disabled = true;
} else if (!strcmp("--tbx", argv[i])) {
if (testMode == TestMode::aubTests) {
if (isAubTestMode(testMode)) {
testMode = TestMode::aubTestsWithTbx;
}
initialHardwareTag = 0;
@@ -265,21 +265,26 @@ int main(int argc, char **argv) {
}
} else if (!strcmp("--generate_random_inputs", argv[i])) {
generateRandomInput = true;
} else if (!strcmp("--read-config", argv[i]) && (testMode == TestMode::aubTests || testMode == TestMode::aubTestsWithTbx)) {
} else if (!strcmp("--read-config", argv[i]) && isAubTestMode(testMode)) {
if (debugManager.registryReadAvailable()) {
debugManager.setReaderImpl(SettingsReader::create(ApiSpecificConfig::getRegistryPath()));
debugManager.injectSettingsFromReader();
}
} else if (!strcmp("--dump_buffer_format", argv[i]) && testMode == TestMode::aubTests) {
} else if (!strcmp("--dump_buffer_format", argv[i]) && isAubTestMode(testMode)) {
++i;
std::string dumpBufferFormat(argv[i]);
std::transform(dumpBufferFormat.begin(), dumpBufferFormat.end(), dumpBufferFormat.begin(), ::toupper);
debugManager.flags.AUBDumpBufferFormat.set(dumpBufferFormat);
} else if (!strcmp("--dump_image_format", argv[i]) && testMode == TestMode::aubTests) {
} else if (!strcmp("--dump_image_format", argv[i]) && isAubTestMode(testMode)) {
++i;
std::string dumpImageFormat(argv[i]);
std::transform(dumpImageFormat.begin(), dumpImageFormat.end(), dumpImageFormat.begin(), ::toupper);
debugManager.flags.AUBDumpImageFormat.set(dumpImageFormat);
} else if (!strcmp("--null_aubstream", argv[i])) {
if (isAubTestMode(testMode)) {
testMode = TestMode::aubTestsWithoutOutputFiles;
}
initialHardwareTag = 0;
}
}

View File

@@ -92,9 +92,9 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
debugManager.flags.AUBDumpCaptureFileName.set(filename);
if (testMode == TestMode::aubTestsWithTbx) {
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::CSR_TBX_WITH_AUB));
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::tbxWithAub));
} else {
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::CSR_AUB));
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
}
localHwInfo.capabilityTable.blitterOperationsSupported = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2023 Intel Corporation
* Copyright (C) 2022-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,7 +18,7 @@ namespace NEO {
MockAubCenterFixture::MockAubCenterFixture(CommandStreamReceiverType commandStreamReceiverType) : commandStreamReceiverType(commandStreamReceiverType){};
void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment) {
setMockAubCenter(rootDeviceEnvironment, CommandStreamReceiverType::CSR_AUB);
setMockAubCenter(rootDeviceEnvironment, CommandStreamReceiverType::aub);
}
void MockAubCenterFixture::setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment, CommandStreamReceiverType commandStreamReceiverType) {
if (testMode != TestMode::aubTests && testMode != TestMode::aubTestsWithTbx) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -25,6 +25,6 @@ struct MockAubCenterFixture {
static void setMockAubCenter(RootDeviceEnvironment &rootDeviceEnvironment, CommandStreamReceiverType commandStreamReceiverType);
protected:
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::CSR_AUB;
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::aub;
};
} // namespace NEO

View File

@@ -505,7 +505,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
WaitStatus returnWaitForCompletionWithTimeout = WaitStatus::ready;
std::optional<WaitStatus> waitForTaskCountWithKmdNotifyFallbackReturnValue{};
std::optional<SubmissionStatus> flushReturnValue{};
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::hardware;
std::atomic<uint32_t> downloadAllocationsCalledCount = 0;
bool cpuCopyForHostPtrSurfaceAllowed = false;

View File

@@ -254,7 +254,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
std::optional<bool> isGpuHangDetectedReturnValue{};
std::optional<bool> testTaskCountReadyReturnValue{};
WaitStatus waitForCompletionWithTimeoutReturnValue{WaitStatus::ready};
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
CommandStreamReceiverType commandStreamReceiverType = CommandStreamReceiverType::hardware;
BatchBuffer latestFlushedBatchBuffer = {};
QueueThrottle getLastDirectSubmissionThrottleReturnValue = QueueThrottle::MEDIUM;
bool getAcLineConnectedReturnValue = true;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -88,7 +88,7 @@ class MockCsrAub : public MockCsrBase<GfxFamily> {
const DeviceBitfield deviceBitfield)
: MockCsrBase<GfxFamily>(execStamp, executionEnvironment, rootDeviceIndex, deviceBitfield) {}
CommandStreamReceiverType getType() const override {
return CommandStreamReceiverType::CSR_AUB;
return CommandStreamReceiverType::aub;
}
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -15,7 +15,15 @@ enum class TestMode { notSpecified,
unitTests,
aubTests,
aubTestsWithTbx,
tbxTests };
tbxTests,
aubTestsWithoutOutputFiles
};
inline bool isAubTestMode(TestMode testMode) {
return testMode == TestMode::aubTests ||
testMode == TestMode::aubTestsWithTbx ||
testMode == TestMode::aubTestsWithoutOutputFiles;
}
extern TestMode testMode;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -32,7 +32,7 @@ struct AubCenterTests : public ::testing::Test {
TEST_F(AubCenterTests, GivenUseAubStreamDebugVariableNotSetWhenAubCenterIsCreatedThenAubCenterDoesNotCreateAubManager) {
debugManager.flags.UseAubStream.set(false);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::aub);
EXPECT_EQ(nullptr, aubCenter.aubManager.get());
}
@@ -40,7 +40,7 @@ TEST_F(AubCenterTests, GivenDefaultSetCommandStreamReceiverFlagAndAubFileNameWhe
debugManager.flags.UseAubStream.set(true);
std::string aubFile("test.aub");
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_AUB);
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::aub);
EXPECT_EQ(aub_stream::mode::aubFile, mode);
}
@@ -49,7 +49,7 @@ TEST_F(AubCenterTests, GivenCsrHwAndEmptyAubFileNameWhenGettingAubStreamModeThen
debugManager.flags.UseAubStream.set(true);
std::string aubFile("");
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_HW);
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::hardware);
EXPECT_EQ(aub_stream::mode::aubFile, mode);
}
@@ -58,7 +58,7 @@ TEST_F(AubCenterTests, GivenCsrHwAndNotEmptyAubFileNameWhenGettingAubStreamModeT
debugManager.flags.UseAubStream.set(true);
std::string aubFile("test.aub");
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_HW);
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::hardware);
EXPECT_EQ(aub_stream::mode::aubFile, mode);
}
@@ -87,7 +87,7 @@ TEST_F(AubCenterTests, WhenAubManagerIsCreatedThenCorrectSteppingIsSet) {
}
hwInfo.platform.usRevId = hwRevId;
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::aub);
EXPECT_EQ(steppingPair.expectedAubStreamStepping, aubCenter.stepping);
}
}
@@ -95,7 +95,7 @@ TEST_F(AubCenterTests, WhenAubManagerIsCreatedThenCorrectSteppingIsSet) {
HWTEST_F(AubCenterTests, whenCreatingAubManagerThenCorrectProductFamilyIsPassed) {
debugManager.flags.UseAubStream.set(true);
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_TBX);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::tbx));
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
@@ -103,7 +103,7 @@ HWTEST_F(AubCenterTests, whenCreatingAubManagerThenCorrectProductFamilyIsPassed)
ASSERT_TRUE(aubStreamProductFamily.has_value());
MockAubCenter aubCenter(rootDeviceEnvironment, true, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, true, "", CommandStreamReceiverType::aub);
auto aubManager = static_cast<MockAubManager *>(aubCenter.aubManager.get());
ASSERT_NE(nullptr, aubManager);
@@ -116,13 +116,13 @@ TEST_F(AubCenterTests, GivenCsrTypeWhenGettingAubStreamModeThenCorrectModeIsRetu
std::string aubFile("test.aub");
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_AUB);
auto mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::aub);
EXPECT_EQ(aub_stream::mode::aubFile, mode);
mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_TBX);
mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::tbx);
EXPECT_EQ(aub_stream::mode::tbx, mode);
mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
mode = AubCenter::getAubStreamMode(aubFile, CommandStreamReceiverType::tbxWithAub);
EXPECT_EQ(aub_stream::mode::aubFileAndTbx, mode);
}
@@ -130,40 +130,40 @@ TEST_F(AubCenterTests, GivenSetCommandStreamReceiverFlagEqualDefaultHwWhenAubMan
debugManager.flags.UseAubStream.set(true);
debugManager.flags.SetCommandStreamReceiver.set(-1);
std::vector<CommandStreamReceiverType> aubTypes = {CommandStreamReceiverType::CSR_HW,
CommandStreamReceiverType::CSR_HW_WITH_AUB,
CommandStreamReceiverType::CSR_AUB};
std::vector<CommandStreamReceiverType> aubTypes = {CommandStreamReceiverType::hardware,
CommandStreamReceiverType::hardwareWithAub,
CommandStreamReceiverType::aub};
for (auto type : aubTypes) {
for (auto &type : aubTypes) {
MockAubCenter aubCenter(rootDeviceEnvironment, true, "test", type);
EXPECT_EQ(aub_stream::mode::aubFile, aubCenter.aubStreamMode);
}
MockAubCenter aubCenter2(rootDeviceEnvironment, true, "", CommandStreamReceiverType::CSR_TBX);
MockAubCenter aubCenter2(rootDeviceEnvironment, true, "", CommandStreamReceiverType::tbx);
EXPECT_EQ(aub_stream::mode::tbx, aubCenter2.aubStreamMode);
MockAubCenter aubCenter3(rootDeviceEnvironment, true, "", CommandStreamReceiverType::CSR_TBX_WITH_AUB);
MockAubCenter aubCenter3(rootDeviceEnvironment, true, "", CommandStreamReceiverType::tbxWithAub);
EXPECT_EQ(aub_stream::mode::aubFileAndTbx, aubCenter3.aubStreamMode);
}
TEST_F(AubCenterTests, GivenSetCommandStreamReceiverFlagSetWhenAubManagerIsCreatedThenDebugFlagDefinesAubStreamMode) {
debugManager.flags.UseAubStream.set(true);
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_TBX);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::tbx));
MockAubCenter aubCenter(rootDeviceEnvironment, true, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, true, "", CommandStreamReceiverType::aub);
EXPECT_EQ(aub_stream::mode::tbx, aubCenter.aubStreamMode);
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_TBX_WITH_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::tbxWithAub));
MockAubCenter aubCenter2(rootDeviceEnvironment, true, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter2(rootDeviceEnvironment, true, "", CommandStreamReceiverType::aub);
EXPECT_EQ(aub_stream::mode::aubFileAndTbx, aubCenter2.aubStreamMode);
}
TEST_F(AubCenterTests, GivenAubCenterInSubCaptureModeWhenItIsCreatedWithoutDebugFilterSettingsThenItInitializesSubCaptureFiltersWithDefaults) {
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::aub);
auto subCaptureCommon = aubCenter.getSubCaptureCommon();
EXPECT_NE(nullptr, subCaptureCommon);
@@ -178,7 +178,7 @@ TEST_F(AubCenterTests, GivenAubCenterInSubCaptureModeWhenItIsCreatedWithDebugFil
debugManager.flags.AUBDumpFilterKernelEndIdx.set(100);
debugManager.flags.AUBDumpFilterKernelName.set("kernel_name");
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::aub);
auto subCaptureCommon = aubCenter.getSubCaptureCommon();
EXPECT_NE(nullptr, subCaptureCommon);

View File

@@ -87,7 +87,7 @@ TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreat
TEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenTypeIsCheckedThenAubCsrIsReturned) {
std::unique_ptr<CommandStreamReceiver> aubCsr(AUBCommandStreamReceiver::create("", true, *pDevice->executionEnvironment, pDevice->getRootDeviceIndex(), pDevice->getDeviceBitfield()));
EXPECT_NE(nullptr, aubCsr);
EXPECT_EQ(CommandStreamReceiverType::CSR_AUB, aubCsr->getType());
EXPECT_EQ(CommandStreamReceiverType::aub, aubCsr->getType());
}
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenItIsCreatedThenAubManagerAndHardwareContextAreNull) {
@@ -173,7 +173,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenMultipl
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWithAubManagerWhenItIsCreatedThenFileIsCreated) {
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -189,7 +189,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenOsContextIsSetThenCreateH
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_BCS, EngineUsage::regular}, DeviceBitfield(8)));
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -206,7 +206,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrAndHighPriorityContextWhenOsC
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::highPriority}, DeviceBitfield(1)));
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -221,7 +221,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenLowPriorityOsContextIsSet
MockOsContext osContext(0, EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_RCS, EngineUsage::lowPriority}));
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -327,7 +327,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenCompressedGraphicsAllocationWritabl
debugManager.flags.AUBDumpBufferFormat.set("TRE");
auto gmmHelper = pDevice->executionEnvironment->rootDeviceEnvironments[0]->getGmmHelper();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "aubfile", CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "aubfile", CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::make_unique<MockAubManager>();
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter);

View File

@@ -3218,19 +3218,19 @@ HWTEST_F(CommandStreamReceiverHwTest, whenFlushTaskCalledThenSetPassNumClients)
HWTEST_F(CommandStreamReceiverHwTest, givenVariousCsrModeWhenGettingTbxModeThenExpectOnlyWhenModeIsTbxOrTbxWithAub) {
auto &ultCsr = pDevice->getUltCommandStreamReceiver<FamilyType>();
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_HW;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::hardware;
EXPECT_FALSE(ultCsr.isTbxMode());
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_HW_WITH_AUB;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::hardwareWithAub;
EXPECT_FALSE(ultCsr.isTbxMode());
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_AUB;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::aub;
EXPECT_FALSE(ultCsr.isTbxMode());
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::tbx;
EXPECT_TRUE(ultCsr.isTbxMode());
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::CSR_TBX_WITH_AUB;
ultCsr.commandStreamReceiverType = CommandStreamReceiverType::tbxWithAub;
EXPECT_TRUE(ultCsr.isTbxMode());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -204,13 +204,13 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
executionEnvironment->initializeMemoryManager();
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_TBX_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::tbxWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
DeviceBitfield deviceBitfield(1);
CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
ASSERT_EQ(nullptr, csrWithAubDump.aubCSR);
EXPECT_EQ(CommandStreamReceiverType::CSR_TBX_WITH_AUB, csrWithAubDump.getType());
EXPECT_EQ(CommandStreamReceiverType::tbxWithAub, csrWithAubDump.getType());
}
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhenHwCsrWithAubDumpIsCreatedThenAubCsrIsCreated) {
@@ -219,21 +219,21 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubManagerAvailableWhe
std::string fileName = "file_name.aub";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::hardwareWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
DeviceBitfield deviceBitfield(1);
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("aubfile", *executionEnvironment, 0, deviceBitfield);
ASSERT_NE(nullptr, csrWithAubDump.aubCSR);
EXPECT_EQ(CommandStreamReceiverType::CSR_HW_WITH_AUB, csrWithAubDump.getType());
EXPECT_EQ(CommandStreamReceiverType::hardwareWithAub, csrWithAubDump.getType());
}
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenWaitingForTaskCountThenAddPollForCompletion) {
auto executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::hardwareWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(new MockAubManager());
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -257,7 +257,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenPoll
auto executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::hardwareWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(new MockAubManager());
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -346,7 +346,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenCrea
auto executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::hardwareWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(new MockAubManager());
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -371,7 +371,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubCsrWithHwWhenAdding
auto executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::hardwareWithAub);
auto mockAubManager = new MockAubManager();
mockAubCenter->aubManager.reset(mockAubManager);
@@ -388,7 +388,7 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenAubCsrWithTbxWhenAddin
auto executionEnvironment = pDevice->getExecutionEnvironment();
executionEnvironment->initializeMemoryManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::CSR_TBX_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "file_name.aub", CommandStreamReceiverType::tbxWithAub);
auto mockAubManager = new MockAubManager();
mockAubCenter->aubManager.reset(mockAubManager);
@@ -442,7 +442,7 @@ struct CommandStreamReceiverTagTests : public ::testing::Test {
executionEnvironment->initializeMemoryManager();
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment->rootDeviceEnvironments[0], false, fileName, CommandStreamReceiverType::CSR_HW_WITH_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment->rootDeviceEnvironments[0], false, fileName, CommandStreamReceiverType::hardwareWithAub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2023 Intel Corporation
* Copyright (C) 2018-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -68,13 +68,13 @@ TEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWithPciPathW
GTEST_SKIP();
}
for (int csrTypes = -1; csrTypes <= CSR_TYPES_NUM; csrTypes++) {
for (int csrTypes = -1; csrTypes <= static_cast<int>(CommandStreamReceiverType::typesNum); csrTypes++) {
CommandStreamReceiverType csrType;
if (csrTypes != -1) {
csrType = static_cast<CommandStreamReceiverType>(csrTypes);
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(csrTypes);
} else {
csrType = CSR_HW;
csrType = CommandStreamReceiverType::hardware;
debugManager.flags.SetCommandStreamReceiver.set(-1);
}
@@ -90,9 +90,9 @@ TEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWithPciPathW
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
case CSR_TYPES_NUM:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
case CommandStreamReceiverType::typesNum:
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
break;
@@ -112,13 +112,13 @@ TEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWithPciPathF
GTEST_SKIP();
}
for (int csrTypes = -1; csrTypes <= CSR_TYPES_NUM; csrTypes++) {
for (int csrTypes = -1; csrTypes <= static_cast<int>(CommandStreamReceiverType::typesNum); csrTypes++) {
CommandStreamReceiverType csrType;
if (csrTypes != -1) {
csrType = static_cast<CommandStreamReceiverType>(csrTypes);
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(csrTypes);
} else {
csrType = CSR_HW;
csrType = CommandStreamReceiverType::hardware;
debugManager.flags.SetCommandStreamReceiver.set(-1);
}
@@ -134,9 +134,9 @@ TEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWithPciPathF
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
case CSR_TYPES_NUM:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
case CommandStreamReceiverType::typesNum:
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
break;
@@ -156,13 +156,13 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
GTEST_SKIP();
}
for (int csrTypes = -1; csrTypes <= CSR_TYPES_NUM; csrTypes++) {
for (int csrTypes = -1; csrTypes <= static_cast<int>(CommandStreamReceiverType::typesNum); csrTypes++) {
CommandStreamReceiverType csrType;
if (csrTypes != -1) {
csrType = static_cast<CommandStreamReceiverType>(csrTypes);
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(csrTypes);
} else {
csrType = CSR_HW;
csrType = CommandStreamReceiverType::hardware;
debugManager.flags.SetCommandStreamReceiver.set(-1);
}
@@ -177,14 +177,15 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
break;
case CSR_AUB:
case CSR_TBX:
case CSR_TBX_WITH_AUB: {
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::tbx:
case CommandStreamReceiverType::nullAub:
case CommandStreamReceiverType::tbxWithAub: {
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
@@ -232,13 +233,13 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
GTEST_SKIP();
}
for (int csrTypes = -1; csrTypes <= CSR_TYPES_NUM; csrTypes++) {
for (int csrTypes = -1; csrTypes <= static_cast<int>(CommandStreamReceiverType::typesNum); csrTypes++) {
CommandStreamReceiverType csrType;
if (csrTypes != -1) {
csrType = static_cast<CommandStreamReceiverType>(csrTypes);
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(csrTypes);
} else {
csrType = CSR_HW;
csrType = CommandStreamReceiverType::hardware;
debugManager.flags.SetCommandStreamReceiver.set(-1);
}
@@ -255,14 +256,15 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
break;
case CSR_AUB:
case CSR_TBX:
case CSR_TBX_WITH_AUB: {
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::nullAub:
case CommandStreamReceiverType::tbx:
case CommandStreamReceiverType::tbxWithAub: {
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
@@ -293,7 +295,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenUpperCaseDeprecatedAcronymsToProduc
std::transform(deprecatedAcronym.begin(), deprecatedAcronym.end(), deprecatedAcronym.begin(), ::toupper);
debugManager.flags.ProductFamilyOverride.set(deprecatedAcronym);
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
MockExecutionEnvironment exeEnv;
bool ret = prepareDeviceEnvironments(exeEnv);
@@ -314,7 +316,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenUpperCaseProductFamilyOverrideFlagS
std::transform(product.begin(), product.end(), product.begin(), ::toupper);
debugManager.flags.ProductFamilyOverride.set(product);
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_AUB);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::aub));
MockExecutionEnvironment exeEnv;
bool ret = prepareDeviceEnvironments(exeEnv);
@@ -326,11 +328,11 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenUpperCaseProductFamilyOverrideFlagS
HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknownProductFamilyWhenCsrIsSetToValidTypeThenTheFunctionReturnsTheExpectedValueOfHardwareInfo) {
uint32_t expectedDevices = 1;
debugManager.flags.CreateMultipleRootDevices.set(expectedDevices);
for (int csrTypes = 0; csrTypes <= CSR_TYPES_NUM; csrTypes++) {
for (int csrTypes = 0; csrTypes <= static_cast<int>(CommandStreamReceiverType::typesNum); csrTypes++) {
CommandStreamReceiverType csrType = static_cast<CommandStreamReceiverType>(csrTypes);
std::string productFamily("unk");
debugManager.flags.SetCommandStreamReceiver.set(csrType);
debugManager.flags.SetCommandStreamReceiver.set(csrTypes);
debugManager.flags.ProductFamilyOverride.set(productFamily);
MockExecutionEnvironment exeEnv;
exeEnv.prepareRootDeviceEnvironments(expectedDevices);
@@ -343,13 +345,14 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
auto releaseHelper = exeEnv.rootDeviceEnvironments[i]->getReleaseHelper();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
case CommandStreamReceiverType::hardware:
case CommandStreamReceiverType::hardwareWithAub:
EXPECT_TRUE(ret);
break;
case CSR_AUB:
case CSR_TBX:
case CSR_TBX_WITH_AUB: {
case CommandStreamReceiverType::aub:
case CommandStreamReceiverType::nullAub:
case CommandStreamReceiverType::tbx:
case CommandStreamReceiverType::tbxWithAub: {
EXPECT_TRUE(ret);
EXPECT_NE(nullptr, hwInfo);
for (i = 0; i < IGFX_MAX_PRODUCT; i++) {

View File

@@ -48,7 +48,7 @@ struct TbxFixture : public TbxCommandStreamFixture,
using TbxCommandStreamFixture::setUp;
TbxFixture() : MockAubCenterFixture(CommandStreamReceiverType::CSR_TBX) {}
TbxFixture() : MockAubCenterFixture(CommandStreamReceiverType::tbx) {}
void setUp() {
DeviceFixture::setUp();
@@ -103,7 +103,7 @@ TEST(TbxCommandStreamReceiverTest, givenTbxCommandStreamReceiverWhenTypeIsChecke
executionEnvironment->initializeMemoryManager();
std::unique_ptr<CommandStreamReceiver> csr(TbxCommandStreamReceiver::create("", false, *executionEnvironment, 0, 1));
EXPECT_NE(nullptr, csr);
EXPECT_EQ(CommandStreamReceiverType::CSR_TBX, csr->getType());
EXPECT_EQ(CommandStreamReceiverType::tbx, csr->getType());
}
HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenMakeResidentIsCalledForGraphicsAllocationThenItShouldPushAllocationForResidencyToCsr) {
@@ -570,7 +570,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCommandStreamReceiverWhenDownloadAllocat
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenHardwareContextIsCreatedThenTbxStreamInCsrIsNotInitialized) {
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "", CommandStreamReceiverType::CSR_TBX);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, "", CommandStreamReceiverType::tbx);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -585,7 +585,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenOsContextIsSetThenCreateHardwareC
std::string fileName = "";
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::CSR_TBX);
MockAubCenter *mockAubCenter = new MockAubCenter(pDevice->getRootDeviceEnvironment(), false, fileName, CommandStreamReceiverType::tbx);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
pDevice->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
@@ -620,7 +620,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpThenFileNameIsE
executionEnvironment.initGmm();
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::CSR_TBX);
setMockAubCenter(*rootDeviceEnvironment, CommandStreamReceiverType::tbx);
auto fullName = AUBCommandStreamReceiver::createFullFilePath(*defaultHwInfo, "aubfile", mockRootDeviceIndex);

View File

@@ -79,7 +79,7 @@ TEST(RootDeviceEnvironment, givenExecutionEnvironmentWhenInitializeAubCenterIsCa
MockExecutionEnvironment executionEnvironment;
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
auto rootDeviceEnvironment = static_cast<MockRootDeviceEnvironment *>(executionEnvironment.rootDeviceEnvironments[0].get());
rootDeviceEnvironment->initAubCenter(true, "test.aub", CommandStreamReceiverType::CSR_AUB);
rootDeviceEnvironment->initAubCenter(true, "test.aub", CommandStreamReceiverType::aub);
EXPECT_TRUE(rootDeviceEnvironment->initAubCenterCalled);
EXPECT_TRUE(rootDeviceEnvironment->localMemoryEnabledReceived);
EXPECT_STREQ(rootDeviceEnvironment->aubFileNameReceived.c_str(), "test.aub");
@@ -117,7 +117,7 @@ TEST(RootDeviceEnvironment, givenUseAubStreamFalseWhenGetAubManagerIsCalledThenR
MockExecutionEnvironment executionEnvironment{defaultHwInfo.get(), false, 1u};
auto rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::CSR_AUB);
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::aub);
auto aubManager = rootDeviceEnvironment->aubCenter->getAubManager();
EXPECT_EQ(nullptr, aubManager);
}
@@ -125,14 +125,14 @@ TEST(RootDeviceEnvironment, givenUseAubStreamFalseWhenGetAubManagerIsCalledThenR
TEST(RootDeviceEnvironment, givenExecutionEnvironmentWhenInitializeAubCenterIsCalledThenItIsInitalizedOnce) {
MockExecutionEnvironment executionEnvironment{defaultHwInfo.get(), false, 1u};
auto rootDeviceEnvironment = executionEnvironment.rootDeviceEnvironments[0].get();
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::CSR_AUB);
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::aub);
auto currentAubCenter = rootDeviceEnvironment->aubCenter.get();
EXPECT_NE(nullptr, currentAubCenter);
auto currentAubStreamProvider = currentAubCenter->getStreamProvider();
EXPECT_NE(nullptr, currentAubStreamProvider);
auto currentAubFileStream = currentAubStreamProvider->getStream();
EXPECT_NE(nullptr, currentAubFileStream);
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::CSR_AUB);
rootDeviceEnvironment->initAubCenter(false, "", CommandStreamReceiverType::aub);
EXPECT_EQ(currentAubCenter, rootDeviceEnvironment->aubCenter.get());
EXPECT_EQ(currentAubStreamProvider, rootDeviceEnvironment->aubCenter->getStreamProvider());
EXPECT_EQ(currentAubFileStream, rootDeviceEnvironment->aubCenter->getStreamProvider()->getStream());
@@ -340,7 +340,7 @@ TEST(ExecutionEnvironment, givenExecutionEnvironmentWithVariousMembersWhenItIsDe
MemoryOperationsHandlerMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}
};
struct AubCenterMock : public DestructorCounted<AubCenter, 2> {
AubCenterMock(uint32_t &destructorId, const RootDeviceEnvironment &rootDeviceEnvironment) : DestructorCounted(destructorId, rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB) {}
AubCenterMock(uint32_t &destructorId, const RootDeviceEnvironment &rootDeviceEnvironment) : DestructorCounted(destructorId, rootDeviceEnvironment, false, "", CommandStreamReceiverType::aub) {}
};
struct CompilerInterfaceMock : public DestructorCounted<CompilerInterface, 1> {
CompilerInterfaceMock(uint32_t &destructorId) : DestructorCounted(destructorId) {}

View File

@@ -1354,7 +1354,7 @@ TEST_F(GmmLocalMemoryTests, givenLocalMemoryAndStorageInfoWithLocalOnlyRequiredW
gmmRequirements.preferCompressed = false;
DebugManagerStateRestore restorer;
for (auto csrMode = static_cast<int32_t>(CommandStreamReceiverType::CSR_HW); csrMode < static_cast<int32_t>(CommandStreamReceiverType::CSR_TYPES_NUM); csrMode++) {
for (auto csrMode = static_cast<int32_t>(CommandStreamReceiverType::hardware); csrMode < static_cast<int32_t>(CommandStreamReceiverType::typesNum); csrMode++) {
debugManager.flags.SetCommandStreamReceiver.set(csrMode);
auto gmm = std::make_unique<Gmm>(getGmmHelper(), nullptr, 1, 0, GMM_RESOURCE_USAGE_OCL_BUFFER, storageInfo, gmmRequirements);
EXPECT_EQ(1u, gmm->resourceParams.Flags.Info.LocalOnly);
@@ -1421,7 +1421,7 @@ TEST_F(GmmLocalMemoryTests, givenFtrLocalMemoryWhenUseSystemMemoryIsFalseAndAllo
GmmRequirements gmmRequirements{};
gmmRequirements.allowLargePages = true;
gmmRequirements.preferCompressed = false;
for (auto csrMode = static_cast<int32_t>(CommandStreamReceiverType::CSR_HW); csrMode < static_cast<int32_t>(CommandStreamReceiverType::CSR_TYPES_NUM); csrMode++) {
for (auto csrMode = static_cast<int32_t>(CommandStreamReceiverType::hardware); csrMode < static_cast<int32_t>(CommandStreamReceiverType::typesNum); csrMode++) {
debugManager.flags.SetCommandStreamReceiver.set(csrMode);
StorageInfo storageInfo{};
storageInfo.memoryBanks.set(1);

View File

@@ -662,7 +662,7 @@ TEST_F(MemoryAllocatorTest, WhenPopulatingOsHandleThenOneFragmentIsReturned) {
TEST_F(MemoryAllocatorTest, givenOsHandleStorageWhenOsHandlesAreCleanedAndAubManagerIsNotAvailableThenFreeMemoryIsNotCalledOnAubManager) {
MockExecutionEnvironment mockExecutionEnvironment(defaultHwInfo.get());
MockMemoryManager mockMemoryManager(mockExecutionEnvironment);
auto mockAubCenter = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::CSR_AUB);
auto mockAubCenter = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::aub);
mockAubCenter->aubManager.reset(nullptr);
mockExecutionEnvironment.rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter);
@@ -682,12 +682,12 @@ TEST_F(MemoryAllocatorTest, givenOsHandleStorageAndFreeMemoryEnabledWhenOsHandle
MockExecutionEnvironment mockExecutionEnvironment(defaultHwInfo.get(), true, 3);
MockMemoryManager mockMemoryManager(mockExecutionEnvironment);
auto mockManager0 = new MockAubManager();
auto mockAubCenter0 = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::CSR_AUB);
auto mockAubCenter0 = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::aub);
mockAubCenter0->aubManager.reset(mockManager0);
mockExecutionEnvironment.rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter0);
auto mockManager1 = new MockAubManager();
auto mockAubCenter1 = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::CSR_AUB);
auto mockAubCenter1 = new MockAubCenter(*mockExecutionEnvironment.rootDeviceEnvironments[0], false, "aubfile", CommandStreamReceiverType::aub);
mockAubCenter1->aubManager.reset(mockManager1);
mockExecutionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->aubCenter.reset(mockAubCenter1);
@@ -706,7 +706,7 @@ HWTEST_F(MemoryAllocatorTest, givenAllocationUsedByContextWhenFreeingThenHandleC
debugManager.flags.EnableFreeMemory.set(true);
const uint32_t rootDeviceIndex = 0u;
auto mockManager0 = new MockAubManager();
auto mockAubCenter0 = new MockAubCenter(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex], false, "aubfile", CommandStreamReceiverType::CSR_AUB);
auto mockAubCenter0 = new MockAubCenter(*executionEnvironment->rootDeviceEnvironments[rootDeviceIndex], false, "aubfile", CommandStreamReceiverType::aub);
mockAubCenter0->aubManager.reset(mockManager0);
executionEnvironment->rootDeviceEnvironments[rootDeviceIndex]->aubCenter.reset(mockAubCenter0);
@@ -1756,7 +1756,7 @@ TEST(OsAgnosticMemoryManager, givenFreeMemoryEnabledAndNonExternalHostPtrAllocat
MockExecutionEnvironment executionEnvironment;
OsAgnosticMemoryManager memoryManager(executionEnvironment);
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment.rootDeviceEnvironments[0], false, "file_name.aub", CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment.rootDeviceEnvironments[0], false, "file_name.aub", CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
executionEnvironment.rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter);
auto gmmHelper = executionEnvironment.rootDeviceEnvironments[0]->getGmmHelper();
@@ -1798,7 +1798,7 @@ TEST(OsAgnosticMemoryManager, givenOsAgnosticMemoryManagerAndFreeMemoryDisabledW
MockExecutionEnvironment executionEnvironment;
OsAgnosticMemoryManager memoryManager(executionEnvironment);
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment.rootDeviceEnvironments[0], false, "file_name.aub", CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(*executionEnvironment.rootDeviceEnvironments[0], false, "file_name.aub", CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
executionEnvironment.rootDeviceEnvironments[0]->aubCenter.reset(mockAubCenter);

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2023 Intel Corporation
* Copyright (C) 2019-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -753,9 +753,9 @@ TEST_F(PageFaultManagerTest, givenCalWhenSelectingHandlerThenAubTbxAndCalGpuDoma
TEST_F(PageFaultManagerTest, givenAubOrTbxCsrWhenSelectingHandlerThenAubAndTbxGpuDomainHandlerIsSet) {
DebugManagerStateRestore restorer;
for (auto csrType : {CommandStreamReceiverType::CSR_AUB, CommandStreamReceiverType::CSR_TBX,
CommandStreamReceiverType::CSR_HW_WITH_AUB, CommandStreamReceiverType::CSR_TBX_WITH_AUB}) {
debugManager.flags.SetCommandStreamReceiver.set(csrType);
for (auto csrType : {CommandStreamReceiverType::aub, CommandStreamReceiverType::tbx,
CommandStreamReceiverType::hardwareWithAub, CommandStreamReceiverType::tbxWithAub}) {
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(csrType));
auto pageFaultManager2 = std::make_unique<MockPageFaultManager>();
pageFaultManager2->selectGpuDomainHandler();
@@ -769,7 +769,7 @@ TEST_F(PageFaultManagerTest, givenHwCsrWhenSelectingHandlerThenHwGpuDomainHandle
EXPECT_EQ(pageFaultManager->getHwHandlerAddress(), reinterpret_cast<void *>(pageFaultManager->gpuDomainHandler));
debugManager.flags.SetCommandStreamReceiver.set(CommandStreamReceiverType::CSR_HW);
debugManager.flags.SetCommandStreamReceiver.set(static_cast<int32_t>(CommandStreamReceiverType::hardware));
auto pageFaultManager2 = std::make_unique<MockPageFaultManager>();
pageFaultManager2->selectGpuDomainHandler();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2023 Intel Corporation
* Copyright (C) 2021-2024 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -35,7 +35,7 @@ XE_HPC_CORETEST_F(AubCommandStreamReceiverXeHpcCoreTests, givenLinkBcsEngineWhen
auto engineDescriptor = EngineDescriptorHelper::getDefaultDescriptor();
MockAubManager *mockManager = new MockAubManager();
MockAubCenter *mockAubCenter = new MockAubCenter(device->getRootDeviceEnvironment(), false, "", CommandStreamReceiverType::CSR_AUB);
MockAubCenter *mockAubCenter = new MockAubCenter(device->getRootDeviceEnvironment(), false, "", CommandStreamReceiverType::aub);
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(mockManager);
device->executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);