feature: enable illegal opcode exception

Related-To: NEO-9088

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-11-06 13:51:49 +00:00
committed by Compute-Runtime-Automation
parent 20c3f45998
commit 02b6b3bbaa
3 changed files with 35 additions and 2 deletions

View File

@@ -116,6 +116,33 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenXeHpDebuggingEnabledA
EXPECT_TRUE(idd.getSoftwareExceptionEnable());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenXeHpDebuggingEnabledWhenDispatchingKernelThenIllegalOpcodeExceptionIsEnabled) {
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
auto debugger = new MockDebuggerL0(pDevice);
pDevice->getRootDeviceEnvironmentRef().debugger.reset(debugger);
uint32_t dims[] = {2, 1, 1};
std::unique_ptr<MockDispatchKernelEncoder> dispatchInterface(new MockDispatchKernelEncoder());
dispatchInterface->kernelDescriptor.kernelAttributes.flags.usesAssert = true;
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
EncodeDispatchKernel<FamilyType>::encode(*cmdContainer.get(), dispatchArgs);
GenCmdList commands;
CmdParse<FamilyType>::parseCommandBuffer(commands, ptrOffset(cmdContainer->getCommandStream()->getCpuBase(), 0), cmdContainer->getCommandStream()->getUsed());
auto itor = find<WALKER_TYPE *>(commands.begin(), commands.end());
ASSERT_NE(itor, commands.end());
auto cmd = genCmdCast<WALKER_TYPE *>(*itor);
auto &idd = cmd->getInterfaceDescriptor();
EXPECT_TRUE(idd.getIllegalOpcodeExceptionEnable());
}
HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenSimdSizeWhenDispatchingKernelThenSimdMessageIsSet) {
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;