Revert "Optimize timestamp packet dependencies"

This reverts commit c365b422963917e7b882f9db985969c036f0fa3f.

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2021-12-23 11:25:50 +00:00
committed by Compute-Runtime-Automation
parent eb9746987e
commit 14e338e669
11 changed files with 39 additions and 529 deletions

View File

@@ -489,7 +489,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenMapAllocationWhenEnqueueingReadOrWriteBu
EXPECT_EQ(mapAllocation, mockCmdQ->kernelParams.transferAllocation);
}
HWTEST_TEMPLATED_F(BcsBufferTests, givenWriteBufferEnqueueWithGpgpuSubmissionWhenProgrammingCommandStreamThenDoNotAddSemaphoreWaitOnGpgpu) {
HWTEST_TEMPLATED_F(BcsBufferTests, givenWriteBufferEnqueueWhenProgrammingCommandStreamThenAddSemaphoreWait) {
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
auto cmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(bcsMockContext.get(), device.get(), nullptr));
@@ -503,6 +503,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenWriteBufferEnqueueWithGpgpuSubmissionWhe
void *hostPtr = reinterpret_cast<void *>(0x12340000);
cmdQ->enqueueWriteBuffer(buffer.get(), true, 0, 1, hostPtr, nullptr, 0, nullptr, nullptr);
auto timestampPacketNode = cmdQ->timestampPacketContainer->peekNodes().at(0);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(*cmdQ->peekCommandStream());
@@ -514,13 +515,15 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenWriteBufferEnqueueWithGpgpuSubmissionWhe
continue;
}
semaphoresCount++;
auto dataAddress = TimestampPacketHelper::getContextEndGpuAddress(*timestampPacketNode);
EXPECT_EQ(dataAddress, semaphoreCmd->getSemaphoreGraphicsAddress());
}
}
EXPECT_EQ(0u, semaphoresCount);
EXPECT_EQ(1u, semaphoresCount);
EXPECT_EQ(initialTaskCount + 1, queueCsr->peekTaskCount());
}
HWTEST_TEMPLATED_F(BcsBufferTests, givenReadBufferEnqueueWithGpgpuSubmissionWhenProgrammingCommandStreamThenDoNotAddSemaphoreWaitOnGpgpu) {
HWTEST_TEMPLATED_F(BcsBufferTests, givenReadBufferEnqueueWhenProgrammingCommandStreamThenAddSemaphoreWait) {
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
auto cmdQ = clUniquePtr(new MockCommandQueueHw<FamilyType>(bcsMockContext.get(), device.get(), nullptr));
@@ -534,6 +537,7 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenReadBufferEnqueueWithGpgpuSubmissionWhen
void *hostPtr = reinterpret_cast<void *>(0x12340000);
cmdQ->enqueueWriteBuffer(buffer.get(), true, 0, 1, hostPtr, nullptr, 0, nullptr, nullptr);
auto timestampPacketNode = cmdQ->timestampPacketContainer->peekNodes().at(0);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(*cmdQ->peekCommandStream());
@@ -545,9 +549,11 @@ HWTEST_TEMPLATED_F(BcsBufferTests, givenReadBufferEnqueueWithGpgpuSubmissionWhen
continue;
}
semaphoresCount++;
auto dataAddress = TimestampPacketHelper::getContextEndGpuAddress(*timestampPacketNode);
EXPECT_EQ(dataAddress, semaphoreCmd->getSemaphoreGraphicsAddress());
}
}
EXPECT_EQ(0u, semaphoresCount);
EXPECT_EQ(1u, semaphoresCount);
EXPECT_EQ(initialTaskCount + 1, queueCsr->peekTaskCount());
}