performance: Move preemption allocation init to the first submission

Related-To: NEO-12323
Signed-off-by: Krzysztof Sprzaczkowski <krzysztof.sprzaczkowski@intel.com>
This commit is contained in:
Krzysztof Sprzaczkowski
2025-01-15 13:44:10 +00:00
committed by Compute-Runtime-Automation
parent 92ea7ee7a3
commit a17745532c
23 changed files with 117 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -442,6 +442,10 @@ HWTEST_F(MidThreadPreemptionTests, GivenNoWaWhenCreatingCsrSurfaceThenSurfaceIsC
ASSERT_NE(nullptr, mockDevice.get());
auto &csr = mockDevice->getUltCommandStreamReceiver<FamilyType>();
if (mockDevice->getPreemptionMode() == NEO::PreemptionMode::MidThread &&
!csr.getPreemptionAllocation()) {
ASSERT_TRUE(csr.createPreemptionAllocation());
}
MemoryAllocation *csrSurface = static_cast<MemoryAllocation *>(csr.getPreemptionAllocation());
ASSERT_NE(nullptr, csrSurface);
EXPECT_FALSE(csrSurface->uncacheable);