mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 07:08:04 +08:00
performance: add one time context init sip state to immediate flush task
Related-To: NEO-7808 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ba6ccdf5bd
commit
8836838c7c
@@ -5,6 +5,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/command_stream/command_stream_receiver_simulated_hw.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
@@ -4128,3 +4129,38 @@ HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(commandStreamReceiver.getPreemptionAllocation()));
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandStreamReceiverHwTest,
|
||||
givenImmediateFlushTaskWhenSipProgrammingNeededThenOneTimeSipStateDispatched,
|
||||
IsAtLeastXeHpCore) {
|
||||
using STATE_SIP = typename FamilyType::STATE_SIP;
|
||||
|
||||
pDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->initDebuggerL0(pDevice);
|
||||
|
||||
auto &commandStreamReceiver = pDevice->getUltCommandStreamReceiver<FamilyType>();
|
||||
commandStreamReceiver.storeMakeResidentAllocations = true;
|
||||
|
||||
commandStreamReceiver.flushImmediateTask(commandStream, commandStream.getUsed(), immediateFlushTaskFlags, *pDevice);
|
||||
|
||||
auto sipAllocation = NEO::SipKernel::getSipKernel(*pDevice).getSipAllocation();
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
|
||||
HardwareParse hwParserCsr;
|
||||
hwParserCsr.parseCommands<FamilyType>(commandStreamReceiver.commandStream, 0);
|
||||
auto stateSipCmd = hwParserCsr.getCommand<STATE_SIP>();
|
||||
ASSERT_NE(nullptr, stateSipCmd);
|
||||
|
||||
size_t usedSize = commandStreamReceiver.commandStream.getUsed();
|
||||
commandStreamReceiver.flushImmediateTask(commandStream,
|
||||
commandStream.getUsed(),
|
||||
immediateFlushTaskFlags,
|
||||
*pDevice);
|
||||
|
||||
hwParserCsr.tearDown();
|
||||
hwParserCsr.parseCommands<FamilyType>(commandStreamReceiver.commandStream, usedSize);
|
||||
stateSipCmd = hwParserCsr.getCommand<STATE_SIP>();
|
||||
EXPECT_EQ(nullptr, stateSipCmd);
|
||||
|
||||
EXPECT_TRUE(commandStreamReceiver.isMadeResident(sipAllocation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user