fix: flush ocl queue after staging transfer

This is required for scenarios without direct submission
Otherwise, staging transfers are enqueued but not actually
flushed. If that happens, subsequent staging transfers can't
reuse previous staging buffers. It results in increased memory usage.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2025-01-07 14:33:43 +00:00
committed by Compute-Runtime-Automation
parent dc0048661a
commit bd5ca4fed5
4 changed files with 14 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -2448,6 +2448,7 @@ HWTEST_F(StagingBufferTest, givenInOrderCmdQueueWhenEnqueueStagingBufferMemcpyNo
auto pEvent = (Event *)event;
auto numOfStagingBuffers = svmManager->getNumAllocs() - initialUsmAllocs;
EXPECT_EQ(CL_SUCCESS, retVal);
EXPECT_TRUE(myCmdQ.flushCalled);
EXPECT_EQ(1u, numOfStagingBuffers);
EXPECT_EQ(expectedNumOfCopies, myCmdQ.enqueueSVMMemcpyCalledCount);
EXPECT_EQ(0u, myCmdQ.finishCalledCount);