mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
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:
committed by
Compute-Runtime-Automation
parent
757e8d746c
commit
3491a425a3
@@ -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) {
|
||||
|
||||
@@ -52,7 +52,7 @@ struct TimestampPacketStorage {
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < packetsUsed; i++) {
|
||||
if ((packets[i].contextEnd & 1) || (packets[i].globalEnd & 1)) {
|
||||
if (packets[i].contextEnd == 1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user