refactor: move blit post sync data to BlitProperties

Related-To: NEO-13003

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2025-01-22 14:38:36 +00:00
committed by Compute-Runtime-Automation
parent 9cfc6e6bbe
commit c2dbdb6797
30 changed files with 209 additions and 185 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -60,7 +60,7 @@ void PrintfHandler::printOutput(const KernelImmutableData *kernelData,
printfBuffer->getGpuAddress(),
0, 0, 0, Vec3<size_t>(printfOutputSize, 0, 0), 0, 0, 0, 0));
const auto newTaskCount = bcsEngine->commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, false, *selectedDevice);
const auto newTaskCount = bcsEngine->commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, *selectedDevice);
if (newTaskCount == NEO::CompletionStamp::gpuHang) {
PRINT_DEBUG_STRING(NEO::debugManager.flags.PrintDebugMessages.get(), stderr, "Failed to copy printf buffer.\n", "");
printfOutputBuffer = static_cast<uint8_t *>(printfBuffer->getUnderlyingBuffer());

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -591,7 +591,8 @@ BlitProperties CommandQueueHw<GfxFamily>::processDispatchForBlitEnqueue(CommandS
}
blitProperties.multiRootDeviceEventSync = multiRootDeviceEventSync;
auto currentTimestampPacketNode = timestampPacketContainer->peekNodes().at(0);
blitProperties.outputTimestampPacket = currentTimestampPacketNode;
blitProperties.blitSyncProperties.outputTimestampPacket = currentTimestampPacketNode;
blitProperties.blitSyncProperties.syncMode = (eventsRequest.outEvent && isProfilingEnabled()) ? BlitSyncMode::timestamp : BlitSyncMode::immediate;
if (commandStream) {
if (timestampPacketDependencies.cacheFlushNodes.peekNodes().size() > 0) {
@@ -948,7 +949,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueNonBlocked(
if (enqueueProperties.blitPropertiesContainer->size() > 0) {
auto bcsCsr = getBcsForAuxTranslation();
const auto newTaskCount = bcsCsr->flushBcsTask(*enqueueProperties.blitPropertiesContainer, false, this->isProfilingEnabled(), getDevice());
const auto newTaskCount = bcsCsr->flushBcsTask(*enqueueProperties.blitPropertiesContainer, false, getDevice());
if (newTaskCount > CompletionStamp::notReady) {
CompletionStamp completionStamp{};
completionStamp.taskCount = newTaskCount;
@@ -1219,7 +1220,7 @@ CompletionStamp CommandQueueHw<GfxFamily>::enqueueCommandWithoutKernel(
if (enqueueProperties.operation == EnqueueProperties::Operation::blit) {
UNRECOVERABLE_IF(!enqueueProperties.blitPropertiesContainer);
if (bcsCsr) {
const auto newTaskCount = bcsCsr->flushBcsTask(*enqueueProperties.blitPropertiesContainer, false, this->isProfilingEnabled(), getDevice());
const auto newTaskCount = bcsCsr->flushBcsTask(*enqueueProperties.blitPropertiesContainer, false, getDevice());
if (newTaskCount > CompletionStamp::notReady) {
CompletionStamp completionStamp{};
completionStamp.taskCount = newTaskCount;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -284,7 +284,7 @@ CompletionStamp &CommandComputeKernel::submit(TaskCountType taskLevel, bool term
}
if (kernelOperation->blitPropertiesContainer.size() > 0) {
const auto newTaskCount = bcsCsrForAuxTranslation->flushBcsTask(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
const auto newTaskCount = bcsCsrForAuxTranslation->flushBcsTask(kernelOperation->blitPropertiesContainer, false, commandQueue.getDevice());
if (newTaskCount <= CompletionStamp::notReady) {
commandQueue.updateBcsTaskCount(bcsCsrForAuxTranslation->getOsContext().getEngineType(), newTaskCount);
} else {
@@ -327,13 +327,14 @@ TaskCountType CommandWithoutKernel::dispatchBlitOperation() {
blitProperties.csrDependencies.timestampPacketContainer.push_back(&timestampPacketDependencies->previousEnqueueNodes);
blitProperties.csrDependencies.timestampPacketContainer.push_back(&timestampPacketDependencies->barrierNodes);
blitProperties.csrDependencies.timestampPacketContainer.push_back(&timestampPacketDependencies->multiCsrDependencies);
blitProperties.outputTimestampPacket = currentTimestampPacketNodes->peekNodes()[0];
blitProperties.blitSyncProperties.outputTimestampPacket = currentTimestampPacketNodes->peekNodes()[0];
blitProperties.blitSyncProperties.syncMode = (eventsRequest.outEvent && commandQueue.isProfilingEnabled()) ? BlitSyncMode::timestamp : BlitSyncMode::immediate;
if (commandQueue.getContext().getRootDeviceIndices().size() > 1) {
eventsRequest.fillCsrDependenciesForRootDevices(blitProperties.csrDependencies, *bcsCsr);
}
const auto newTaskCount = bcsCsr->flushBcsTask(kernelOperation->blitPropertiesContainer, false, commandQueue.isProfilingEnabled(), commandQueue.getDevice());
const auto newTaskCount = bcsCsr->flushBcsTask(kernelOperation->blitPropertiesContainer, false, commandQueue.getDevice());
if (newTaskCount > CompletionStamp::notReady) {
return newTaskCount;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -99,7 +99,7 @@ bool PrintfHandler::printEnqueueOutput() {
printfSurface->getGpuAddress(),
0, 0, 0, Vec3<size_t>(printfOutputSize, 0, 0), 0, 0, 0, 0));
const auto newTaskCount = bcsEngine.commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, false, device);
const auto newTaskCount = bcsEngine.commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, device);
if (newTaskCount > CompletionStamp::notReady) {
return false;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -121,7 +121,7 @@ struct CopyEngineXeHPAndLater : public MulticontextOclAubFixture, public ::testi
void executeBlitCommand(const BlitProperties &blitProperties, bool blocking) {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, blocking, false, rootDevice->getDevice());
bcsCsr->flushBcsTask(blitPropertiesContainer, blocking, rootDevice->getDevice());
}
template <typename FamilyType>

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Intel Corporation
* Copyright (C) 2022-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -57,7 +57,7 @@ struct BlitEnqueueTests : public ::testing::Test {
BlitPropertiesContainer container;
container.push_back(blitProperties);
bcsCsr->flushBcsTask(container, true, false, const_cast<Device &>(device));
bcsCsr->flushBcsTask(container, true, const_cast<Device &>(device));
return BlitOperationResult::success;
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -1273,7 +1273,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenPageTableManagerPointerWhenCa
BlitPropertiesContainer container;
container.push_back(blitProperties);
bcsCsr->flushBcsTask(container, true, false, *pDevice);
bcsCsr->flushBcsTask(container, true, *pDevice);
EXPECT_TRUE(bcsCsr->pageTableManagerInitialized);
EXPECT_FALSE(bcsCsr2->pageTableManagerInitialized);
@@ -1282,7 +1282,7 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenPageTableManagerPointerWhenCa
EXPECT_EQ(bcsCsr, pageTableManager->initContextAuxTableRegisterParamsPassed[0].initialBBHandle);
pDevice->resetCommandStreamReceiver(bcsCsr2);
bcsCsr2->flushBcsTask(container, true, false, *pDevice);
bcsCsr2->flushBcsTask(container, true, *pDevice);
EXPECT_TRUE(bcsCsr2->pageTableManagerInitialized);
@@ -1318,11 +1318,11 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenPageTableManagerPointerWhenCa
BlitPropertiesContainer container;
container.push_back(blitProperties);
bcsCsr->flushBcsTask(container, true, false, *pDevice);
bcsCsr->flushBcsTask(container, true, *pDevice);
EXPECT_TRUE(bcsCsr->pageTableManagerInitialized);
bcsCsr->flushBcsTask(container, true, false, *pDevice);
bcsCsr->flushBcsTask(container, true, *pDevice);
memoryManager->freeGraphicsMemory(graphicsAllocation);
@@ -1359,18 +1359,18 @@ HWTEST_F(CommandStreamReceiverFlushTaskTests, givenNullPageTableManagerWhenCallB
BlitPropertiesContainer container;
container.push_back(blitProperties);
bcsCsr->flushBcsTask(container, true, false, *pDevice);
bcsCsr->flushBcsTask(container, true, *pDevice);
EXPECT_FALSE(bcsCsr->pageTableManagerInitialized);
EXPECT_FALSE(bcsCsr2->pageTableManagerInitialized);
pDevice->resetCommandStreamReceiver(bcsCsr2);
bcsCsr2->flushBcsTask(container, true, false, *pDevice);
bcsCsr2->flushBcsTask(container, true, *pDevice);
EXPECT_FALSE(bcsCsr2->pageTableManagerInitialized);
bcsCsr2->pageTableManagerInitialized = true;
EXPECT_NO_THROW(bcsCsr2->flushBcsTask(container, true, false, *pDevice));
EXPECT_NO_THROW(bcsCsr2->flushBcsTask(container, true, *pDevice));
memoryManager->freeGraphicsMemory(graphicsAllocation);
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2024 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -479,7 +479,7 @@ HWTEST_F(BcsTests, givenMultipleBlitPropertiesWhenDispatchingThenProgramCommands
blitPropertiesContainer.push_back(blitProperties1);
blitPropertiesContainer.push_back(blitProperties2);
csr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
csr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(csr.commandStream);
@@ -528,7 +528,7 @@ HWTEST_F(BcsTests, whenBlitBufferThenCommandBufferHasProperTaskCount) {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
csr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
csr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_EQ(csr.getCS(0u).getGraphicsAllocation()->getTaskCount(csr.getOsContext().getContextId()), csr.peekTaskCount());
EXPECT_EQ(csr.getCS(0u).getGraphicsAllocation()->getResidencyTaskCount(csr.getOsContext().getContextId()), csr.peekTaskCount());
@@ -559,7 +559,7 @@ HWTEST_F(BcsTests, givenUpdateTaskCountFromWaitWhenBlitBufferThenCsrHasProperTas
auto taskCount = csr.peekTaskCount();
csr.flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
csr.flushBcsTask(blitPropertiesContainer, false, *pDevice);
EXPECT_EQ(csr.peekTaskCount(), taskCount + 1);
EXPECT_EQ(csr.peekLatestFlushedTaskCount(), taskCount);
@@ -587,12 +587,13 @@ HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferThenCommandBufferIsConstru
0, 0, {1, 1, 1}, 0, 0, 0, 0);
MockTimestampPacketContainer timestamp(*bcsCsr->getTimestampPacketAllocator(), 1u);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.syncMode = BlitSyncMode::timestamp;
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, true, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(bcsCsr->commandStream);
@@ -639,12 +640,12 @@ HWTEST_F(BcsTests, givenProfilingEnabledWhenBlitBufferAndForceTlbFlushAfterCopyT
0, 0, {1, 1, 1}, 0, 0, 0, 0);
MockTimestampPacketContainer timestamp(*bcsCsr->getTimestampPacketAllocator(), 1u);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.syncMode = BlitSyncMode::timestamp;
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, true, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(bcsCsr->commandStream);
@@ -696,7 +697,7 @@ HWTEST_F(BcsTests, givenProfilingDisabledWhenBlitBufferAndForceTlbFlushAfterCopy
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(bcsCsr->commandStream);
@@ -737,12 +738,13 @@ HWTEST_F(BcsTests, givenNotInitializedOsContextWhenBlitBufferIsCalledThenInitial
0, 0, {1, 1, 1}, 0, 0, 0, 0);
MockTimestampPacketContainer timestamp(*bcsCsr->getTimestampPacketAllocator(), 1u);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.syncMode = BlitSyncMode::timestamp;
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
EXPECT_FALSE(bcsOsContext->isInitialized());
bcsCsr->flushBcsTask(blitPropertiesContainer, false, true, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
EXPECT_TRUE(bcsOsContext->isInitialized());
}
@@ -780,7 +782,7 @@ HWTEST_F(BcsTests, givenInputAllocationsWhenBlitDispatchedThenMakeAllAllocations
blitPropertiesContainer.push_back(blitProperties1);
blitPropertiesContainer.push_back(blitProperties2);
csr.flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
csr.flushBcsTask(blitPropertiesContainer, false, *pDevice);
expectedCalled++;
uint32_t residentAllocationsNum = 5u;
@@ -847,7 +849,7 @@ HWTEST_F(BcsTests, givenFenceAllocationIsRequiredWhenBlitDispatchedThenMakeAllAl
blitPropertiesContainer.push_back(blitProperties1);
blitPropertiesContainer.push_back(blitProperties2);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
uint32_t residentAllocationsNum = 6u;
EXPECT_TRUE(bcsCsr->isMadeResident(graphicsAllocation1));

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2023 Intel Corporation
* Copyright (C) 2020-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -30,7 +30,7 @@ struct BcsTests : public Test<ClDeviceFixture> {
BlitPropertiesContainer container;
container.push_back(blitProperties);
return bcsCsr->flushBcsTask(container, blocking, false, device);
return bcsCsr->flushBcsTask(container, blocking, device);
}
TimestampPacketContainer timestampPacketContainer;

View File

@@ -831,7 +831,7 @@ class CommandStreamReceiverMock : public CommandStreamReceiver {
WaitStatus waitForTaskCountWithKmdNotifyFallback(TaskCountType taskCountToWait, FlushStamp flushStampToWait, bool quickKmdSleep, QueueThrottle throttle) override {
return WaitStatus::ready;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override { return taskCount; };
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override { return taskCount; };
CompletionStamp flushTask(
LinearStream &commandStream,

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -198,7 +198,7 @@ BcsMockContext::BcsMockContext(ClDevice *device) : MockContext(device) {
BlitPropertiesContainer container;
container.push_back(blitProperties);
bcsCsr->flushBcsTask(container, true, false, const_cast<Device &>(device));
bcsCsr->flushBcsTask(container, true, const_cast<Device &>(device));
return BlitOperationResult::success;
};

View File

@@ -77,18 +77,19 @@ XE2_HPG_CORETEST_F(CommandStreamReceiverXe2HpgCoreTests, givenProfilingEnabledWh
0, 0, {1, 1, 1}, 0, 0, 0, 0);
MockTimestampPacketContainer timestamp(*bcsCsr->getTimestampPacketAllocator(), 1u);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.syncMode = BlitSyncMode::timestamp;
auto timestampContextStartGpuAddress = TimestampPacketHelper::getContextStartGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampGlobalStartAddress = TimestampPacketHelper::getGlobalStartGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampContextStartGpuAddress = TimestampPacketHelper::getContextStartGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampGlobalStartAddress = TimestampPacketHelper::getGlobalStartGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampContextEndGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampGlobalEndAddress = TimestampPacketHelper::getGlobalEndGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampContextEndGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampGlobalEndAddress = TimestampPacketHelper::getGlobalEndGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, true, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(bcsCsr->commandStream);
@@ -243,7 +244,7 @@ XE2_HPG_CORETEST_F(SystemMemoryFenceViaMiMemFenceTestXe2HpgCore, givenSystemMemo
EXPECT_FALSE(commandStreamReceiver.isEnginePrologueSent);
BlitPropertiesContainer blitPropertiesContainer;
commandStreamReceiver.flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
commandStreamReceiver.flushBcsTask(blitPropertiesContainer, false, *pDevice);
EXPECT_TRUE(commandStreamReceiver.isEnginePrologueSent);
HardwareParse hwParser;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2024 Intel Corporation
* Copyright (C) 2024-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -40,7 +40,7 @@ struct BlitXe2HpgCoreTests : public ::testing::Test {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
return csr->flushBcsTask(blitPropertiesContainer, blocking, false, device);
return csr->flushBcsTask(blitPropertiesContainer, blocking, device);
}
std::unique_ptr<MockClDevice> clDevice;

View File

@@ -76,18 +76,18 @@ XE3_CORETEST_F(CommandStreamReceiverXe3CoreTests, givenProfilingEnabledWhenBlitB
0, 0, {1, 1, 1}, 0, 0, 0, 0);
MockTimestampPacketContainer timestamp(*bcsCsr->getTimestampPacketAllocator(), 1u);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.syncMode = BlitSyncMode::timestamp;
auto timestampContextStartGpuAddress = TimestampPacketHelper::getContextStartGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampGlobalStartAddress = TimestampPacketHelper::getGlobalStartGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampContextStartGpuAddress = TimestampPacketHelper::getContextStartGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampGlobalStartAddress = TimestampPacketHelper::getGlobalStartGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampContextEndGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampGlobalEndAddress = TimestampPacketHelper::getGlobalEndGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampContextEndGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
auto timestampGlobalEndAddress = TimestampPacketHelper::getGlobalEndGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, true, *pDevice);
bcsCsr->flushBcsTask(blitPropertiesContainer, false, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(bcsCsr->commandStream);

View File

@@ -41,7 +41,7 @@ struct BlitXe3CoreTests : public ::testing::Test {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
return csr->flushBcsTask(blitPropertiesContainer, blocking, false, device);
return csr->flushBcsTask(blitPropertiesContainer, blocking, device);
}
std::unique_ptr<MockClDevice> clDevice;

View File

@@ -137,7 +137,7 @@ XE_HPC_CORETEST_F(SystemMemoryFenceViaMiMemFenceTest, givenSystemMemoryFenceGene
EXPECT_FALSE(commandStreamReceiver.isEnginePrologueSent);
BlitPropertiesContainer blitPropertiesContainer;
commandStreamReceiver.flushBcsTask(blitPropertiesContainer, false, false, *pDevice);
commandStreamReceiver.flushBcsTask(blitPropertiesContainer, false, *pDevice);
EXPECT_TRUE(commandStreamReceiver.isEnginePrologueSent);
HardwareParse hwParser;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -43,7 +43,7 @@ struct BlitXeHpcCoreTests : public ::testing::Test {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
return csr->flushBcsTask(blitPropertiesContainer, blocking, false, device);
return csr->flushBcsTask(blitPropertiesContainer, blocking, device);
}
std::unique_ptr<MockClDevice> clDevice;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -45,7 +45,7 @@ struct BlitXeHpgCoreTests : public ::testing::Test {
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
return csr->flushBcsTask(blitPropertiesContainer, blocking, false, device);
return csr->flushBcsTask(blitPropertiesContainer, blocking, device);
}
std::unique_ptr<MockClDevice> clDevice;

View File

@@ -307,7 +307,7 @@ class CommandStreamReceiver {
this->latestFlushedTaskCount = latestFlushedTaskCount;
}
virtual TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) = 0;
virtual TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) = 0;
virtual SubmissionStatus flushTagUpdate() = 0;
virtual void updateTagFromWait() = 0;

View File

@@ -130,7 +130,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
return CommandStreamReceiverType::hardware;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override;
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override;
SubmissionStatus flushTagUpdate() override;
SubmissionStatus flushMiFlushDW(bool initializeProlog);

View File

@@ -979,7 +979,7 @@ uint32_t CommandStreamReceiverHw<GfxFamily>::getDirectSubmissionRelaxedOrderingQ
}
template <typename GfxFamily>
TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) {
TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) {
auto lock = obtainUniqueOwnership();
bool blitterDirectSubmission = this->isBlitterDirectSubmissionEnabled();
auto debugPauseEnabled = PauseOnGpuProperties::featureEnabled(debugManager.flags.PauseOnBlitCopy.get());
@@ -989,7 +989,7 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
const bool hasStallingCmds = updateTag || !this->isEnginePrologueSent;
const bool relaxedOrderingAllowed = bcsRelaxedOrderingAllowed(blitPropertiesContainer, hasStallingCmds);
auto estimatedCsSize = BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(blitPropertiesContainer, profilingEnabled, debugPauseEnabled, blitterDirectSubmission,
auto estimatedCsSize = BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(blitPropertiesContainer, blitPropertiesContainer[0].blitSyncProperties.isTimestampMode(), debugPauseEnabled, blitterDirectSubmission,
relaxedOrderingAllowed, *rootDeviceEnvironment.get());
auto &commandStream = getCS(estimatedCsSize);
@@ -1037,8 +1037,8 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
BlitCommandsHelper<GfxFamily>::encodeWa(commandStream, blitProperties, latestSentBcsWaValue);
if (blitProperties.outputTimestampPacket && profilingEnabled) {
BlitCommandsHelper<GfxFamily>::encodeProfilingStartMmios(commandStream, *blitProperties.outputTimestampPacket);
if (blitProperties.blitSyncProperties.outputTimestampPacket && blitProperties.blitSyncProperties.isTimestampMode()) {
BlitCommandsHelper<GfxFamily>::encodeProfilingStartMmios(commandStream, *blitProperties.blitSyncProperties.outputTimestampPacket);
}
if (debugManager.flags.FlushTlbBeforeCopy.get() == 1) {
@@ -1051,7 +1051,7 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
BlitCommandsHelper<GfxFamily>::dispatchBlitCommands(blitProperties, commandStream, *waArgs.rootDeviceEnvironment);
if (blitProperties.outputTimestampPacket) {
if (blitProperties.blitSyncProperties.outputTimestampPacket) {
bool deviceToHostPostSyncFenceRequired = getProductHelper().isDeviceToHostCopySignalingFenceRequired() &&
!blitProperties.dstAllocation->isAllocatedInLocalMemoryPool() &&
blitProperties.srcAllocation->isAllocatedInLocalMemoryPool();
@@ -1060,16 +1060,16 @@ TaskCountType CommandStreamReceiverHw<GfxFamily>::flushBcsTask(const BlitPropert
MemorySynchronizationCommands<GfxFamily>::addAdditionalSynchronization(commandStream, tagAllocation->getGpuAddress(), false, peekRootDeviceEnvironment());
}
if (profilingEnabled) {
if (blitProperties.blitSyncProperties.isTimestampMode()) {
EncodeMiFlushDW<GfxFamily>::programWithWa(commandStream, 0llu, newTaskCount, args);
BlitCommandsHelper<GfxFamily>::encodeProfilingEndMmios(commandStream, *blitProperties.outputTimestampPacket);
BlitCommandsHelper<GfxFamily>::encodeProfilingEndMmios(commandStream, *blitProperties.blitSyncProperties.outputTimestampPacket);
} else {
auto timestampPacketGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.outputTimestampPacket);
auto timestampPacketGpuAddress = TimestampPacketHelper::getContextEndGpuAddress(*blitProperties.blitSyncProperties.outputTimestampPacket);
args.commandWithPostSync = true;
EncodeMiFlushDW<GfxFamily>::programWithWa(commandStream, timestampPacketGpuAddress, 0, args);
}
makeResident(*blitProperties.outputTimestampPacket->getBaseGraphicsAllocation());
makeResident(*blitProperties.blitSyncProperties.outputTimestampPacket->getBaseGraphicsAllocation());
}
blitProperties.csrDependencies.makeResident(*this);

View File

@@ -144,7 +144,7 @@ size_t BlitCommandsHelper<GfxFamily>::estimateBlitCommandsSize(const BlitPropert
size_t size = 0;
EncodeDummyBlitWaArgs waArgs{false, const_cast<RootDeviceEnvironment *>(&rootDeviceEnvironment)};
for (auto &blitProperties : blitPropertiesContainer) {
auto updateTimestampPacket = blitProperties.outputTimestampPacket != nullptr;
auto updateTimestampPacket = blitProperties.blitSyncProperties.outputTimestampPacket != nullptr;
auto isImage = blitProperties.isImageOperation();
size += BlitCommandsHelper<GfxFamily>::estimateBlitCommandSize(blitProperties.copySize, blitProperties.csrDependencies, updateTimestampPacket,
profilingEnabled, isImage, rootDeviceEnvironment, blitProperties.isSystemMemoryPoolUsed, relaxedOrderingEnabled);

View File

@@ -65,7 +65,7 @@ BlitOperationResult BlitHelper::blitMemoryToAllocationBanks(const Device &device
(memory->getGpuAddress() + offset),
0, 0, 0, size, 0, 0, 0, 0));
const auto newTaskCount = bcsEngine->commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, false, *pDeviceForBlit);
const auto newTaskCount = bcsEngine->commandStreamReceiver->flushBcsTask(blitPropertiesContainer, true, *pDeviceForBlit);
if (newTaskCount == CompletionStamp::gpuHang) {
return BlitOperationResult::gpuHang;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -42,51 +42,48 @@ BlitProperties BlitProperties::constructPropertiesForReadWrite(BlitterConstants:
if (BlitterConstants::BlitDirection::hostPtrToBuffer == blitDirection ||
BlitterConstants::BlitDirection::hostPtrToImage == blitDirection) {
return {
nullptr, // outputTimestampPacket
nullptr, // multiRootDeviceEventSync
blitDirection, // blitDirection
{}, // csrDependencies
AuxTranslationDirection::none, // auxTranslationDirection
memObjAllocation, // dstAllocation
hostAllocation, // srcAllocation
clearColorAllocation, // clearColorAllocation
memObjGpuVa, // dstGpuAddress
hostAllocGpuVa, // srcGpuAddress
copySize, // copySize
copyOffset, // dstOffset
hostPtrOffset, // srcOffset
true,
gpuRowPitch, // dstRowPitch
gpuSlicePitch, // dstSlicePitch
hostRowPitch, // srcRowPitch
hostSlicePitch, // srcSlicePitch
copySize, // dstSize
copySize // srcSize
};
.blitSyncProperties = {},
.csrDependencies = {},
.multiRootDeviceEventSync = nullptr,
.blitDirection = blitDirection,
.auxTranslationDirection = AuxTranslationDirection::none,
.dstAllocation = memObjAllocation,
.srcAllocation = hostAllocation,
.clearColorAllocation = clearColorAllocation,
.dstGpuAddress = memObjGpuVa,
.srcGpuAddress = hostAllocGpuVa,
.copySize = copySize,
.dstOffset = copyOffset,
.srcOffset = hostPtrOffset,
.dstRowPitch = gpuRowPitch,
.dstSlicePitch = gpuSlicePitch,
.srcRowPitch = hostRowPitch,
.srcSlicePitch = hostSlicePitch,
.dstSize = copySize,
.srcSize = copySize,
.isSystemMemoryPoolUsed = true};
} else {
return {
nullptr, // outputTimestampPacket
nullptr, // multiRootDeviceEventSync
blitDirection, // blitDirection
{}, // csrDependencies
AuxTranslationDirection::none, // auxTranslationDirection
hostAllocation, // dstAllocation
memObjAllocation, // srcAllocation
clearColorAllocation, // clearColorAllocation
hostAllocGpuVa, // dstGpuAddress
memObjGpuVa, // srcGpuAddress
copySize, // copySize
hostPtrOffset, // dstOffset
copyOffset, // srcOffset
true,
hostRowPitch, // dstRowPitch
hostSlicePitch, // dstSlicePitch
gpuRowPitch, // srcRowPitch
gpuSlicePitch, // srcSlicePitch
copySize, // dstSize
copySize // srcSize
};
.blitSyncProperties = {},
.csrDependencies = {},
.multiRootDeviceEventSync = nullptr,
.blitDirection = blitDirection,
.auxTranslationDirection = AuxTranslationDirection::none,
.dstAllocation = hostAllocation,
.srcAllocation = memObjAllocation,
.clearColorAllocation = clearColorAllocation,
.dstGpuAddress = hostAllocGpuVa,
.srcGpuAddress = memObjGpuVa,
.copySize = copySize,
.dstOffset = hostPtrOffset,
.srcOffset = copyOffset,
.dstRowPitch = hostRowPitch,
.dstSlicePitch = hostSlicePitch,
.srcRowPitch = gpuRowPitch,
.srcSlicePitch = gpuSlicePitch,
.dstSize = copySize,
.srcSize = copySize,
.isSystemMemoryPoolUsed = true};
};
}
@@ -98,24 +95,24 @@ BlitProperties BlitProperties::constructPropertiesForCopy(GraphicsAllocation *ds
copySize.z = copySize.z ? copySize.z : 1;
return {
nullptr, // outputTimestampPacket
nullptr, // multiRootDeviceEventSync
BlitterConstants::BlitDirection::bufferToBuffer, // blitDirection
{}, // csrDependencies
AuxTranslationDirection::none, // auxTranslationDirection
dstAllocation, // dstAllocation
srcAllocation, // srcAllocation
clearColorAllocation, // clearColorAllocation
dstAllocation->getGpuAddress(), // dstGpuAddress
srcAllocation->getGpuAddress(), // srcGpuAddress
copySize, // copySize
dstOffset, // dstOffset
srcOffset, // srcOffset
MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool(), srcAllocation->getMemoryPool()),
dstRowPitch, // dstRowPitch
dstSlicePitch, // dstSlicePitch
srcRowPitch, // srcRowPitch
srcSlicePitch}; // srcSlicePitch
.blitSyncProperties = {},
.csrDependencies = {},
.multiRootDeviceEventSync = nullptr,
.blitDirection = BlitterConstants::BlitDirection::bufferToBuffer,
.auxTranslationDirection = AuxTranslationDirection::none,
.dstAllocation = dstAllocation,
.srcAllocation = srcAllocation,
.clearColorAllocation = clearColorAllocation,
.dstGpuAddress = dstAllocation->getGpuAddress(),
.srcGpuAddress = srcAllocation->getGpuAddress(),
.copySize = copySize,
.dstOffset = dstOffset,
.srcOffset = srcOffset,
.dstRowPitch = dstRowPitch,
.dstSlicePitch = dstSlicePitch,
.srcRowPitch = srcRowPitch,
.srcSlicePitch = srcSlicePitch,
.isSystemMemoryPoolUsed = MemoryPoolHelper::isSystemMemoryPool(dstAllocation->getMemoryPool(), srcAllocation->getMemoryPool())};
}
BlitProperties BlitProperties::constructPropertiesForAuxTranslation(AuxTranslationDirection auxTranslationDirection,
@@ -123,20 +120,18 @@ BlitProperties BlitProperties::constructPropertiesForAuxTranslation(AuxTranslati
auto allocationSize = allocation->getUnderlyingBufferSize();
return {
nullptr, // outputTimestampPacket
nullptr, // multiRootDeviceEventSync
BlitterConstants::BlitDirection::bufferToBuffer, // blitDirection
{}, // csrDependencies
auxTranslationDirection, // auxTranslationDirection
allocation, // dstAllocation
allocation, // srcAllocation
clearColorAllocation, // clearColorAllocation
allocation->getGpuAddress(), // dstGpuAddress
allocation->getGpuAddress(), // srcGpuAddress
{allocationSize, 1, 1}, // copySize
0, // dstOffset
0, // srcOffset
MemoryPoolHelper::isSystemMemoryPool(allocation->getMemoryPool())};
.blitSyncProperties = {},
.csrDependencies = {},
.multiRootDeviceEventSync = nullptr,
.blitDirection = BlitterConstants::BlitDirection::bufferToBuffer,
.auxTranslationDirection = auxTranslationDirection,
.dstAllocation = allocation,
.srcAllocation = allocation,
.clearColorAllocation = clearColorAllocation,
.dstGpuAddress = allocation->getGpuAddress(),
.srcGpuAddress = allocation->getGpuAddress(),
.copySize = {allocationSize, 1, 1},
.isSystemMemoryPoolUsed = MemoryPoolHelper::isSystemMemoryPool(allocation->getMemoryPool())};
}
void BlitProperties::setupDependenciesForAuxTranslation(BlitPropertiesContainer &blitPropertiesContainer, TimestampPacketDependencies &timestampPacketDependencies,
@@ -145,8 +140,11 @@ void BlitProperties::setupDependenciesForAuxTranslation(BlitPropertiesContainer
auto numObjects = blitPropertiesContainer.size() / 2;
for (size_t i = 0; i < numObjects; i++) {
blitPropertiesContainer[i].outputTimestampPacket = timestampPacketDependencies.auxToNonAuxNodes.peekNodes()[i];
blitPropertiesContainer[i + numObjects].outputTimestampPacket = timestampPacketDependencies.nonAuxToAuxNodes.peekNodes()[i];
blitPropertiesContainer[i].blitSyncProperties.outputTimestampPacket = timestampPacketDependencies.auxToNonAuxNodes.peekNodes()[i];
blitPropertiesContainer[i].blitSyncProperties.syncMode = BlitSyncMode::immediate;
blitPropertiesContainer[i + numObjects].blitSyncProperties.outputTimestampPacket = timestampPacketDependencies.nonAuxToAuxNodes.peekNodes()[i];
blitPropertiesContainer[i + numObjects].blitSyncProperties.syncMode = BlitSyncMode::immediate;
}
auto nodesAllocator = gpguCsr.getTimestampPacketAllocator();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2023 Intel Corporation
* Copyright (C) 2023-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -22,6 +22,26 @@ class TimestampPacketContainer;
class GraphicsAllocation;
class CommandStreamReceiver;
enum class BlitSyncMode {
none = 0,
timestamp,
immediate,
timestampAndImmediate
};
struct BlitSyncProperties {
TagNodeBase *outputTimestampPacket = nullptr;
BlitSyncMode syncMode = BlitSyncMode::none;
uint64_t deviceGpuWriteAddress = 0;
uint64_t hostGpuWriteAddress = 0;
uint64_t timestampGpuWriteAddress = 0;
uint64_t writeValue = 0;
bool isTimestampMode() const {
return (syncMode == BlitSyncMode::timestamp) || (syncMode == BlitSyncMode::timestampAndImmediate);
}
};
struct BlitProperties {
static BlitProperties constructPropertiesForReadWrite(BlitterConstants::BlitDirection blitDirection,
CommandStreamReceiver &commandStreamReceiver,
@@ -45,10 +65,11 @@ struct BlitProperties {
TimestampPacketContainer &kernelTimestamps, const CsrDependencies &depsFromEvents,
CommandStreamReceiver &gpguCsr, CommandStreamReceiver &bcsCsr);
TagNodeBase *outputTimestampPacket = nullptr;
TagNodeBase *multiRootDeviceEventSync = nullptr;
BlitterConstants::BlitDirection blitDirection = BlitterConstants::BlitDirection::bufferToHostPtr;
BlitSyncProperties blitSyncProperties = {};
CsrDependencies csrDependencies;
TagNodeBase *multiRootDeviceEventSync = nullptr;
BlitterConstants::BlitDirection blitDirection = BlitterConstants::BlitDirection::bufferToHostPtr;
AuxTranslationDirection auxTranslationDirection = AuxTranslationDirection::none;
GraphicsAllocation *dstAllocation = nullptr;
@@ -60,7 +81,6 @@ struct BlitProperties {
Vec3<size_t> copySize = 0;
Vec3<size_t> dstOffset = 0;
Vec3<size_t> srcOffset = 0;
bool isSystemMemoryPoolUsed = false;
size_t dstRowPitch = 0;
size_t dstSlicePitch = 0;
@@ -71,6 +91,7 @@ struct BlitProperties {
size_t bytesPerPixel = 1;
GMM_YUV_PLANE_ENUM dstPlane = GMM_YUV_PLANE_ENUM::GMM_NO_PLANE;
GMM_YUV_PLANE_ENUM srcPlane = GMM_YUV_PLANE_ENUM::GMM_NO_PLANE;
bool isSystemMemoryPoolUsed = false;
bool isImageOperation() const;
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2024 Intel Corporation
* Copyright (C) 2019-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -48,9 +48,9 @@ class UltAubCommandStreamReceiver : public AUBCommandStreamReceiverHw<GfxFamily>
return csr;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override {
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override {
blitBufferCalled++;
return BaseClass::flushBcsTask(blitPropertiesContainer, blocking, profilingEnabled, device);
return BaseClass::flushBcsTask(blitPropertiesContainer, blocking, device);
}
void pollForCompletion(bool skipTaskCountCheck) override {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2024 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -415,12 +415,12 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
return CommandStreamReceiverHw<GfxFamily>::obtainUniqueOwnership();
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override {
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override {
blitBufferCalled++;
receivedBlitProperties = blitPropertiesContainer;
if (callBaseFlushBcsTask) {
return CommandStreamReceiverHw<GfxFamily>::flushBcsTask(blitPropertiesContainer, blocking, profilingEnabled, device);
return CommandStreamReceiverHw<GfxFamily>::flushBcsTask(blitPropertiesContainer, blocking, device);
} else {
return flushBcsTaskReturnValue;
}

View File

@@ -175,7 +175,7 @@ class MockCommandStreamReceiver : public CommandStreamReceiver {
return WaitStatus::ready;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override { return taskCount; };
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override { return taskCount; };
CommandStreamReceiverType getType() const override {
return commandStreamReceiverType;
@@ -414,9 +414,9 @@ class MockCsrHw2 : public CommandStreamReceiverHw<GfxFamily> {
return completionStamp;
}
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, bool profilingEnabled, Device &device) override {
TaskCountType flushBcsTask(const BlitPropertiesContainer &blitPropertiesContainer, bool blocking, Device &device) override {
if (!skipBlitCalls) {
return CommandStreamReceiverHw<GfxFamily>::flushBcsTask(blitPropertiesContainer, blocking, profilingEnabled, device);
return CommandStreamReceiverHw<GfxFamily>::flushBcsTask(blitPropertiesContainer, blocking, device);
}
return taskCount;
}

View File

@@ -1224,7 +1224,7 @@ HWTEST_F(AubCommandStreamReceiverTests, WhenBlitBufferIsCalledThenCounterIsCorre
BlitProperties blitProperties = BlitProperties::constructPropertiesForCopy(&allocation, &allocation, 0, 0, 0, 0, 0, 0, 0, aubCsr->getClearColorAllocation());
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
aubCsr->flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
aubCsr->flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_EQ(1u, aubCsr->blitBufferCalled);
}

View File

@@ -2975,11 +2975,11 @@ HWTEST_F(CommandStreamReceiverHwTest, givenFailureOnFlushWhenFlushingBcsTaskThen
container.push_back(blitProperties);
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfHostMemory;
EXPECT_EQ(CompletionStamp::outOfHostMemory, commandStreamReceiver.flushBcsTask(container, true, false, *pDevice));
EXPECT_EQ(CompletionStamp::outOfHostMemory, commandStreamReceiver.flushBcsTask(container, true, *pDevice));
commandStreamReceiver.flushReturnValue = SubmissionStatus::outOfMemory;
EXPECT_EQ(CompletionStamp::outOfDeviceMemory, commandStreamReceiver.flushBcsTask(container, true, false, *pDevice));
EXPECT_EQ(CompletionStamp::outOfDeviceMemory, commandStreamReceiver.flushBcsTask(container, true, *pDevice));
commandStreamReceiver.flushReturnValue = SubmissionStatus::failed;
EXPECT_EQ(CompletionStamp::failed, commandStreamReceiver.flushBcsTask(container, true, false, *pDevice));
EXPECT_EQ(CompletionStamp::failed, commandStreamReceiver.flushBcsTask(container, true, *pDevice));
}
HWTEST_F(CommandStreamReceiverHwTest, givenFlushBcsTaskVerifyLatestSentTaskCountUpdated) {
@@ -3055,13 +3055,13 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
bcsCsr, &mockAllocation, nullptr, hostPtr,
mockAllocation.getGpuAddress(), 0,
0, 0, {1, 1, 1}, 0, 0, 0, 0);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
offset = bcsCsr.commandStream.getUsed();
bcsCsr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
bcsCsr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_TRUE(verify(true));
}
@@ -3079,7 +3079,7 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
blitPropertiesContainer.push_back(blitProperties);
offset = bcsCsr.commandStream.getUsed();
bcsCsr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
bcsCsr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_TRUE(verify(false));
}
@@ -3092,13 +3092,13 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
bcsCsr, &mockAllocation, nullptr, hostPtr,
mockAllocation.getGpuAddress(), 0,
0, 0, {1, 1, 1}, 0, 0, 0, 0);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
offset = bcsCsr.commandStream.getUsed();
bcsCsr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
bcsCsr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_TRUE(verify(false));
}
@@ -3111,13 +3111,13 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
bcsCsr, &mockAllocation, nullptr, hostPtr,
mockAllocation.getGpuAddress(), 0,
0, 0, {1, 1, 1}, 0, 0, 0, 0);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
offset = bcsCsr.commandStream.getUsed();
bcsCsr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
bcsCsr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_TRUE(verify(false));
}
@@ -3127,13 +3127,13 @@ HWTEST2_F(CommandStreamReceiverHwTest, givenDeviceToHostCopyWhenFenceIsRequiredT
mockAllocation.memoryPool = MemoryPool::localMemory;
auto blitProperties = BlitProperties::constructPropertiesForCopy(&mockAllocation, &mockAllocation, {0, 0, 0}, {0, 0, 0}, {1, 1, 1}, 0, 0, 0, 0, nullptr);
blitProperties.outputTimestampPacket = timestamp.getNode(0);
blitProperties.blitSyncProperties.outputTimestampPacket = timestamp.getNode(0);
BlitPropertiesContainer blitPropertiesContainer;
blitPropertiesContainer.push_back(blitProperties);
offset = bcsCsr.commandStream.getUsed();
bcsCsr.flushBcsTask(blitPropertiesContainer, true, false, *pDevice);
bcsCsr.flushBcsTask(blitPropertiesContainer, true, *pDevice);
EXPECT_TRUE(verify(false));
}
@@ -3362,7 +3362,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenMultiRootDeviceSyncNodeWhenFlushBcsTa
BlitPropertiesContainer container;
container.push_back(blitProperties);
commandStreamReceiver.flushBcsTask(container, true, false, *pDevice);
commandStreamReceiver.flushBcsTask(container, true, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(commandStreamReceiver.commandStream, 0);
@@ -3392,7 +3392,7 @@ HWTEST_F(CommandStreamReceiverHwTest, givenNullPtrAsMultiRootDeviceSyncNodeWhenF
BlitPropertiesContainer container;
container.push_back(blitProperties);
commandStreamReceiver.flushBcsTask(container, true, false, *pDevice);
commandStreamReceiver.flushBcsTask(container, true, *pDevice);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(commandStreamReceiver.commandStream, 0);