mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
OmitTimestampPacketDependencies to omit node dependency in timestamp packet
Makes subcapture feature work with timestamp packet enabled. Related-To: NEO-2747 Change-Id: Ifa45f1c066129671a02dc708b537b285f5a05d7f Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
@ -555,7 +555,7 @@ void CommandQueue::obtainNewTimestampPacketNodes(size_t numberOfNodes, Timestamp
|
||||
auto allocator = getCommandStreamReceiver().getTimestampPacketAllocator();
|
||||
|
||||
previousNodes.swapNodes(*timestampPacketContainer);
|
||||
previousNodes.resolveDependencies(isOOQEnabled());
|
||||
previousNodes.resolveDependencies(isOOQEnabled() || DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
|
||||
DEBUG_BREAK_IF(timestampPacketContainer->peekNodes().size() > 0);
|
||||
|
||||
|
@ -130,12 +130,14 @@ bool AubSubCaptureManager::isSubCaptureFilterActive(const MultiDispatchInfo &dis
|
||||
void AubSubCaptureManager::setDebugManagerFlags() const {
|
||||
DebugManager.flags.MakeEachEnqueueBlocking.set(!subCaptureIsActive);
|
||||
DebugManager.flags.ForceCsrFlushing.set(false);
|
||||
DebugManager.flags.OmitTimestampPacketDependencies.set(false);
|
||||
if (!subCaptureIsActive && subCaptureWasActive) {
|
||||
DebugManager.flags.ForceCsrFlushing.set(true);
|
||||
}
|
||||
DebugManager.flags.ForceCsrReprogramming.set(false);
|
||||
if (subCaptureIsActive && !subCaptureWasActive) {
|
||||
DebugManager.flags.ForceCsrReprogramming.set(true);
|
||||
DebugManager.flags.OmitTimestampPacketDependencies.set(true);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
@ -75,6 +75,7 @@ DECLARE_DEBUG_VARIABLE(bool, ForceSLML3Config, false, "Forces L3Config with SLM
|
||||
DECLARE_DEBUG_VARIABLE(bool, Force32bitAddressing, false, "Forces 32 bit addresses to be used in 64 bit dll")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ForceCsrFlushing, false, "Forces flushing of command stream receiver")
|
||||
DECLARE_DEBUG_VARIABLE(bool, ForceCsrReprogramming, false, "Forces reprogramming of command stream receiver")
|
||||
DECLARE_DEBUG_VARIABLE(bool, OmitTimestampPacketDependencies, false, "Clears all node dependences on timestamp packet")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableStatelessToStatefulOptimization, false, "Disables stateless to stateful optimization for buffers")
|
||||
DECLARE_DEBUG_VARIABLE(bool, DisableConcurrentBlockExecution, false, "disables concurrent block kernel execution")
|
||||
DECLARE_DEBUG_VARIABLE(bool, UseNoRingFlushesKmdMode, true, "Windows only, passes flag to KMD that informs KMD to not emit any ring buffer flushes.")
|
||||
|
@ -261,9 +261,10 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureKeepsInactiveThenM
|
||||
EXPECT_TRUE(DebugManager.flags.MakeEachEnqueueBlocking.get());
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrFlushing.get());
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrReprogramming.get());
|
||||
EXPECT_FALSE(DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
}
|
||||
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureGetsActiveThenDontMakeEachEnqueueBlockingAndForceCsrReprogramming) {
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureGetsActiveThenDontMakeEachEnqueueBlockingButForceCsrReprogrammingAndOmitTimestampPacketDependencies) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("");
|
||||
|
||||
DispatchInfo dispatchInfo;
|
||||
@ -279,6 +280,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureGetsActiveThenDont
|
||||
aubSubCaptureManager.activateSubCapture(multiDispatchInfo);
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrFlushing.get());
|
||||
EXPECT_TRUE(DebugManager.flags.ForceCsrReprogramming.get());
|
||||
EXPECT_TRUE(DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
EXPECT_FALSE(DebugManager.flags.MakeEachEnqueueBlocking.get());
|
||||
}
|
||||
|
||||
@ -298,6 +300,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureKeepsActiveThenDon
|
||||
aubSubCaptureManager.activateSubCapture(multiDispatchInfo);
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrFlushing.get());
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrReprogramming.get());
|
||||
EXPECT_FALSE(DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
EXPECT_FALSE(DebugManager.flags.MakeEachEnqueueBlocking.get());
|
||||
}
|
||||
|
||||
@ -317,6 +320,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenSubCaptureGetsInactiveThenMa
|
||||
aubSubCaptureManager.activateSubCapture(multiDispatchInfo);
|
||||
EXPECT_TRUE(DebugManager.flags.ForceCsrFlushing.get());
|
||||
EXPECT_FALSE(DebugManager.flags.ForceCsrReprogramming.get());
|
||||
EXPECT_FALSE(DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
EXPECT_TRUE(DebugManager.flags.MakeEachEnqueueBlocking.get());
|
||||
}
|
||||
|
||||
|
@ -1088,6 +1088,36 @@ HWTEST_F(TimestampPacketTests, givenAlreadyAssignedNodeWhenEnqueueingToOoqThenDo
|
||||
EXPECT_EQ(0u, atomicsFound);
|
||||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenAlreadyAssignedNodeWhenEnqueueingWithOmitTimestampPacketDependenciesThenDontKeepDependencyOnPreviousNodeIfItsNotReady) {
|
||||
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
|
||||
device->getUltCommandStreamReceiver<FamilyType>().timestampPacketWriteEnabled = true;
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
DebugManager.flags.OmitTimestampPacketDependencies.set(true);
|
||||
|
||||
MockCommandQueueHw<FamilyType> cmdQ(context, device.get(), nullptr);
|
||||
TimestampPacketContainer previousNodes;
|
||||
cmdQ.obtainNewTimestampPacketNodes(1, previousNodes);
|
||||
|
||||
cmdQ.enqueueKernel(kernel->mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
|
||||
|
||||
HardwareParse hwParser;
|
||||
hwParser.parseCommands<FamilyType>(*cmdQ.commandStream, 0);
|
||||
|
||||
uint32_t semaphoresFound = 0;
|
||||
uint32_t atomicsFound = 0;
|
||||
for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) {
|
||||
if (genCmdCast<typename FamilyType::MI_SEMAPHORE_WAIT *>(*it)) {
|
||||
semaphoresFound++;
|
||||
}
|
||||
if (genCmdCast<typename FamilyType::MI_ATOMIC *>(*it)) {
|
||||
atomicsFound++;
|
||||
}
|
||||
}
|
||||
EXPECT_EQ(0u, semaphoresFound);
|
||||
EXPECT_EQ(0u, atomicsFound);
|
||||
}
|
||||
|
||||
HWTEST_F(TimestampPacketTests, givenEventsWaitlistFromDifferentDevicesWhenEnqueueingThenMakeAllTimestampsResident) {
|
||||
TagAllocator<TimestampPacketStorage> tagAllocator(executionEnvironment->memoryManager.get(), 1, 1);
|
||||
auto device2 = std::unique_ptr<MockDevice>(Device::create<MockDevice>(nullptr, executionEnvironment, 1u));
|
||||
|
@ -72,6 +72,7 @@ OverrideAubDeviceId = -1
|
||||
ForceCompilerUsePlatform = unk
|
||||
ForceCsrFlushing = 0
|
||||
ForceCsrReprogramming = 0
|
||||
OmitTimestampPacketDependencies = 0
|
||||
AUBDumpBufferFormat = unk
|
||||
AUBDumpImageFormat = unk
|
||||
AUBDumpCaptureFileName = unk
|
||||
|
Reference in New Issue
Block a user