mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Initialize tag allocation for Aub CSR in HW+AUB mode
Change-Id: Ia483dbdd211a25ca246675c97e59224f0b098ca5 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
5e4ade58f8
commit
be12b8d2e4
@@ -205,6 +205,21 @@ HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenWait
|
||||
csrWithAubDump.waitForTaskCountWithKmdNotifyFallback(1, 0, false, false);
|
||||
}
|
||||
|
||||
HWTEST_F(CommandStreamReceiverWithAubDumpSimpleTest, givenCsrWithAubDumpWhenCreatingAubCsrThenInitializeTagAllocation) {
|
||||
MockAubCenter *mockAubCenter = new MockAubCenter(*platformDevices, false, "file_name.aub", CommandStreamReceiverType::CSR_HW_WITH_AUB);
|
||||
mockAubCenter->aubManager = std::unique_ptr<MockAubManager>(new MockAubManager());
|
||||
|
||||
auto executionEnvironment = platformImpl->peekExecutionEnvironment();
|
||||
executionEnvironment->initializeMemoryManager();
|
||||
executionEnvironment->rootDeviceEnvironments[0]->aubCenter = std::unique_ptr<MockAubCenter>(mockAubCenter);
|
||||
|
||||
CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>> csrWithAubDump("file_name.aub", *executionEnvironment, 0);
|
||||
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR->getTagAllocation());
|
||||
EXPECT_NE(nullptr, csrWithAubDump.aubCSR->getTagAddress());
|
||||
EXPECT_EQ(std::numeric_limits<uint32_t>::max(), *csrWithAubDump.aubCSR->getTagAddress());
|
||||
}
|
||||
|
||||
struct CommandStreamReceiverTagTests : public ::testing::Test {
|
||||
template <typename FamilyType>
|
||||
using AubWithHw = CommandStreamReceiverWithAUBDump<UltCommandStreamReceiver<FamilyType>>;
|
||||
@@ -264,8 +279,8 @@ using SimulatedCsrTest = ::testing::Test;
|
||||
HWTEST_F(SimulatedCsrTest, givenHwWithAubDumpCsrTypeWhenCreateCommandStreamReceiverThenProperAubCenterIsInitialized) {
|
||||
uint32_t expectedRootDeviceIndex = 10;
|
||||
ExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
executionEnvironment.prepareRootDeviceEnvironments(expectedRootDeviceIndex + 2);
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
|
||||
auto rootDeviceEnvironment = new MockRootDeviceEnvironment(executionEnvironment);
|
||||
executionEnvironment.rootDeviceEnvironments[expectedRootDeviceIndex].reset(rootDeviceEnvironment);
|
||||
|
||||
Reference in New Issue
Block a user