Add new allocation type

Related-To: NEO-5244

Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2021-02-23 12:09:34 +00:00
committed by Compute-Runtime-Automation
parent 464e4fd1b1
commit 3e4be8d78e
6 changed files with 22 additions and 9 deletions

View File

@@ -624,14 +624,22 @@ HWTEST2_F(AppendQueryKernelTimestamps, givenCommandListWhenAppendQueryKernelTime
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
bool containsDstPtr = false;
for (auto &a : commandList.cmdListHelper.residencyContainer) {
if (a != nullptr && a->getGpuAddress() == reinterpret_cast<uint64_t>(alloc)) {
containsDstPtr = true;
bool gpuTimeStampAlloc = false;
for (auto &residentGfxAlloc : commandList.cmdListHelper.residencyContainer) {
if (residentGfxAlloc != nullptr) {
if (residentGfxAlloc->getGpuAddress() ==
reinterpret_cast<uint64_t>(alloc)) {
containsDstPtr = true;
}
if (residentGfxAlloc->getAllocationType() ==
NEO::GraphicsAllocation::AllocationType::GPU_TIMESTAMP_TAG_BUFFER) {
gpuTimeStampAlloc = true;
}
}
}
EXPECT_TRUE(containsDstPtr);
EXPECT_TRUE(gpuTimeStampAlloc);
EXPECT_EQ(testDevice->getBuiltinFunctionsLib()->getFunction(Builtin::QueryKernelTimestamps)->getIsaAllocation()->getGpuAddress(), commandList.cmdListHelper.isaAllocation->getGpuAddress());
EXPECT_EQ(2u, commandList.cmdListHelper.groupSize[0]);

View File

@@ -154,7 +154,7 @@ TEST_F(EventPoolCreate, whenHostVisibleFlagNotSetThenEventAllocationIsOnDevice)
ASSERT_NE(nullptr, eventPool);
EXPECT_EQ(NEO::GraphicsAllocation::AllocationType::BUFFER, eventPool->getAllocation().getAllocationType());
EXPECT_EQ(NEO::GraphicsAllocation::AllocationType::GPU_TIMESTAMP_TAG_BUFFER, eventPool->getAllocation().getAllocationType());
eventPool->destroy();
}