Fix time stamps completion

- ignore globalEnd tag
- check contextEnd tag is not 1

Resolves: NEO-4906

Signed-off-by: Igor Venevtsev <igor.venevtsev@intel.com>
This commit is contained in:
Igor Venevtsev
2020-11-17 14:07:38 +01:00
committed by Compute-Runtime-Automation
parent 757e8d746c
commit 3491a425a3
2 changed files with 17 additions and 7 deletions

View File

@@ -208,7 +208,7 @@ TEST_F(TimestampPacketTests, givenTagNodeWhatAskingForGpuAddressesThenReturnCorr
EXPECT_EQ(expectedCounterAddress, TimestampPacketHelper::getGpuDependenciesCountGpuAddress(mockNode));
}
TEST_F(TimestampPacketSimpleTests, whenEndTagIsNotOneThenMarkAsCompleted) {
TEST_F(TimestampPacketSimpleTests, whenContextEndTagIsNotOneThenMarkAsCompleted) {
TimestampPacketStorage timestampPacketStorage;
auto &packet = timestampPacketStorage.packets[0];
timestampPacketStorage.initialize();
@@ -223,10 +223,10 @@ TEST_F(TimestampPacketSimpleTests, whenEndTagIsNotOneThenMarkAsCompleted) {
packet.contextEnd = 0;
packet.globalEnd = 1;
EXPECT_FALSE(timestampPacketStorage.isCompleted());
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packet.contextEnd = 0;
packet.globalEnd = 0;
packet.contextEnd = 100;
packet.globalEnd = 100;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
}
@@ -272,9 +272,13 @@ TEST_F(TimestampPacketSimpleTests, whenIsCompletedIsCalledThenItReturnsProperTim
EXPECT_FALSE(timestampPacketStorage.isCompleted());
packet.contextEnd = 0;
EXPECT_FALSE(timestampPacketStorage.isCompleted());
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packet.contextEnd = 100;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packet.globalEnd = 0;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packet.globalEnd = 100;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
}
TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsCheckedTheVerifyAllUsedNodes) {
@@ -291,10 +295,16 @@ TEST_F(TimestampPacketSimpleTests, givenMultiplePacketsInUseWhenCompletionIsChec
}
packets[timestampPacketStorage.packetsUsed - 1].contextEnd = 0;
EXPECT_FALSE(timestampPacketStorage.isCompleted());
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packets[timestampPacketStorage.packetsUsed - 1].contextEnd = 100;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packets[timestampPacketStorage.packetsUsed - 1].globalEnd = 0;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
packets[timestampPacketStorage.packetsUsed - 1].globalEnd = 100;
EXPECT_TRUE(timestampPacketStorage.isCompleted());
}
TEST_F(TimestampPacketSimpleTests, whenNewTagIsTakenThenReinitialize) {