@@ -2659,6 +2659,52 @@ HWTEST2_F(MultiTileSynchronizedDispatchTests, givenLimitedSyncDispatchWhenAppend
26592659
26602660using MultiTileInOrderCmdListTests = MultiTileInOrderCmdListFixture;
26612661
2662+ HWTEST2_F (MultiTileInOrderCmdListTests, givenExternalSyncStorageWhenCallingAppendThenClearAllTsPackets, IsAtLeastXeHpcCore) {
2663+ using TagSizeT = typename FamilyType::TimestampPacketType;
2664+
2665+ uint64_t counterValue = 4 ;
2666+ uint64_t incValue = 2 ;
2667+
2668+ auto devAddress = reinterpret_cast <uint64_t *>(allocDeviceMem (sizeof (uint64_t )));
2669+ auto eventObj = createExternalSyncStorageEvent (counterValue, incValue, devAddress);
2670+ eventObj->isTimestampEvent = true ;
2671+ eventObj->setSinglePacketSize (NEO::TimestampPackets<TagSizeT, 1 >::getSinglePacketSize ());
2672+
2673+ auto handle = eventObj->toHandle ();
2674+
2675+ auto immCmdList = createMultiTileImmCmdList<gfxCoreFamily>();
2676+
2677+ auto tag = device->getInOrderTimestampAllocator ()->getTag ();
2678+ auto node = static_cast <NEO::TimestampPackets<TagSizeT, 1 > *>(tag->getCpuBase ());
2679+
2680+ constexpr TagSizeT packet00[4 ] = {12 , 13 , 14 , 15 };
2681+ constexpr TagSizeT packet01[4 ] = {16 , 17 , 18 , 19 };
2682+
2683+ node->assignDataToAllTimestamps (0 , packet00);
2684+ node->assignDataToAllTimestamps (1 , packet01);
2685+
2686+ tag->returnTag ();
2687+
2688+ immCmdList->appendLaunchKernel (kernel->toHandle (), groupCount, handle, 0 , nullptr , launchParams, false );
2689+ ASSERT_EQ (1u , eventObj->inOrderTimestampNode .size ());
2690+
2691+ auto node2 = static_cast <NEO::TimestampPackets<TagSizeT, 1 > *>(eventObj->inOrderTimestampNode [0 ]->getCpuBase ());
2692+
2693+ EXPECT_EQ (node, node2);
2694+
2695+ auto expectedValue = static_cast <uint64_t >(Event::STATE_INITIAL);
2696+ EXPECT_EQ (expectedValue, node2->getContextStartValue (0 ));
2697+ EXPECT_EQ (expectedValue, node2->getGlobalStartValue (0 ));
2698+ EXPECT_EQ (expectedValue, node2->getContextEndValue (0 ));
2699+ EXPECT_EQ (expectedValue, node2->getGlobalEndValue (0 ));
2700+ EXPECT_EQ (expectedValue, node2->getContextStartValue (1 ));
2701+ EXPECT_EQ (expectedValue, node2->getGlobalStartValue (1 ));
2702+ EXPECT_EQ (expectedValue, node2->getContextEndValue (1 ));
2703+ EXPECT_EQ (expectedValue, node2->getGlobalEndValue (1 ));
2704+
2705+ context->freeMem (devAddress);
2706+ }
2707+
26622708HWTEST2_F (MultiTileInOrderCmdListTests, givenStandaloneEventWhenCallingAppendThenSuccess, IsAtLeastXeHpCore) {
26632709 uint64_t counterValue = 2 ;
26642710 auto hostAddress = reinterpret_cast <uint64_t *>(allocHostMem (sizeof (uint64_t )));
0 commit comments