mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Add new allocation type
Related-To: NEO-5244 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
464e4fd1b1
commit
3e4be8d78e
@@ -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]);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user