mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
refactor: ability to force event inc value in bcs split path
Related-To: NEO-14557 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
819702ceb8
commit
fc7dd0cd87
@@ -279,7 +279,7 @@ struct CommandListCoreFamily : public CommandListImp {
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch, bool dualStreamCopyOffload);
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams, bool dualStreamCopyOffload);
|
||||
|
||||
MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyKernel2d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation,
|
||||
Builtin builtin, const ze_copy_region_t *dstRegion,
|
||||
@@ -372,7 +372,7 @@ struct CommandListCoreFamily : public CommandListImp {
|
||||
uint32_t getRegionOffsetForAppendMemoryCopyBlitRegion(AlignedAllocationData *allocationData);
|
||||
void handlePostSubmissionState();
|
||||
|
||||
MOCKABLE_VIRTUAL void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, bool useAdditionalTimestamp);
|
||||
MOCKABLE_VIRTUAL void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, uint32_t forceAggregatedEventIncValue, bool useAdditionalTimestamp);
|
||||
|
||||
void setupFillKernelArguments(size_t baseOffset,
|
||||
size_t patternSize,
|
||||
|
||||
@@ -1583,7 +1583,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlit(uintptr_t
|
||||
size_t nBlitsPerRow = NEO::BlitCommandsHelper<GfxFamily>::getNumberOfBlitsForCopyPerRow(blitProperties.copySize, device->getNEODevice()->getRootDeviceEnvironmentRef(), blitProperties.isSystemMemoryPoolUsed);
|
||||
bool useAdditionalTimestamp = nBlitsPerRow > 1;
|
||||
if (useAdditionalBlitProperties) {
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, useAdditionalTimestamp);
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, memoryCopyParams.forceAggregatedEventIncValue, useAdditionalTimestamp);
|
||||
}
|
||||
|
||||
NEO::BlitPropertiesContainer blitPropertiesContainer{blitProperties};
|
||||
@@ -1606,7 +1606,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(Ali
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents,
|
||||
bool relaxedOrderingDispatch, bool dualStreamCopyOffload) {
|
||||
CmdListMemoryCopyParams &memoryCopyParams, bool dualStreamCopyOffload) {
|
||||
if (srcAllocationData->alloc) {
|
||||
srcRegion.originX += getRegionOffsetForAppendMemoryCopyBlitRegion(srcAllocationData);
|
||||
}
|
||||
@@ -1633,7 +1633,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(Ali
|
||||
blitProperties.srcSize = srcSize;
|
||||
blitProperties.dstSize = dstSize;
|
||||
|
||||
ze_result_t ret = addEventsToCmdList(numWaitEvents, phWaitEvents, nullptr, relaxedOrderingDispatch, false, true, false, dualStreamCopyOffload);
|
||||
ze_result_t ret = addEventsToCmdList(numWaitEvents, phWaitEvents, nullptr, memoryCopyParams.relaxedOrderingDispatch, false, true, false, dualStreamCopyOffload);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
@@ -1647,7 +1647,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(Ali
|
||||
size_t nBlits = copyRegionPreferred ? NEO::BlitCommandsHelper<GfxFamily>::getNumberOfBlitsForCopyRegion(blitProperties.copySize, rootDeviceEnvironment, blitProperties.isSystemMemoryPoolUsed) : NEO::BlitCommandsHelper<GfxFamily>::getNumberOfBlitsForCopyPerRow(blitProperties.copySize, rootDeviceEnvironment, blitProperties.isSystemMemoryPoolUsed);
|
||||
bool useAdditionalTimestamp = nBlits > 1;
|
||||
if (useAdditionalBlitProperties) {
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, useAdditionalTimestamp);
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, memoryCopyParams.forceAggregatedEventIncValue, useAdditionalTimestamp);
|
||||
} else {
|
||||
appendEventForProfiling(signalEvent, nullptr, true, false, false, true);
|
||||
}
|
||||
@@ -1710,7 +1710,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendCopyImageBlit(uintptr_t
|
||||
|
||||
bool useAdditionalTimestamp = blitProperties.copySize.z > 1;
|
||||
if (useAdditionalBlitProperties) {
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, useAdditionalTimestamp);
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, 0, useAdditionalTimestamp);
|
||||
} else {
|
||||
appendEventForProfiling(signalEvent, nullptr, true, false, false, true);
|
||||
}
|
||||
@@ -2145,7 +2145,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyRegion(void *d
|
||||
result = appendMemoryCopyBlitRegion(&srcAllocationStruct, &dstAllocationStruct, *srcRegion, *dstRegion,
|
||||
{srcRegion->width, srcRegion->height, srcRegion->depth},
|
||||
srcPitch, srcSlicePitch, dstPitch, dstSlicePitch, srcSize3, dstSize3,
|
||||
signalEvent, numWaitEvents, phWaitEvents, memoryCopyParams.relaxedOrderingDispatch, isDualStreamCopyOffloadOperation(memoryCopyParams.copyOffloadAllowed));
|
||||
signalEvent, numWaitEvents, phWaitEvents, memoryCopyParams, isDualStreamCopyOffloadOperation(memoryCopyParams.copyOffloadAllowed));
|
||||
} else if ((srcRegion->depth > 1) || (srcRegion->originZ != 0) || (dstRegion->originZ != 0)) {
|
||||
Builtin builtInType = BuiltinTypeHelper::adjustBuiltinType<Builtin::copyBufferRectBytes3d>(isStateless, false);
|
||||
result = this->appendMemoryCopyKernel3d(&dstAllocationStruct, &srcAllocationStruct, builtInType,
|
||||
@@ -2820,7 +2820,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendBlitFill(void *ptr, cons
|
||||
setAdditionalBlitPropertiesFromMemoryCopyParams(blitProperties, memoryCopyParams);
|
||||
|
||||
if (useAdditionalBlitProperties) {
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, useAdditionalTimestamp);
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent, 0, useAdditionalTimestamp);
|
||||
}
|
||||
blitProperties.computeStreamPartitionCount = this->partitionCount;
|
||||
blitProperties.highPriority = isHighPriorityImmediateCmdList();
|
||||
|
||||
@@ -16,7 +16,7 @@ constexpr bool CommandListCoreFamily<gfxCoreFamily>::checkIfAllocationImportedRe
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamily<gfxCoreFamily>::setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, bool useAdditionalTimestamp) {
|
||||
void CommandListCoreFamily<gfxCoreFamily>::setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, uint32_t forceAggregatedEventIncValue, bool useAdditionalTimestamp) {
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
|
||||
@@ -697,7 +697,8 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopy(
|
||||
if (isSplitNeeded) {
|
||||
setupFlagsForBcsSplit(memoryCopyParams, hasStallingCmds, copyOffloadFlush, srcptr, dstptr, size, size);
|
||||
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, void *dstptrParam, const void *srcptrParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, void *dstptrParam, const void *srcptrParam, size_t sizeParam, ze_event_handle_t hSignalEventParam, uint32_t aggregatedEventInvValue) {
|
||||
memoryCopyParams.forceAggregatedEventIncValue = aggregatedEventInvValue;
|
||||
return subCmdList->CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(dstptrParam, srcptrParam, sizeParam, hSignalEventParam, 0u, nullptr, memoryCopyParams);
|
||||
};
|
||||
|
||||
@@ -752,7 +753,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopyRegio
|
||||
this->getTotalSizeForCopyRegion(srcRegion, srcPitch, srcSlicePitch),
|
||||
this->getTotalSizeForCopyRegion(dstRegion, dstPitch, dstSlicePitch));
|
||||
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, uint32_t dstOriginXParam, uint32_t srcOriginXParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, uint32_t dstOriginXParam, uint32_t srcOriginXParam, size_t sizeParam, ze_event_handle_t hSignalEventParam, uint32_t aggregatedEventInvValue) {
|
||||
ze_copy_region_t dstRegionLocal = {};
|
||||
ze_copy_region_t srcRegionLocal = {};
|
||||
memcpy(&dstRegionLocal, dstRegion, sizeof(ze_copy_region_t));
|
||||
@@ -761,6 +762,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendMemoryCopyRegio
|
||||
dstRegionLocal.width = static_cast<uint32_t>(sizeParam);
|
||||
srcRegionLocal.originX = srcOriginXParam;
|
||||
srcRegionLocal.width = static_cast<uint32_t>(sizeParam);
|
||||
memoryCopyParams.forceAggregatedEventIncValue = aggregatedEventInvValue;
|
||||
return subCmdList->CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyRegion(dstPtr, &dstRegionLocal, dstPitch, dstSlicePitch,
|
||||
srcPtr, &srcRegionLocal, srcPitch, srcSlicePitch,
|
||||
hSignalEventParam, 0u, nullptr, memoryCopyParams);
|
||||
@@ -837,7 +839,8 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendPageFaultCopy(N
|
||||
|
||||
setupFlagsForBcsSplit(bcsSplitMemoryCopyParams, hasStallingCmds, copyOffloadFlush, srcAddress, dstAddress, size, size);
|
||||
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, void *dstAddressParam, const void *srcAddressParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
|
||||
auto splitCall = [&](CommandListCoreFamilyImmediate<gfxCoreFamily> *subCmdList, void *dstAddressParam, const void *srcAddressParam, size_t sizeParam, ze_event_handle_t hSignalEventParam, uint32_t aggregatedEventInvValue) {
|
||||
bcsSplitMemoryCopyParams.forceAggregatedEventIncValue = aggregatedEventInvValue;
|
||||
return subCmdList->CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(dstAddressParam, srcAddressParam, sizeParam, hSignalEventParam, 0u, nullptr, bcsSplitMemoryCopyParams);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "cmdlist_memory_copy_params_ext.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace L0 {
|
||||
struct CmdListMemoryCopyParams {
|
||||
@@ -17,6 +18,7 @@ struct CmdListMemoryCopyParams {
|
||||
void *bcsSplitBaseDstPtr = nullptr;
|
||||
size_t bcsSplitTotalSrcSize = 0;
|
||||
size_t bcsSplitTotalDstSize = 0;
|
||||
uint32_t forceAggregatedEventIncValue = 0;
|
||||
bool relaxedOrderingDispatch = false;
|
||||
bool forceDisableCopyOnlyInOrderSignaling = false;
|
||||
bool copyOffloadAllowed = false;
|
||||
|
||||
@@ -29,7 +29,10 @@ struct CommandQueue;
|
||||
struct DeviceImp;
|
||||
|
||||
struct BcsSplit {
|
||||
template <GFXCORE_FAMILY gfxCoreFamily, typename T, typename K>
|
||||
using AppendCallFuncT = std::function<ze_result_t(CommandListCoreFamilyImmediate<gfxCoreFamily> *, T, K, size_t, ze_event_handle_t, uint32_t)>;
|
||||
using CsrContainer = StackVec<NEO::CommandStreamReceiver *, 12u>;
|
||||
|
||||
DeviceImp &device;
|
||||
uint32_t clientCount = 0u;
|
||||
|
||||
@@ -77,7 +80,7 @@ struct BcsSplit {
|
||||
bool hasRelaxedOrderingDependencies,
|
||||
NEO::TransferDirection direction,
|
||||
size_t estimatedCmdBufferSize,
|
||||
std::function<ze_result_t(CommandListCoreFamilyImmediate<gfxCoreFamily> *, T, K, size_t, ze_event_handle_t)> appendCall) {
|
||||
AppendCallFuncT<gfxCoreFamily, T, K> appendCall) {
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
|
||||
auto markerEventIndexRet = this->events.obtainForSplit(Context::fromHandle(cmdList->getCmdListContext()), MemoryConstants::pageSize64k / sizeof(typename CommandListCoreFamilyImmediate<gfxCoreFamily>::GfxFamily::TimestampPacketType));
|
||||
@@ -133,7 +136,7 @@ struct BcsSplit {
|
||||
|
||||
auto copyEventIndex = aggregatedEventsMode ? markerEventIndex : subcopyEventIndex + i;
|
||||
auto eventHandle = this->events.subcopy[copyEventIndex]->toHandle();
|
||||
result = appendCall(subCmdList, localDstPtr, localSrcPtr, localSize, eventHandle);
|
||||
result = appendCall(subCmdList, localDstPtr, localSrcPtr, localSize, eventHandle, 1);
|
||||
subCmdList->flushImmediate(result, true, !hasRelaxedOrderingDependencies, hasRelaxedOrderingDependencies, NEO::AppendOperations::nonKernel, false, nullptr, true, nullptr, nullptr);
|
||||
|
||||
if ((aggregatedEventsMode && i == 0) || !aggregatedEventsMode) {
|
||||
|
||||
@@ -745,11 +745,11 @@ class MockCommandListCoreFamily : public CommandListCoreFamily<gfxCoreFamily> {
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
L0::Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch, bool doubleStreamCopyOffload) override {
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams, bool doubleStreamCopyOffload) override {
|
||||
srcBlitCopyRegionOffset = srcAllocationData->offset;
|
||||
dstBlitCopyRegionOffset = dstAllocationData->offset;
|
||||
return L0::CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlitRegion(srcAllocationData, dstAllocationData, srcRegion, dstRegion, copySize, srcRowPitch, srcSlicePitch, dstRowPitch, dstSlicePitch,
|
||||
srcSize, dstSize, signalEvent, numWaitEvents, phWaitEvents, relaxedOrderingDispatch, doubleStreamCopyOffload);
|
||||
srcSize, dstSize, signalEvent, numWaitEvents, phWaitEvents, memoryCopyParams, doubleStreamCopyOffload);
|
||||
}
|
||||
uintptr_t srcAlignedPtr;
|
||||
uintptr_t dstAlignedPtr;
|
||||
|
||||
@@ -98,7 +98,7 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
L0::Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch, bool doubleStreamCopyOffload) override {
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams, bool doubleStreamCopyOffload) override {
|
||||
if (signalEvent) {
|
||||
useEvents = true;
|
||||
} else {
|
||||
@@ -108,7 +108,7 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, bool useAdditionalTimestamp) override {}
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, uint32_t forceAggregatedEventIncValue, bool useAdditionalTimestamp) override {}
|
||||
ze_result_t appendMemoryCopyKernel2d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation,
|
||||
Builtin builtin, const ze_copy_region_t *dstRegion,
|
||||
uint32_t dstPitch, size_t dstOffset,
|
||||
@@ -1439,7 +1439,8 @@ HWTEST2_F(CommandListCreateTests, givenCopyCommandListWhenCopyRegionWithinMaxBli
|
||||
AlignedAllocationData dstAllocationData = {mockAllocationDst.gpuAddress, 0, &mockAllocationDst, false};
|
||||
size_t rowPitch = copySize.x;
|
||||
size_t slicePitch = copySize.x * copySize.y;
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, false, false);
|
||||
CmdListMemoryCopyParams copyParams = {};
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, copyParams, false);
|
||||
GenCmdList cmdList;
|
||||
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
@@ -1490,7 +1491,8 @@ HWTEST2_F(CommandListCreateTests, givenCopyCommandListWhenCopyRegionWithinMaxBli
|
||||
AlignedAllocationData dstAllocationData = {mockAllocationDst.gpuAddress, 0, &mockAllocationDst, false};
|
||||
size_t rowPitch = copySize.x;
|
||||
size_t slicePitch = copySize.x * copySize.y;
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, false, false);
|
||||
CmdListMemoryCopyParams copyParams = {};
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, copyParams, false);
|
||||
uint32_t bytesPerPixel = NEO::BlitCommandsHelper<FamilyType>::getAvailableBytesPerPixel(copySize.x, srcRegion.originX, dstRegion.originY, srcSize.x, dstSize.x);
|
||||
GenCmdList cmdList;
|
||||
|
||||
@@ -1540,7 +1542,8 @@ HWTEST2_F(CommandListCreateTests, givenCopyCommandListWhenCopyRegionGreaterThanM
|
||||
AlignedAllocationData dstAllocationData = {mockAllocationDst.gpuAddress, 0, &mockAllocationDst, false};
|
||||
size_t rowPitch = copySize.x;
|
||||
size_t slicePitch = copySize.x * copySize.y;
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, false, false);
|
||||
CmdListMemoryCopyParams copyParams = {};
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, copySize, rowPitch, slicePitch, rowPitch, slicePitch, srcSize, dstSize, nullptr, 0, nullptr, copyParams, false);
|
||||
GenCmdList cmdList;
|
||||
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
@@ -1567,7 +1570,7 @@ class MockCommandListForRegionSize : public WhiteBox<::L0::CommandListCoreFamily
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
L0::Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch, bool doubleStreamCopyOffload) override {
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams, bool doubleStreamCopyOffload) override {
|
||||
this->srcSize = srcSize;
|
||||
this->dstSize = dstSize;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
|
||||
@@ -275,7 +275,7 @@ HWTEST_F(AppendMemoryCopyTests, givenCopyCommandListWhenTimestampPassedToMemoryC
|
||||
|
||||
AlignedAllocationData srcAllocationData = {mockAllocationSrc.gpuAddress, 0, &mockAllocationSrc, false};
|
||||
AlignedAllocationData dstAllocationData = {mockAllocationDst.gpuAddress, 0, &mockAllocationDst, false};
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, {0, 0, 0}, 0, 0, 0, 0, 0, 0, event.get(), 0, nullptr, false, false);
|
||||
commandList->appendMemoryCopyBlitRegion(&srcAllocationData, &dstAllocationData, srcRegion, dstRegion, {0, 0, 0}, 0, 0, 0, 0, 0, 0, event.get(), 0, nullptr, copyParams, false);
|
||||
GenCmdList cmdList;
|
||||
|
||||
auto baseAddr = event->getGpuAddress(device);
|
||||
@@ -519,14 +519,14 @@ HWTEST_F(AppendMemoryCopyTests, givenBlitPropertiesWhenCallingSetAdditionalBlitP
|
||||
|
||||
auto commandList = std::make_unique<MockCommandListForAdditionalBlitProperties<FamilyType::gfxCoreFamily>>();
|
||||
EXPECT_FALSE(commandList->useAdditionalBlitProperties);
|
||||
commandList->setAdditionalBlitProperties(blitProperties, nullptr, false);
|
||||
commandList->setAdditionalBlitProperties(blitProperties, nullptr, 0, false);
|
||||
EXPECT_EQ(postSyncArgs.isTimestampEvent, postSyncArgsExpected.isTimestampEvent);
|
||||
EXPECT_EQ(postSyncArgs.postSyncImmValue, postSyncArgsExpected.postSyncImmValue);
|
||||
EXPECT_EQ(postSyncArgs.interruptEvent, postSyncArgsExpected.interruptEvent);
|
||||
EXPECT_EQ(postSyncArgs.eventAddress, postSyncArgsExpected.eventAddress);
|
||||
|
||||
commandList->useAdditionalBlitProperties = true;
|
||||
commandList->setAdditionalBlitProperties(blitProperties2, nullptr, false);
|
||||
commandList->setAdditionalBlitProperties(blitProperties2, nullptr, 0, false);
|
||||
EXPECT_EQ(postSyncArgs2.isTimestampEvent, postSyncArgsExpected.isTimestampEvent);
|
||||
EXPECT_EQ(postSyncArgs2.postSyncImmValue, postSyncArgsExpected.postSyncImmValue);
|
||||
EXPECT_EQ(postSyncArgs2.interruptEvent, postSyncArgsExpected.interruptEvent);
|
||||
@@ -539,9 +539,9 @@ class MockCommandListForAdditionalBlitProperties2 : public WhiteBox<::L0::Comman
|
||||
public:
|
||||
using BaseClass = WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>;
|
||||
using BaseClass::useAdditionalBlitProperties;
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, bool useAdditionalTimestamp) override {
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, uint32_t forceAggregatedEventIncValue, bool useAdditionalTimestamp) override {
|
||||
additionalBlitPropertiesCalled++;
|
||||
BaseClass::setAdditionalBlitProperties(blitProperties, signalEvent, useAdditionalTimestamp);
|
||||
BaseClass::setAdditionalBlitProperties(blitProperties, signalEvent, forceAggregatedEventIncValue, useAdditionalTimestamp);
|
||||
}
|
||||
void appendSignalInOrderDependencyCounter(Event *signalEvent, bool copyOffloadOperation, bool stall, bool textureFlushRequired) override {
|
||||
appendSignalInOrderDependencyCounterCalled++;
|
||||
|
||||
@@ -131,7 +131,7 @@ class MockCommandListExtensionHw : public WhiteBox<::L0::CommandListCoreFamily<g
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, bool useAdditionalTimestamp) override {}
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent, uint32_t forceAggregatedEventIncValue, bool useAdditionalTimestamp) override {}
|
||||
|
||||
ze_result_t appendMemoryCopyBlitRegion(AlignedAllocationData *srcAllocationData,
|
||||
AlignedAllocationData *dstAllocationData,
|
||||
@@ -141,7 +141,7 @@ class MockCommandListExtensionHw : public WhiteBox<::L0::CommandListCoreFamily<g
|
||||
size_t dstRowPitch, size_t dstSlicePitch,
|
||||
const Vec3<size_t> &srcSize, const Vec3<size_t> &dstSize,
|
||||
Event *signalEvent,
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, bool relaxedOrderingDispatch, bool doubleStreamCopyOffload) override {
|
||||
uint32_t numWaitEvents, ze_event_handle_t *phWaitEvents, CmdListMemoryCopyParams &memoryCopyParams, bool doubleStreamCopyOffload) override {
|
||||
if (signalEvent) {
|
||||
useEvents = true;
|
||||
} else {
|
||||
|
||||
@@ -1772,7 +1772,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenImmediateCmdListWhenDispa
|
||||
}
|
||||
|
||||
events[0]->makeCounterBasedInitiallyDisabled(eventPool->getAllocation());
|
||||
copyOnlyCmdList->appendMemoryCopyBlitRegion(&allocationData, &allocationData, region, region, {0, 0, 0}, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}, events[0].get(), 0, nullptr, false, false);
|
||||
copyOnlyCmdList->appendMemoryCopyBlitRegion(&allocationData, &allocationData, region, region, {0, 0, 0}, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}, events[0].get(), 0, nullptr, copyParams, false);
|
||||
if (dcFlushRequired) {
|
||||
EXPECT_EQ(Event::CounterBasedMode::initiallyDisabled, events[0]->counterBasedMode);
|
||||
} else {
|
||||
@@ -1926,7 +1926,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, givenNonInOrderCmdListWhenPass
|
||||
const void **ranges = reinterpret_cast<const void **>(©Data[0]);
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, immCmdList->appendMemoryRangesBarrier(1, &rangeSizes, ranges, eventHandle, 0, nullptr));
|
||||
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, copyOnlyCmdList->appendMemoryCopyBlitRegion(&allocationData, &allocationData, region, region, {0, 0, 0}, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}, events[0].get(), 0, nullptr, false, false));
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, copyOnlyCmdList->appendMemoryCopyBlitRegion(&allocationData, &allocationData, region, region, {0, 0, 0}, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0}, events[0].get(), 0, nullptr, copyParams, false));
|
||||
|
||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, immCmdList->appendMemoryCopy(©Data, ©Data, 1, eventHandle, 0, nullptr, copyParams));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user