mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-31 20:13:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
dc0048661a
commit
bd5ca4fed5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user