mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Add L0 debugger unit test
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
bcbe3278a9
commit
37c792da96
@@ -195,8 +195,6 @@ HWTEST_F(L0DebuggerTest, givenDebuggingEnabledWhenCommandListIsExecutedThenValid
|
|||||||
commandQueue->destroy();
|
commandQueue->destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
using L0DebuggerSimpleTest = Test<DeviceFixture>;
|
|
||||||
|
|
||||||
HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenBindlessSurfaceStateForDebugSurfaceIsProgrammedAtOffsetZero) {
|
HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenBindlessSurfaceStateForDebugSurfaceIsProgrammedAtOffsetZero) {
|
||||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||||
|
|
||||||
@@ -226,7 +224,7 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenBindle
|
|||||||
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT, debugSurfaceState->getCoherencyType());
|
EXPECT_EQ(RENDER_SURFACE_STATE::COHERENCY_TYPE_GPU_COHERENT, debugSurfaceState->getCoherencyType());
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenDebugSurfaceiIsProgrammedWithL3DisabledMOCS) {
|
HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenDebugSurfaceIsProgrammedWithL3DisabledMOCS) {
|
||||||
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
|
||||||
|
|
||||||
Mock<::L0::Kernel> kernel;
|
Mock<::L0::Kernel> kernel;
|
||||||
@@ -247,6 +245,31 @@ HWTEST_F(L0DebuggerTest, givenDebuggerWhenAppendingKernelToCommandListThenDebugS
|
|||||||
EXPECT_EQ(actualMocs, mocsNoCache);
|
EXPECT_EQ(actualMocs, mocsNoCache);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWTEST_F(L0DebuggerTest, givenEnabledDebuggingWhenIsaTypeAllocatedOnMultitileDeviceThenSharedAllocationIsCreated) {
|
||||||
|
auto debugger = device->getL0Debugger();
|
||||||
|
ASSERT_NE(nullptr, debugger);
|
||||||
|
|
||||||
|
size_t kernelIsaSize = 0x1000;
|
||||||
|
NEO::AllocationType allocTypes[] = {NEO::AllocationType::KERNEL_ISA,
|
||||||
|
NEO::AllocationType::KERNEL_ISA_INTERNAL,
|
||||||
|
NEO::AllocationType::DEBUG_MODULE_AREA};
|
||||||
|
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
auto allocation = device->getNEODevice()->getMemoryManager()->allocateGraphicsMemoryWithProperties(
|
||||||
|
{neoDevice->getRootDeviceIndex(), kernelIsaSize, allocTypes[i], neoDevice->getDeviceBitfield()});
|
||||||
|
|
||||||
|
ASSERT_NE(nullptr, allocation);
|
||||||
|
EXPECT_EQ(1u, allocation->storageInfo.getNumBanks());
|
||||||
|
|
||||||
|
EXPECT_TRUE(allocation->storageInfo.cloningOfPageTables);
|
||||||
|
EXPECT_FALSE(allocation->storageInfo.tileInstanced);
|
||||||
|
|
||||||
|
device->getNEODevice()->getMemoryManager()->freeGraphicsMemory(allocation);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
using L0DebuggerSimpleTest = Test<DeviceFixture>;
|
||||||
|
|
||||||
HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionEnabledWithImmediateCommandListToInvokeNonKernelOperationsThenSuccessIsReturned) {
|
HWTEST_F(L0DebuggerSimpleTest, givenUseCsrImmediateSubmissionEnabledWithImmediateCommandListToInvokeNonKernelOperationsThenSuccessIsReturned) {
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
NEO::DebugManager.flags.EnableFlushTaskSubmission.set(true);
|
NEO::DebugManager.flags.EnableFlushTaskSubmission.set(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user