Revert "refactor: add BlitSyncPropertiesExt to BlitSyncProperties"
This reverts commit b5a259aded
.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
parent
b5a259aded
commit
0c3b765942
|
@ -17,4 +17,3 @@ list(APPEND DG2_AND_LATER_CORE_TYPES ${PVC_AND_LATER_CORE_TYPES} "XE_HPG_CORE")
|
|||
list(APPEND MTL_AND_LATER_CORE_TYPES ${DG2_AND_LATER_CORE_TYPES})
|
||||
list(APPEND XEHP_AND_LATER_CORE_TYPES ${MTL_AND_LATER_CORE_TYPES})
|
||||
list(APPEND XE_HPC_AND_BEFORE_CORE_TYPES "GEN12LP" "XE_HPG_CORE" "XE_HPC_CORE")
|
||||
list(APPEND XE3_AND_BEFORE_CORE_TYPES "GEN12LP" "XE_HPG_CORE" "XE_HPC_CORE" "XE2_HPG_CORE" "XE3_CORE")
|
||||
|
|
|
@ -31,15 +31,6 @@ foreach(CORE_TYPE ${XE_HPC_AND_BEFORE_CORE_TYPES})
|
|||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(CORE_TYPE ${XE3_AND_BEFORE_CORE_TYPES})
|
||||
if(TESTS_${CORE_TYPE})
|
||||
set(TESTS_XE3_AND_BEFORE 1)
|
||||
endif()
|
||||
if(SUPPORT_${CORE_TYPE})
|
||||
set(SUPPORT_XE3_AND_BEFORE 1)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
foreach(CORE_TYPE ${XEHP_AND_LATER_CORE_TYPES})
|
||||
if(TESTS_${CORE_TYPE})
|
||||
set(TESTS_XEHP_AND_LATER 1)
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "shared/source/command_stream/transfer_direction.h"
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
#include "shared/source/helpers/hw_mapper.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
#include "shared/source/helpers/vec.h"
|
||||
|
@ -240,8 +239,7 @@ struct CommandListCoreFamily : public CommandListImp {
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size,
|
||||
Event *signalEvent);
|
||||
uint64_t size);
|
||||
|
||||
MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyBlitRegion(AlignedAllocationData *srcAllocationData,
|
||||
AlignedAllocationData *dstAllocationData,
|
||||
|
@ -337,8 +335,6 @@ struct CommandListCoreFamily : public CommandListImp {
|
|||
void addFlushRequiredCommand(bool flushOperationRequired, Event *signalEvent, bool copyOperation, bool flushL3InPipeControl);
|
||||
void handlePostSubmissionState();
|
||||
|
||||
MOCKABLE_VIRTUAL void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent);
|
||||
|
||||
void setupFillKernelArguments(size_t baseOffset,
|
||||
size_t patternSize,
|
||||
size_t dstSize,
|
||||
|
@ -371,13 +367,6 @@ struct CommandListCoreFamily : public CommandListImp {
|
|||
}
|
||||
return this->containsStatelessUncachedResource;
|
||||
}
|
||||
|
||||
bool isUsingSystemAllocation(const NEO::AllocationType &allocType) const {
|
||||
return ((allocType == NEO::AllocationType::bufferHostMemory) ||
|
||||
(allocType == NEO::AllocationType::svmCpu) ||
|
||||
(allocType == NEO::AllocationType::externalHostPtr));
|
||||
}
|
||||
|
||||
void postInitComputeSetup();
|
||||
NEO::PreemptionMode obtainKernelPreemptionMode(Kernel *kernel);
|
||||
virtual bool isRelaxedOrderingDispatchAllowed(uint32_t numWaitEvents, bool copyOffload) { return false; }
|
||||
|
@ -418,7 +407,6 @@ struct CommandListCoreFamily : public CommandListImp {
|
|||
bool allowCbWaitEventsNoopDispatch = false;
|
||||
bool copyOperationFenceSupported = false;
|
||||
bool implicitSynchronizedDispatchForCooperativeKernelsAllowed = false;
|
||||
bool useAdditionalBlitProperties = false;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
|
|
|
@ -264,7 +264,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
|||
this->maxLocalSubRegionSize = productHelper.getMaxLocalSubRegionSize(hwInfo);
|
||||
this->l3FlushAfterPostSyncRequired = productHelper.isL3FlushAfterPostSyncRequired(heaplessModeEnabled);
|
||||
this->compactL3FlushEventPacket = L0GfxCoreHelper::useCompactL3FlushEventPacket(hwInfo, this->l3FlushAfterPostSyncRequired);
|
||||
this->useAdditionalBlitProperties = productHelper.useAdditionalBlitProperties();
|
||||
|
||||
if (NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get() != -1) {
|
||||
this->defaultPipelinedThreadArbitrationPolicy = NEO::debugManager.flags.OverrideThreadArbitrationPolicy.get();
|
||||
|
@ -1414,7 +1413,10 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyKernelWithGA(v
|
|||
|
||||
auto dstAllocationType = dstPtrAlloc->getAllocationType();
|
||||
launchParams.isBuiltInKernel = true;
|
||||
launchParams.isDestinationAllocationInSystemMemory = this->isUsingSystemAllocation(dstAllocationType);
|
||||
launchParams.isDestinationAllocationInSystemMemory =
|
||||
(dstAllocationType == NEO::AllocationType::bufferHostMemory) ||
|
||||
(dstAllocationType == NEO::AllocationType::svmCpu) ||
|
||||
(dstAllocationType == NEO::AllocationType::externalHostPtr);
|
||||
|
||||
if constexpr (checkIfAllocationImportedRequired()) {
|
||||
launchParams.isDestinationAllocationImported = this->isAllocationImported(dstPtrAlloc, device->getDriverHandle()->getSvmAllocsManager());
|
||||
|
@ -1428,21 +1430,17 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopyBlit(uintptr_t
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size,
|
||||
Event *signalEvent) {
|
||||
uint64_t size) {
|
||||
dstOffset += ptrDiff<uintptr_t>(dstPtr, dstPtrAlloc->getGpuAddress());
|
||||
srcOffset += ptrDiff<uintptr_t>(srcPtr, srcPtrAlloc->getGpuAddress());
|
||||
|
||||
auto clearColorAllocation = device->getNEODevice()->getDefaultEngine().commandStreamReceiver->getClearColorAllocation();
|
||||
|
||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstPtrAlloc, srcPtrAlloc, {dstOffset, 0, 0}, {srcOffset, 0, 0}, {size, 0, 0}, 0, 0, 0, 0, clearColorAllocation);
|
||||
commandContainer.addToResidencyContainer(dstPtrAlloc);
|
||||
commandContainer.addToResidencyContainer(srcPtrAlloc);
|
||||
commandContainer.addToResidencyContainer(clearColorAllocation);
|
||||
|
||||
if (useAdditionalBlitProperties) {
|
||||
setAdditionalBlitProperties(blitProperties, signalEvent);
|
||||
}
|
||||
|
||||
NEO::BlitPropertiesContainer blitPropertiesContainer{blitProperties};
|
||||
|
||||
NEO::BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(blitProperties, *commandContainer.getCommandStream(), *this->dummyBlitWa.rootDeviceEnvironment);
|
||||
|
@ -1561,7 +1559,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendPageFaultCopy(NEO::Graph
|
|||
if (isCopyOnly(false)) {
|
||||
return appendMemoryCopyBlit(dstAddress, dstAllocation, 0u,
|
||||
srcAddress, srcAllocation, 0u,
|
||||
size, nullptr);
|
||||
size);
|
||||
} else {
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
launchParams.isKernelSplitOperation = rightSize > 0;
|
||||
|
@ -1714,9 +1712,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
|||
|
||||
launchParams.pipeControlSignalling = (signalEvent && singlePipeControlPacket) || getDcFlushRequired(dstAllocationStruct.needsFlush);
|
||||
|
||||
if (!useAdditionalBlitProperties || !isCopyOnlyEnabled) {
|
||||
appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, singlePipeControlPacket, false, isCopyOnlyEnabled);
|
||||
}
|
||||
|
||||
if (isCopyOnlyEnabled) {
|
||||
if (NEO::debugManager.flags.FlushTlbBeforeCopy.get() == 1) {
|
||||
|
@ -1727,7 +1723,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
|||
ret = appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr,
|
||||
dstAllocationStruct.alloc, dstAllocationStruct.offset,
|
||||
srcAllocationStruct.alignedAllocationPtr,
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset, size, signalEvent);
|
||||
srcAllocationStruct.alloc, srcAllocationStruct.offset, size);
|
||||
} else {
|
||||
if (NEO::debugManager.flags.FlushTlbBeforeCopy.get() == 1) {
|
||||
NEO::PipeControlArgs args;
|
||||
|
@ -1788,9 +1784,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendMemoryCopy(void *dstptr,
|
|||
|
||||
appendCopyOperationFence(signalEvent, srcAllocationStruct.alloc, dstAllocationStruct.alloc, isCopyOnlyEnabled);
|
||||
|
||||
if (!useAdditionalBlitProperties || !isCopyOnlyEnabled) {
|
||||
appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, false, singlePipeControlPacket, false, isCopyOnlyEnabled);
|
||||
}
|
||||
|
||||
bool l3flushInPipeControl = !l3FlushAfterPostSyncRequired || isSplitOperation;
|
||||
addFlushRequiredCommand(dstAllocationStruct.needsFlush, signalEvent, isCopyOnlyEnabled, l3flushInPipeControl);
|
||||
|
@ -2481,6 +2475,7 @@ void CommandListCoreFamily<gfxCoreFamily>::appendEventForProfilingCopyCommand(Ev
|
|||
return;
|
||||
}
|
||||
commandContainer.addToResidencyContainer(event->getAllocation(this->device));
|
||||
|
||||
if (beforeWalker) {
|
||||
event->resetKernelCountAndPacketUsedCount();
|
||||
} else {
|
||||
|
|
|
@ -14,8 +14,4 @@ constexpr bool CommandListCoreFamily<gfxCoreFamily>::checkIfAllocationImportedRe
|
|||
return false;
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
void CommandListCoreFamily<gfxCoreFamily>::setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent) {
|
||||
}
|
||||
|
||||
} // namespace L0
|
||||
|
|
|
@ -812,7 +812,7 @@ ze_result_t CommandListCoreFamilyImmediate<gfxCoreFamily>::appendPageFaultCopy(N
|
|||
ret = static_cast<DeviceImp *>(this->device)->bcsSplit.appendSplitCall<gfxCoreFamily, uintptr_t, uintptr_t>(this, dstAddress, srcAddress, size, nullptr, 0u, nullptr, false, relaxedOrdering, direction, [&](uintptr_t dstAddressParam, uintptr_t srcAddressParam, size_t sizeParam, ze_event_handle_t hSignalEventParam) {
|
||||
this->appendMemoryCopyBlit(dstAddressParam, dstAllocation, 0u,
|
||||
srcAddressParam, srcAllocation, 0u,
|
||||
sizeParam, nullptr);
|
||||
sizeParam);
|
||||
return CommandListCoreFamily<gfxCoreFamily>::appendSignalEvent(hSignalEventParam, false);
|
||||
});
|
||||
} else {
|
||||
|
|
|
@ -207,10 +207,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
|
|||
.inOrderIncrementValue = 0,
|
||||
.device = neoDevice,
|
||||
.inOrderExecInfo = nullptr,
|
||||
.isCounterBasedEvent = false,
|
||||
.isTimestampEvent = false,
|
||||
.isHostScopeSignalEvent = false,
|
||||
.isUsingSystemAllocation = false,
|
||||
.isKernelUsingSystemAllocation = false,
|
||||
.dcFlushEnable = this->dcFlushSupport,
|
||||
.interruptEvent = false,
|
||||
.isFlushL3ForExternalAllocationRequired = false,
|
||||
|
|
|
@ -319,7 +319,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
|
|||
|
||||
bool inOrderExecSignalRequired = false;
|
||||
bool inOrderNonWalkerSignalling = false;
|
||||
bool isCounterBasedEvent = false;
|
||||
|
||||
uint64_t inOrderCounterValue = 0;
|
||||
uint64_t inOrderIncrementValue = 0;
|
||||
|
@ -349,7 +348,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
|
|||
inOrderCounterValue = this->inOrderExecInfo->getCounterValue() + getInOrderIncrementValue();
|
||||
inOrderExecInfo = this->inOrderExecInfo.get();
|
||||
if (eventForInOrderExec && eventForInOrderExec->isCounterBased()) {
|
||||
isCounterBasedEvent = true;
|
||||
if (eventForInOrderExec->getInOrderIncrementValue() > 0) {
|
||||
inOrderIncrementGpuAddress = eventForInOrderExec->getInOrderExecInfo()->getBaseDeviceAddress();
|
||||
inOrderIncrementValue = eventForInOrderExec->getInOrderIncrementValue();
|
||||
|
@ -384,10 +382,9 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
|
|||
.inOrderIncrementValue = inOrderIncrementValue,
|
||||
.device = neoDevice,
|
||||
.inOrderExecInfo = inOrderExecInfo,
|
||||
.isCounterBasedEvent = isCounterBasedEvent,
|
||||
.isTimestampEvent = isTimestampEvent,
|
||||
.isHostScopeSignalEvent = isHostSignalScopeEvent,
|
||||
.isUsingSystemAllocation = isKernelUsingSystemAllocation,
|
||||
.isKernelUsingSystemAllocation = isKernelUsingSystemAllocation,
|
||||
.dcFlushEnable = this->dcFlushSupport,
|
||||
.interruptEvent = interruptEvent,
|
||||
.isFlushL3ForExternalAllocationRequired = isFlushL3AfterPostSync && isKernelUsingExternalAllocation,
|
||||
|
|
|
@ -114,7 +114,6 @@ struct WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>
|
|||
using BaseClass::requiresDcFlushForDcMitigation;
|
||||
using BaseClass::requiresQueueUncachedMocs;
|
||||
using BaseClass::scratchAddressPatchingEnabled;
|
||||
using BaseClass::setAdditionalBlitProperties;
|
||||
using BaseClass::setupTimestampEventForMultiTile;
|
||||
using BaseClass::signalAllEventPackets;
|
||||
using BaseClass::stateBaseAddressTracking;
|
||||
|
@ -629,7 +628,6 @@ class MockCommandListCoreFamily : public CommandListCoreFamily<gfxCoreFamily> {
|
|||
using BaseClass::encodeMiFlush;
|
||||
using BaseClass::getDeviceCounterAllocForResidency;
|
||||
using BaseClass::ownedPrivateAllocations;
|
||||
using BaseClass::setAdditionalBlitProperties;
|
||||
using BaseClass::taskCountUpdateFenceRequired;
|
||||
|
||||
ze_result_t executeMemAdvise(ze_device_handle_t hDevice,
|
||||
|
@ -656,7 +654,7 @@ class MockCommandListCoreFamily : public CommandListCoreFamily<gfxCoreFamily> {
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size, Event *signalEvent));
|
||||
uint64_t size));
|
||||
|
||||
ADDMETHOD_VOIDRETURN(allocateOrReuseKernelPrivateMemory,
|
||||
false,
|
||||
|
|
|
@ -82,7 +82,7 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size, Event *signalEvent) override {
|
||||
uint64_t size) override {
|
||||
appendMemoryCopyBlitCalledTimes++;
|
||||
if (failOnFirstCopy && appendMemoryCopyBlitCalledTimes == 1) {
|
||||
return ZE_RESULT_ERROR_UNKNOWN;
|
||||
|
@ -108,7 +108,6 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFam
|
|||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent) override {}
|
||||
ze_result_t appendMemoryCopyKernel2d(AlignedAllocationData *dstAlignedAllocation, AlignedAllocationData *srcAlignedAllocation,
|
||||
Builtin builtin, const ze_copy_region_t *dstRegion,
|
||||
uint32_t dstPitch, size_t dstOffset,
|
||||
|
|
|
@ -683,9 +683,6 @@ HWTEST2_F(AppendMemoryCopyTests, givenCommandListAndHostPointersWhenMemoryCopyCa
|
|||
|
||||
HWTEST2_F(AppendMemoryCopyTests, givenCopyCommandListWhenTimestampPassedToMemoryCopyThenAppendProfilingCalledOnceBeforeAndAfterCommand, MatchAny) {
|
||||
|
||||
if (device->getProductHelper().useAdditionalBlitProperties()) {
|
||||
GTEST_SKIP();
|
||||
}
|
||||
using MI_STORE_REGISTER_MEM = typename FamilyType::MI_STORE_REGISTER_MEM;
|
||||
using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ class MockCommandListForMemFill : public WhiteBox<::L0::CommandListCoreFamily<gf
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size, Event *signalEvent) override {
|
||||
uint64_t size) override {
|
||||
appendMemoryCopyBlitCalledTimes++;
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ HWTEST2_F(AppendMemoryCopyTests, givenCopyOnlyCommandListThenDcFlushIsNotAddedAf
|
|||
NEO::MockGraphicsAllocation mockAllocationDst(0, 1u /*num gmms*/, NEO::AllocationType::internalHostMemory,
|
||||
reinterpret_cast<void *>(dstPtr), 0x1000, 0, sizeof(uint32_t),
|
||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||
commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize, nullptr);
|
||||
commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize);
|
||||
|
||||
auto &commandContainer = commandList->getCmdContainer();
|
||||
GenCmdList genCmdList;
|
||||
|
@ -429,72 +429,5 @@ HWTEST2_F(AppendMemoryCopyTests, givenCopyCommandListWhenNotTiled1DArrayImagePas
|
|||
EXPECT_EQ(cmd->getSourceSurfaceHeight(), arrayLevels);
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
class MockCommandListForAdditionalBlitProperties : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>> {
|
||||
public:
|
||||
using BaseClass = WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>;
|
||||
using BaseClass::setAdditionalBlitProperties;
|
||||
using BaseClass::useAdditionalBlitProperties;
|
||||
};
|
||||
|
||||
HWTEST_F(AppendMemoryCopyTests, givenBlitPropertiesWhenCallingSetAdditionalBlitPropertiesThenSyncPropertiesExtRemainsUnchanged) {
|
||||
NEO::BlitProperties blitProperties{}, blitProperties2{}, blitPropertiesExpected{};
|
||||
EncodePostSyncArgs &postSyncArgs = blitProperties.blitSyncProperties.postSyncArgs;
|
||||
EncodePostSyncArgs &postSyncArgs2 = blitProperties2.blitSyncProperties.postSyncArgs;
|
||||
EncodePostSyncArgs &postSyncArgsExpected = blitPropertiesExpected.blitSyncProperties.postSyncArgs;
|
||||
|
||||
auto commandList = std::make_unique<MockCommandListForAdditionalBlitProperties<FamilyType::gfxCoreFamily>>();
|
||||
EXPECT_FALSE(commandList->useAdditionalBlitProperties);
|
||||
commandList->setAdditionalBlitProperties(blitProperties, nullptr);
|
||||
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);
|
||||
EXPECT_EQ(postSyncArgs2.isTimestampEvent, postSyncArgsExpected.isTimestampEvent);
|
||||
EXPECT_EQ(postSyncArgs2.postSyncImmValue, postSyncArgsExpected.postSyncImmValue);
|
||||
EXPECT_EQ(postSyncArgs2.interruptEvent, postSyncArgsExpected.interruptEvent);
|
||||
EXPECT_EQ(postSyncArgs2.eventAddress, postSyncArgsExpected.eventAddress);
|
||||
EXPECT_EQ(nullptr, postSyncArgs2.inOrderExecInfo);
|
||||
}
|
||||
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
class MockCommandListForAdditionalBlitProperties2 : public WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>> {
|
||||
public:
|
||||
using BaseClass = WhiteBox<::L0::CommandListCoreFamily<gfxCoreFamily>>;
|
||||
using BaseClass::useAdditionalBlitProperties;
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent) override {
|
||||
additionalBlitPropertiesCalled++;
|
||||
BaseClass::setAdditionalBlitProperties(blitProperties, signalEvent);
|
||||
}
|
||||
uint32_t additionalBlitPropertiesCalled = 0;
|
||||
};
|
||||
|
||||
HWTEST_F(AppendMemoryCopyTests, givenCopyOnlyCommandListWithUseAdditionalBlitPropertiesWhenCallingAppendMemoryCopyBlitThenAdditionalBlitPropertiesCalled) {
|
||||
auto commandList = std::make_unique<MockCommandListForAdditionalBlitProperties2<FamilyType::gfxCoreFamily>>();
|
||||
commandList->initialize(device, NEO::EngineGroupType::copy, 0u);
|
||||
uintptr_t srcPtr = 0x5001;
|
||||
uintptr_t dstPtr = 0x7001;
|
||||
uint64_t srcOffset = 0x101;
|
||||
uint64_t dstOffset = 0x201;
|
||||
uint64_t copySize = 0x301;
|
||||
NEO::MockGraphicsAllocation mockAllocationSrc(0, 1u /*num gmms*/, NEO::AllocationType::internalHostMemory,
|
||||
reinterpret_cast<void *>(srcPtr), 0x1000, 0, sizeof(uint32_t),
|
||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||
NEO::MockGraphicsAllocation mockAllocationDst(0, 1u /*num gmms*/, NEO::AllocationType::internalHostMemory,
|
||||
reinterpret_cast<void *>(dstPtr), 0x1000, 0, sizeof(uint32_t),
|
||||
MemoryPool::system4KBPages, MemoryManager::maxOsContextCount);
|
||||
commandList->useAdditionalBlitProperties = false;
|
||||
EXPECT_EQ(0u, commandList->additionalBlitPropertiesCalled);
|
||||
commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize, nullptr);
|
||||
EXPECT_EQ(0u, commandList->additionalBlitPropertiesCalled);
|
||||
|
||||
commandList->useAdditionalBlitProperties = true;
|
||||
commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize, nullptr);
|
||||
EXPECT_EQ(1u, commandList->additionalBlitPropertiesCalled);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
|
|
|
@ -120,7 +120,7 @@ class MockCommandListExtensionHw : public WhiteBox<::L0::CommandListCoreFamily<g
|
|||
uint64_t dstOffset, uintptr_t srcPtr,
|
||||
NEO::GraphicsAllocation *srcPtrAlloc,
|
||||
uint64_t srcOffset,
|
||||
uint64_t size, Event *signalEvent) override {
|
||||
uint64_t size) override {
|
||||
appendMemoryCopyBlitCalledTimes++;
|
||||
if (failOnFirstCopy && appendMemoryCopyBlitCalledTimes == 1) {
|
||||
return ZE_RESULT_ERROR_UNKNOWN;
|
||||
|
@ -128,8 +128,6 @@ class MockCommandListExtensionHw : public WhiteBox<::L0::CommandListCoreFamily<g
|
|||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
void setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent) override {}
|
||||
|
||||
ze_result_t appendMemoryCopyBlitRegion(AlignedAllocationData *srcAllocationData,
|
||||
AlignedAllocationData *dstAllocationData,
|
||||
ze_copy_region_t srcRegion,
|
||||
|
|
|
@ -3436,7 +3436,6 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
|
|||
ASSERT_NE(cmdList.end(), itor);
|
||||
ASSERT_NE(nullptr, genCmdCast<XY_COPY_BLT *>(*itor));
|
||||
|
||||
if (!device->getProductHelper().useAdditionalBlitProperties()) {
|
||||
auto flushDwItor = find<MI_FLUSH_DW *>(++itor, cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), flushDwItor);
|
||||
|
||||
|
@ -3450,8 +3449,8 @@ void BcsSplitInOrderCmdListTests::verifySplitCmds(LinearStream &cmdStream, size_
|
|||
signalSubCopyEvent = genCmdCast<MI_FLUSH_DW *>(*flushDwItor);
|
||||
ASSERT_NE(nullptr, signalSubCopyEvent);
|
||||
}
|
||||
|
||||
itor = ++flushDwItor;
|
||||
}
|
||||
|
||||
auto semaphoreCmds = findAll<MI_SEMAPHORE_WAIT *>(beginItor, itor);
|
||||
EXPECT_EQ(numExpectedSemaphores, semaphoreCmds.size());
|
||||
|
|
|
@ -57,20 +57,16 @@ struct EncodePostSyncArgs {
|
|||
uint64_t inOrderIncrementValue = 0;
|
||||
Device *device = nullptr;
|
||||
NEO::InOrderExecInfo *inOrderExecInfo = nullptr;
|
||||
bool isCounterBasedEvent = false;
|
||||
bool isTimestampEvent = false;
|
||||
bool isHostScopeSignalEvent = false;
|
||||
bool isUsingSystemAllocation = false;
|
||||
bool isKernelUsingSystemAllocation = false;
|
||||
bool dcFlushEnable = false;
|
||||
bool interruptEvent = false;
|
||||
bool isFlushL3ForExternalAllocationRequired = false;
|
||||
bool isFlushL3ForHostUsmRequired = false;
|
||||
|
||||
bool requiresSystemMemoryFence() const {
|
||||
return (isHostScopeSignalEvent && isUsingSystemAllocation && this->device->getProductHelper().isGlobalFenceInPostSyncRequired(this->device->getHardwareInfo()));
|
||||
}
|
||||
bool isValidEvent() const {
|
||||
return (eventAddress != 0) || (isCounterBasedEvent && !isTimestampEvent);
|
||||
return (isHostScopeSignalEvent && isKernelUsingSystemAllocation && this->device->getProductHelper().isGlobalFenceInPostSyncRequired(this->device->getHardwareInfo()));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -42,19 +42,12 @@ bool EncodeDispatchKernel<Family>::singleTileExecImplicitScalingRequired(bool co
|
|||
return cooperativeKernel;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
template <typename CommandType>
|
||||
inline auto &EncodePostSync<Family>::getPostSync(CommandType &cmd, size_t index) {
|
||||
UNRECOVERABLE_IF(index != 0);
|
||||
return cmd.getPostSync();
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
template <typename CommandType>
|
||||
void EncodePostSync<Family>::setupPostSyncForInOrderExec(CommandType &cmd, const EncodePostSyncArgs &args) {
|
||||
using POSTSYNC_DATA = decltype(Family::template getPostSyncType<CommandType>());
|
||||
|
||||
auto &postSync = getPostSync(cmd, 0);
|
||||
auto &postSync = cmd.getPostSync();
|
||||
|
||||
uint64_t gpuVa = args.inOrderExecInfo->getBaseDeviceAddress() + args.inOrderExecInfo->getAllocationOffset();
|
||||
UNRECOVERABLE_IF(!(isAligned<immWriteDestinationAddressAlignment>(gpuVa)));
|
||||
|
|
|
@ -372,7 +372,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
|
|||
|
||||
if (args.postSyncArgs.inOrderExecInfo) {
|
||||
EncodePostSync<Family>::setupPostSyncForInOrderExec(walkerCmd, args.postSyncArgs);
|
||||
} else if (args.postSyncArgs.isValidEvent()) {
|
||||
} else if (args.postSyncArgs.eventAddress) {
|
||||
EncodePostSync<Family>::setupPostSyncForRegularEvent(walkerCmd, args.postSyncArgs);
|
||||
} else {
|
||||
EncodeDispatchKernel<Family>::forceComputeWalkerPostSyncFlushWithWrite(walkerCmd);
|
||||
|
@ -487,7 +487,7 @@ template <typename CommandType>
|
|||
void EncodePostSync<Family>::setupPostSyncForRegularEvent(CommandType &cmd, const EncodePostSyncArgs &args) {
|
||||
using POSTSYNC_DATA = decltype(Family::template getPostSyncType<CommandType>());
|
||||
|
||||
auto &postSync = getPostSync(cmd, 0);
|
||||
auto &postSync = cmd.getPostSync();
|
||||
|
||||
auto operationType = POSTSYNC_DATA::OPERATION_WRITE_IMMEDIATE_DATA;
|
||||
uint64_t gpuVa = args.eventAddress;
|
||||
|
|
|
@ -16,7 +16,6 @@ using Family = NEO::Gen12LpFamily;
|
|||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/helpers/address_patch.h"
|
||||
#include "shared/source/helpers/blit_commands_helper_base.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_from_gen12lp_to_xe3.inl"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/helpers/state_base_address_tgllp_and_later.inl"
|
||||
|
||||
|
@ -333,8 +332,6 @@ bool BlitCommandsHelper<Family>::preBlitCommandWARequired() {
|
|||
template class CommandStreamReceiverHw<Family>;
|
||||
template struct BlitCommandsHelper<Family>;
|
||||
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
|
||||
const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit();
|
||||
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
||||
const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit();
|
||||
|
|
|
@ -234,12 +234,6 @@ if(SUPPORT_XE3_AND_LATER)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(SUPPORT_XE3_AND_BEFORE)
|
||||
list(APPEND NEO_CORE_HELPERS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/blit_commands_helper_from_gen12lp_to_xe3.inl
|
||||
)
|
||||
endif()
|
||||
|
||||
set(NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.h
|
||||
|
|
|
@ -96,8 +96,5 @@ struct BlitCommandsHelper {
|
|||
|
||||
static void encodeWa(LinearStream &cmdStream, const BlitProperties &blitProperties, uint32_t &latestSentBcsWaValue);
|
||||
static size_t getWaCmdsSize(const BlitPropertiesContainer &blitPropertiesContainer);
|
||||
|
||||
template <typename CommandType>
|
||||
static void applyAdditionalBlitProperties(const BlitProperties &blitProperties, CommandType &cmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
};
|
||||
} // namespace NEO
|
||||
|
|
|
@ -209,13 +209,10 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
|
|||
|
||||
appendColorDepth(blitProperties, bltCmd);
|
||||
|
||||
const bool useAdditionalBlitProperties = rootDeviceEnvironment.getHelper<ProductHelper>().useAdditionalBlitProperties();
|
||||
|
||||
for (uint64_t slice = 0; slice < blitProperties.copySize.z; slice++) {
|
||||
for (uint64_t row = 0; row < blitProperties.copySize.y; row++) {
|
||||
uint64_t offset = 0;
|
||||
uint64_t sizeToBlit = blitProperties.copySize.x;
|
||||
bool lastIteration = (slice == blitProperties.copySize.z - 1) && (row == blitProperties.copySize.y - 1);
|
||||
while (sizeToBlit != 0) {
|
||||
if (sizeToBlit > maxWidth) {
|
||||
// dispatch 2D blit: maxBlitWidth x (1 .. maxBlitHeight)
|
||||
|
@ -226,8 +223,6 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
|
|||
width = sizeToBlit;
|
||||
height = 1;
|
||||
}
|
||||
auto blitSize = width * height;
|
||||
auto lastCommand = lastIteration && (sizeToBlit - blitSize == 0);
|
||||
|
||||
bltCmd.setDestinationX2CoordinateRight(static_cast<uint32_t>(width));
|
||||
bltCmd.setDestinationY2CoordinateBottom(static_cast<uint32_t>(height));
|
||||
|
@ -242,9 +237,6 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
|
|||
|
||||
bltCmd.setDestinationBaseAddress(dstAddr);
|
||||
bltCmd.setSourceBaseAddress(srcAddr);
|
||||
if (useAdditionalBlitProperties && lastCommand) {
|
||||
applyAdditionalBlitProperties(blitProperties, bltCmd, rootDeviceEnvironment, lastCommand);
|
||||
}
|
||||
|
||||
appendBlitCommandsForBuffer(blitProperties, bltCmd, rootDeviceEnvironment);
|
||||
|
||||
|
@ -253,6 +245,7 @@ void BlitCommandsHelper<GfxFamily>::dispatchBlitCommandsForBufferPerRow(const Bl
|
|||
|
||||
dispatchPostBlitCommand(linearStream, rootDeviceEnvironment);
|
||||
|
||||
auto blitSize = width * height;
|
||||
sizeToBlit -= blitSize;
|
||||
offset += blitSize;
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
template <typename CommandType>
|
||||
void BlitCommandsHelper<GfxFamily>::applyAdditionalBlitProperties(const BlitProperties &blitProperties,
|
||||
CommandType &cmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last) {
|
||||
}
|
||||
|
||||
} // namespace NEO
|
|
@ -6,7 +6,6 @@
|
|||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_stream/csr_deps.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/aux_translation.h"
|
||||
|
@ -18,7 +17,6 @@
|
|||
|
||||
namespace NEO {
|
||||
struct TimestampPacketDependencies;
|
||||
struct BlitSyncPropertiesExt;
|
||||
class TagNodeBase;
|
||||
class TimestampPacketContainer;
|
||||
class GraphicsAllocation;
|
||||
|
@ -33,13 +31,13 @@ enum class BlitSyncMode {
|
|||
};
|
||||
|
||||
struct BlitSyncProperties {
|
||||
EncodePostSyncArgs postSyncArgs{};
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -271,7 +271,6 @@ class ProductHelper {
|
|||
virtual void setRenderCompressedFlags(HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isCompressionForbidden(const HardwareInfo &hwInfo) const = 0;
|
||||
virtual bool isExposingSubdevicesAllowed() const = 0;
|
||||
virtual bool useAdditionalBlitProperties() const = 0;
|
||||
|
||||
virtual ~ProductHelper() = default;
|
||||
|
||||
|
|
|
@ -1121,9 +1121,4 @@ bool ProductHelperHw<gfxProduct>::isExposingSubdevicesAllowed() const {
|
|||
return true;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
bool ProductHelperHw<gfxProduct>::useAdditionalBlitProperties() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
|
|
@ -209,7 +209,6 @@ class ProductHelperHw : public ProductHelper {
|
|||
void setRenderCompressedFlags(HardwareInfo &hwInfo) const override;
|
||||
bool isCompressionForbidden(const HardwareInfo &hwInfo) const override;
|
||||
bool isExposingSubdevicesAllowed() const override;
|
||||
bool useAdditionalBlitProperties() const override;
|
||||
|
||||
~ProductHelperHw() override = default;
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ using Family = NEO::Xe2HpgCoreFamily;
|
|||
#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/helpers/blit_commands_helper_from_gen12lp_to_xe3.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_pvc_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xe2_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xehp_and_later.inl"
|
||||
|
@ -272,9 +271,6 @@ template void BlitCommandsHelper<Family>::appendColorDepth<typename Family::XY_B
|
|||
template void BlitCommandsHelper<Family>::appendColorDepth<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd);
|
||||
template void BlitCommandsHelper<Family>::appendBlitCommandsForBuffer<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
|
||||
const Family::COMPUTE_WALKER Family::cmdInitGpgpuWalker = Family::COMPUTE_WALKER::sInit();
|
||||
const Family::CFE_STATE Family::cmdInitCfeState = Family::CFE_STATE::sInit();
|
||||
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
||||
|
|
|
@ -14,7 +14,6 @@ using Family = NEO::Xe3CoreFamily;
|
|||
#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/helpers/blit_commands_helper_from_gen12lp_to_xe3.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_pvc_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xe2_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xehp_and_later.inl"
|
||||
|
@ -226,9 +225,6 @@ template void BlitCommandsHelper<Family>::appendColorDepth<typename Family::XY_B
|
|||
template void BlitCommandsHelper<Family>::appendColorDepth<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd);
|
||||
template void BlitCommandsHelper<Family>::appendBlitCommandsForBuffer<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
|
||||
const Family::COMPUTE_WALKER Family::cmdInitGpgpuWalker = Family::COMPUTE_WALKER::sInit();
|
||||
const Family::CFE_STATE Family::cmdInitCfeState = Family::CFE_STATE::sInit();
|
||||
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
||||
|
|
|
@ -16,7 +16,6 @@ using Family = NEO::XeHpcCoreFamily;
|
|||
#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/helpers/blit_commands_helper_from_gen12lp_to_xe3.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_pvc_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/blit_properties.h"
|
||||
|
@ -274,8 +273,6 @@ template class CommandStreamReceiverHw<Family>;
|
|||
template struct BlitCommandsHelper<Family>;
|
||||
template void BlitCommandsHelper<Family>::appendBlitCommandsForBuffer<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
|
||||
const Family::COMPUTE_WALKER Family::cmdInitGpgpuWalker = Family::COMPUTE_WALKER::sInit();
|
||||
const Family::CFE_STATE Family::cmdInitCfeState = Family::CFE_STATE::sInit();
|
||||
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
||||
|
|
|
@ -14,7 +14,6 @@ using Family = NEO::XeHpgCoreFamily;
|
|||
#include "shared/source/command_stream/command_stream_receiver_hw_dg2_and_later.inl"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_heap_addressing.inl"
|
||||
#include "shared/source/command_stream/command_stream_receiver_hw_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_from_gen12lp_to_xe3.inl"
|
||||
#include "shared/source/helpers/blit_commands_helper_xehp_and_later.inl"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/helpers/state_base_address_xehp_and_later.inl"
|
||||
|
@ -163,8 +162,6 @@ template struct BlitCommandsHelper<Family>;
|
|||
template void BlitCommandsHelper<Family>::appendColorDepth<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd);
|
||||
template void BlitCommandsHelper<Family>::appendBlitCommandsForBuffer<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
|
||||
template void BlitCommandsHelper<Family>::applyAdditionalBlitProperties<typename Family::XY_BLOCK_COPY_BLT>(const BlitProperties &blitProperties, typename Family::XY_BLOCK_COPY_BLT &blitCmd, const RootDeviceEnvironment &rootDeviceEnvironment, bool last);
|
||||
|
||||
const Family::COMPUTE_WALKER Family::cmdInitGpgpuWalker = Family::COMPUTE_WALKER::sInit();
|
||||
const Family::CFE_STATE Family::cmdInitCfeState = Family::CFE_STATE::sInit();
|
||||
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
|
||||
|
|
|
@ -27,7 +27,6 @@ struct MockProductHelperHw : NEO::ProductHelperHw<productFamily> {
|
|||
std::vector<uint32_t> getSupportedNumGrfs(const ReleaseHelper *releaseHelper) const override;
|
||||
aub_stream::EngineType getDefaultCopyEngine() const override;
|
||||
bool isBufferPoolAllocatorSupported() const override;
|
||||
bool useAdditionalBlitProperties() const override { return enableAdditionalBlitProperties; }
|
||||
|
||||
bool use128MbEdram = false;
|
||||
bool enableMidThreadPreemption = false;
|
||||
|
@ -37,7 +36,6 @@ struct MockProductHelperHw : NEO::ProductHelperHw<productFamily> {
|
|||
bool isCooperativeEngineSupportedValue = true;
|
||||
bool returnedIsUnlockingLockedPtrNecessary = false;
|
||||
bool isBufferPoolAllocatorSupportedValue = true;
|
||||
bool enableAdditionalBlitProperties = false;
|
||||
uint32_t returnedStepping = 0;
|
||||
uint32_t returnedL1CachePolicy = 0;
|
||||
uint32_t returnedL1CachePolicyIfDebugger = 0;
|
||||
|
|
|
@ -30,7 +30,6 @@ using IsBeforeXeHpgCore = IsBeforeGfxCore<IGFX_XE_HPG_CORE>;
|
|||
using IsAtLeastXeHpcCore = IsAtLeastGfxCore<IGFX_XE_HPC_CORE>;
|
||||
using IsAtMostXeHpcCore = IsAtMostGfxCore<IGFX_XE_HPC_CORE>;
|
||||
using IsBeforeXeHpcCore = IsBeforeGfxCore<IGFX_XE_HPC_CORE>;
|
||||
using IsWithinXeHpcCoreAndXe3Core = IsWithinGfxCore<IGFX_XE_HPC_CORE, IGFX_XE3_CORE>;
|
||||
|
||||
using IsAtLeastXe2HpgCore = IsAtLeastGfxCore<IGFX_XE2_HPG_CORE>;
|
||||
using IsAtMostXe2HpgCore = IsAtMostGfxCore<IGFX_XE2_HPG_CORE>;
|
||||
|
|
|
@ -8,12 +8,10 @@
|
|||
#include "shared/source/command_container/cmdcontainer.h"
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/command_container/encode_surface_state.h"
|
||||
#include "shared/source/helpers/in_order_cmd_helpers.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_timestamp_container.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
using namespace NEO;
|
||||
|
@ -222,7 +220,7 @@ HWTEST_F(CommandEncoderTest, givenEncodePostSyncArgsWhenCallingRequiresSystemMem
|
|||
for (bool kernelUsingSystemAllocation : {true, false}) {
|
||||
args.device = pDevice;
|
||||
args.isHostScopeSignalEvent = hostScopeSignalEvent;
|
||||
args.isUsingSystemAllocation = kernelUsingSystemAllocation;
|
||||
args.isKernelUsingSystemAllocation = kernelUsingSystemAllocation;
|
||||
|
||||
if (hostScopeSignalEvent && kernelUsingSystemAllocation && pDevice->getProductHelper().isGlobalFenceInPostSyncRequired(pDevice->getHardwareInfo())) {
|
||||
EXPECT_TRUE(args.requiresSystemMemoryFence());
|
||||
|
@ -232,21 +230,3 @@ HWTEST_F(CommandEncoderTest, givenEncodePostSyncArgsWhenCallingRequiresSystemMem
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(CommandEncoderTest, givenEncodePostSyncArgsWhenCallingIsRegularEventThenCorrectValuesAreReturned) {
|
||||
EncodePostSyncArgs args{};
|
||||
MockTagAllocator<DeviceAllocNodeType<true>> deviceTagAllocator(0, pDevice->getMemoryManager());
|
||||
auto inOrderExecInfo = InOrderExecInfo::create(deviceTagAllocator.getTag(), deviceTagAllocator.getTag(), *pDevice, 1, false); // setting duplicateStorage = true;
|
||||
for (bool counterBasedEvent : {true, false}) {
|
||||
for (bool timestampEvent : {true, false}) {
|
||||
for (uint64_t eventAddress : {0, 0x1010}) {
|
||||
args.device = pDevice;
|
||||
args.isCounterBasedEvent = counterBasedEvent;
|
||||
args.isTimestampEvent = timestampEvent;
|
||||
args.eventAddress = eventAddress;
|
||||
bool expectedValidEvent = (eventAddress != 0) || (counterBasedEvent && !timestampEvent);
|
||||
EXPECT_EQ(expectedValidEvent, args.isValidEvent());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,10 +54,9 @@ class CommandEncodeStatesFixture : public DeviceFixture {
|
|||
.inOrderIncrementValue = 0,
|
||||
.device = device,
|
||||
.inOrderExecInfo = nullptr,
|
||||
.isCounterBasedEvent = false,
|
||||
.isTimestampEvent = false,
|
||||
.isHostScopeSignalEvent = false,
|
||||
.isUsingSystemAllocation = false,
|
||||
.isKernelUsingSystemAllocation = false,
|
||||
.dcFlushEnable = false,
|
||||
.interruptEvent = false,
|
||||
.isFlushL3ForExternalAllocationRequired = false,
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#include "shared/test/common/fixtures/device_fixture.h"
|
||||
#include "shared/test/common/helpers/debug_manager_state_restore.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/helpers/mock_product_helper_hw.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/mocks/mock_graphics_allocation.h"
|
||||
#include "shared/test/common/mocks/mock_timestamp_container.h"
|
||||
|
@ -711,79 +710,3 @@ HWTEST_F(BlitTests, givenPlatformWhenCallingDispatchPreBlitCommandThenNoneMiFlus
|
|||
blitPropertiesContainer2, false, true, false, false, pDevice->getRootDeviceEnvironment());
|
||||
EXPECT_NE(estimatedSizeWithoutNode, estimatedSizeWithNode);
|
||||
}
|
||||
|
||||
HWTEST2_F(BlitTests, givenPlatformWithBlitSyncPropertiesWithAndWithoutTimestampModeWhenCallingDispatchBlitCommandForBufferThenTheResultsAreTheSame, MatchAny) {
|
||||
uint32_t src[] = {1, 2, 3, 4};
|
||||
uint32_t dst[] = {4, 3, 2, 1};
|
||||
uint32_t clear[] = {5, 6, 7, 8};
|
||||
uint64_t srcGpuAddr = 0x12345;
|
||||
uint64_t dstGpuAddr = 0x54321;
|
||||
uint64_t clearGpuAddr = 0x5678;
|
||||
std::unique_ptr<MockGraphicsAllocation> srcAlloc(new MockGraphicsAllocation(src, srcGpuAddr, sizeof(src)));
|
||||
std::unique_ptr<MockGraphicsAllocation> dstAlloc(new MockGraphicsAllocation(dst, dstGpuAddr, sizeof(dst)));
|
||||
std::unique_ptr<GraphicsAllocation> clearColorAllocation(new MockGraphicsAllocation(clear, clearGpuAddr, sizeof(clear)));
|
||||
|
||||
Vec3<size_t> srcOffsets{1, 0, 0};
|
||||
Vec3<size_t> dstOffsets{1, 0, 0};
|
||||
Vec3<size_t> copySize{(BlitterConstants::maxBlitWidth * BlitterConstants::maxBlitHeight) + 1, 2, 2};
|
||||
|
||||
size_t srcRowPitch = 0;
|
||||
size_t srcSlicePitch = 0;
|
||||
|
||||
size_t dstRowPitch = 0;
|
||||
size_t dstSlicePitch = 0;
|
||||
|
||||
auto blitProperties = NEO::BlitProperties::constructPropertiesForCopy(dstAlloc.get(), srcAlloc.get(),
|
||||
dstOffsets, srcOffsets, copySize, srcRowPitch, srcSlicePitch,
|
||||
dstRowPitch, dstSlicePitch, clearColorAllocation.get());
|
||||
|
||||
uint32_t streamBuffer[400] = {};
|
||||
LinearStream stream(streamBuffer, sizeof(streamBuffer));
|
||||
NEO::BlitCommandsHelper<FamilyType>::dispatchBlitCommandsForBufferPerRow(blitProperties, stream, pDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
// change it into timestamp mode
|
||||
blitProperties.blitSyncProperties.syncMode = NEO::BlitSyncMode::timestamp;
|
||||
|
||||
uint32_t streamBuffer2[400] = {};
|
||||
LinearStream stream2(streamBuffer2, sizeof(streamBuffer2));
|
||||
NEO::BlitCommandsHelper<FamilyType>::dispatchBlitCommandsForBufferPerRow(blitProperties, stream2, pDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
EXPECT_EQ(stream.getUsed(), stream2.getUsed());
|
||||
EXPECT_EQ(0, memcmp(ptrOffset(stream.getCpuBase(), 0), ptrOffset(stream2.getCpuBase(), 0), std::min(stream.getUsed(), stream2.getUsed())));
|
||||
|
||||
// change productHelper to return true
|
||||
pDevice->getRootDeviceEnvironmentRef().productHelper.reset(new MockProductHelperHw<productFamily>);
|
||||
auto *mockProductHelper = static_cast<MockProductHelperHw<productFamily> *>(pDevice->getRootDeviceEnvironmentRef().productHelper.get());
|
||||
mockProductHelper->enableAdditionalBlitProperties = true;
|
||||
|
||||
uint32_t streamBuffer3[400] = {};
|
||||
LinearStream stream3(streamBuffer3, sizeof(streamBuffer2));
|
||||
NEO::BlitCommandsHelper<FamilyType>::dispatchBlitCommandsForBufferPerRow(blitProperties, stream3, pDevice->getRootDeviceEnvironmentRef());
|
||||
|
||||
EXPECT_EQ(stream.getUsed(), stream3.getUsed());
|
||||
EXPECT_EQ(0, memcmp(ptrOffset(stream.getCpuBase(), 0), ptrOffset(stream3.getCpuBase(), 0), std::min(stream.getUsed(), stream3.getUsed())));
|
||||
}
|
||||
|
||||
HWTEST_F(BlitTests, givenBlitPropertieswithImageOperationWhenCallingEstimateBlitCommandSizeThenBlockCopySizeIsReturned) {
|
||||
Vec3<size_t> copySize{BlitterConstants::maxBlitWidth - 1, 1, 1};
|
||||
NEO::CsrDependencies csrDependencies{};
|
||||
|
||||
size_t totalSize = NEO::BlitCommandsHelper<FamilyType>::estimateBlitCommandSize(copySize, csrDependencies, false, false, true, pDevice->getRootDeviceEnvironmentRef(), false, false);
|
||||
|
||||
size_t expectedSize = sizeof(typename FamilyType::XY_BLOCK_COPY_BLT);
|
||||
expectedSize += NEO::BlitCommandsHelper<FamilyType>::estimatePostBlitCommandSize();
|
||||
expectedSize += NEO::BlitCommandsHelper<FamilyType>::estimatePreBlitCommandSize();
|
||||
EXPECT_EQ(expectedSize, totalSize);
|
||||
}
|
||||
|
||||
using IsWithinGen12LPAndXe3Core = IsWithinGfxCore<IGFX_GEN12LP_CORE, IGFX_XE3_CORE>;
|
||||
HWTEST2_F(BlitTests, givenXyCopyBltCommandWhenApplyBlitPropertiesIsCalledThenNothingChanged, IsWithinGen12LPAndXe3Core) {
|
||||
using XY_COPY_BLT = typename FamilyType::XY_COPY_BLT;
|
||||
auto bltCmd = FamilyType::cmdInitXyCopyBlt;
|
||||
auto bltCmdBefore = bltCmd;
|
||||
BlitProperties properties = {};
|
||||
NEO::BlitCommandsHelper<FamilyType>::applyAdditionalBlitProperties(properties, bltCmd, pDevice->getRootDeviceEnvironment(), false);
|
||||
EXPECT_EQ(memcmp(&bltCmd, &bltCmdBefore, sizeof(XY_COPY_BLT)), 0);
|
||||
NEO::BlitCommandsHelper<FamilyType>::applyAdditionalBlitProperties(properties, bltCmd, pDevice->getRootDeviceEnvironment(), true);
|
||||
EXPECT_EQ(memcmp(&bltCmd, &bltCmdBefore, sizeof(XY_COPY_BLT)), 0);
|
||||
}
|
||||
|
|
|
@ -1176,7 +1176,3 @@ HWTEST_F(ProductHelperTest, givenProductHelperWhenIsExposingSubdevicesAllowedThe
|
|||
HWTEST_F(ProductHelperTest, givenProductHelperWhenGettingIsPrimaryContextsAggregationSupportedThenReturnCorrectValue) {
|
||||
EXPECT_FALSE(productHelper->isPrimaryContextsAggregationSupported());
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperWhenCallingUseAdditionalBlitPropertiesThenFalseReturned) {
|
||||
EXPECT_FALSE(productHelper->useAdditionalBlitProperties());
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ XE2_HPG_CORETEST_F(EncodeKernelXe2HpgCoreTest, givenDefaultSettingForFenceWhenKe
|
|||
dispatchInterface->getCrossThreadDataSizeResult = 0;
|
||||
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
||||
|
@ -425,7 +425,7 @@ XE2_HPG_CORETEST_F(EncodeKernelXe2HpgCoreTest, givenDefaultSettingForFenceWhenKe
|
|||
dispatchInterface->getCrossThreadDataSizeResult = 0;
|
||||
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isHostScopeSignalEvent = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
|
|
@ -314,7 +314,7 @@ XE3_CORETEST_F(EncodeKernelXe3CoreTest, givenDefaultSettingForFenceWhenKernelUse
|
|||
dispatchInterface->getCrossThreadDataSizeResult = 0;
|
||||
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
||||
|
@ -366,7 +366,7 @@ XE3_CORETEST_F(EncodeKernelXe3CoreTest, givenDefaultSettingForFenceWhenKernelUse
|
|||
dispatchInterface->getCrossThreadDataSizeResult = 0;
|
||||
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isHostScopeSignalEvent = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
|
|
@ -374,7 +374,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern
|
|||
|
||||
bool requiresUncachedMocs = false;
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, requiresUncachedMocs);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
||||
|
@ -445,7 +445,7 @@ XE_HPC_CORETEST_F(EncodeKernelXeHpcCoreTest, givenDefaultSettingForFenceWhenKern
|
|||
dispatchInterface->getCrossThreadDataSizeResult = 0;
|
||||
|
||||
EncodeDispatchKernelArgs dispatchArgs = createDefaultDispatchKernelArgs(pDevice, dispatchInterface.get(), dims, false);
|
||||
dispatchArgs.postSyncArgs.isUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isKernelUsingSystemAllocation = true;
|
||||
dispatchArgs.postSyncArgs.isHostScopeSignalEvent = true;
|
||||
|
||||
EncodeDispatchKernel<FamilyType>::template encode<DefaultWalkerType>(*cmdContainer.get(), dispatchArgs);
|
||||
|
|
Loading…
Reference in New Issue