diff --git a/cmake/fill_core_types.cmake b/cmake/fill_core_types.cmake index 5cb298ee03..d2a87c7e66 100644 --- a/cmake/fill_core_types.cmake +++ b/cmake/fill_core_types.cmake @@ -17,3 +17,4 @@ 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") diff --git a/cmake/setup_platform_flags.cmake b/cmake/setup_platform_flags.cmake index 66a75ab585..24ecc57e97 100644 --- a/cmake/setup_platform_flags.cmake +++ b/cmake/setup_platform_flags.cmake @@ -31,6 +31,15 @@ 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) diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.h b/level_zero/core/source/cmdlist/cmdlist_hw.h index 410ff37dcd..48ad18fe87 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.h +++ b/level_zero/core/source/cmdlist/cmdlist_hw.h @@ -8,6 +8,7 @@ #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" @@ -239,7 +240,8 @@ struct CommandListCoreFamily : public CommandListImp { uint64_t dstOffset, uintptr_t srcPtr, NEO::GraphicsAllocation *srcPtrAlloc, uint64_t srcOffset, - uint64_t size); + uint64_t size, + Event *signalEvent); MOCKABLE_VIRTUAL ze_result_t appendMemoryCopyBlitRegion(AlignedAllocationData *srcAllocationData, AlignedAllocationData *dstAllocationData, @@ -335,6 +337,8 @@ 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, @@ -367,6 +371,13 @@ 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; } @@ -407,6 +418,7 @@ struct CommandListCoreFamily : public CommandListImp { bool allowCbWaitEventsNoopDispatch = false; bool copyOperationFenceSupported = false; bool implicitSynchronizedDispatchForCooperativeKernelsAllowed = false; + bool useAdditionalBlitProperties = false; }; template diff --git a/level_zero/core/source/cmdlist/cmdlist_hw.inl b/level_zero/core/source/cmdlist/cmdlist_hw.inl index 1a094d9177..7c4641f132 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw.inl @@ -264,6 +264,7 @@ ze_result_t CommandListCoreFamily::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(); @@ -1413,10 +1414,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyKernelWithGA(v auto dstAllocationType = dstPtrAlloc->getAllocationType(); launchParams.isBuiltInKernel = true; - launchParams.isDestinationAllocationInSystemMemory = - (dstAllocationType == NEO::AllocationType::bufferHostMemory) || - (dstAllocationType == NEO::AllocationType::svmCpu) || - (dstAllocationType == NEO::AllocationType::externalHostPtr); + launchParams.isDestinationAllocationInSystemMemory = this->isUsingSystemAllocation(dstAllocationType); if constexpr (checkIfAllocationImportedRequired()) { launchParams.isDestinationAllocationImported = this->isAllocationImported(dstPtrAlloc, device->getDriverHandle()->getSvmAllocsManager()); @@ -1430,17 +1428,21 @@ ze_result_t CommandListCoreFamily::appendMemoryCopyBlit(uintptr_t uint64_t dstOffset, uintptr_t srcPtr, NEO::GraphicsAllocation *srcPtrAlloc, uint64_t srcOffset, - uint64_t size) { + uint64_t size, + Event *signalEvent) { dstOffset += ptrDiff(dstPtr, dstPtrAlloc->getGpuAddress()); srcOffset += ptrDiff(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::dispatchBlitCommandsForBufferPerRow(blitProperties, *commandContainer.getCommandStream(), *this->dummyBlitWa.rootDeviceEnvironment); @@ -1559,7 +1561,7 @@ ze_result_t CommandListCoreFamily::appendPageFaultCopy(NEO::Graph if (isCopyOnly(false)) { return appendMemoryCopyBlit(dstAddress, dstAllocation, 0u, srcAddress, srcAllocation, 0u, - size); + size, nullptr); } else { CmdListKernelLaunchParams launchParams = {}; launchParams.isKernelSplitOperation = rightSize > 0; @@ -1712,7 +1714,9 @@ ze_result_t CommandListCoreFamily::appendMemoryCopy(void *dstptr, launchParams.pipeControlSignalling = (signalEvent && singlePipeControlPacket) || getDcFlushRequired(dstAllocationStruct.needsFlush); - appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, singlePipeControlPacket, false, isCopyOnlyEnabled); + if (!useAdditionalBlitProperties || !isCopyOnlyEnabled) { + appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, true, singlePipeControlPacket, false, isCopyOnlyEnabled); + } if (isCopyOnlyEnabled) { if (NEO::debugManager.flags.FlushTlbBeforeCopy.get() == 1) { @@ -1723,7 +1727,7 @@ ze_result_t CommandListCoreFamily::appendMemoryCopy(void *dstptr, ret = appendMemoryCopyBlit(dstAllocationStruct.alignedAllocationPtr, dstAllocationStruct.alloc, dstAllocationStruct.offset, srcAllocationStruct.alignedAllocationPtr, - srcAllocationStruct.alloc, srcAllocationStruct.offset, size); + srcAllocationStruct.alloc, srcAllocationStruct.offset, size, signalEvent); } else { if (NEO::debugManager.flags.FlushTlbBeforeCopy.get() == 1) { NEO::PipeControlArgs args; @@ -1784,7 +1788,9 @@ ze_result_t CommandListCoreFamily::appendMemoryCopy(void *dstptr, appendCopyOperationFence(signalEvent, srcAllocationStruct.alloc, dstAllocationStruct.alloc, isCopyOnlyEnabled); - appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, false, singlePipeControlPacket, false, isCopyOnlyEnabled); + if (!useAdditionalBlitProperties || !isCopyOnlyEnabled) { + appendEventForProfilingAllWalkers(signalEvent, nullptr, nullptr, false, singlePipeControlPacket, false, isCopyOnlyEnabled); + } bool l3flushInPipeControl = !l3FlushAfterPostSyncRequired || isSplitOperation; addFlushRequiredCommand(dstAllocationStruct.needsFlush, signalEvent, isCopyOnlyEnabled, l3flushInPipeControl); @@ -2475,7 +2481,6 @@ void CommandListCoreFamily::appendEventForProfilingCopyCommand(Ev return; } commandContainer.addToResidencyContainer(event->getAllocation(this->device)); - if (beforeWalker) { event->resetKernelCountAndPacketUsedCount(); } else { diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_gen12lp_to_xe3.inl b/level_zero/core/source/cmdlist/cmdlist_hw_gen12lp_to_xe3.inl index f3723c04ad..6f4a89be46 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_gen12lp_to_xe3.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_gen12lp_to_xe3.inl @@ -14,4 +14,8 @@ constexpr bool CommandListCoreFamily::checkIfAllocationImportedRe return false; } +template +void CommandListCoreFamily::setAdditionalBlitProperties(NEO::BlitProperties &blitProperties, Event *signalEvent) { +} + } // namespace L0 diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl index 00f5b52609..51f278ce5a 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl @@ -812,7 +812,7 @@ ze_result_t CommandListCoreFamilyImmediate::appendPageFaultCopy(N ret = static_cast(this->device)->bcsSplit.appendSplitCall(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); + sizeParam, nullptr); return CommandListCoreFamily::appendSignalEvent(hSignalEventParam, false); }); } else { diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl b/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl index 4203f3c152..31bb1f0448 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl @@ -207,6 +207,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K .inOrderIncrementValue = 0, .device = neoDevice, .inOrderExecInfo = nullptr, + .isCounterBasedEvent = false, .isTimestampEvent = false, .isHostScopeSignalEvent = false, .isUsingSystemAllocation = false, diff --git a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl index 1c2f4d46e7..3388cefb67 100644 --- a/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl +++ b/level_zero/core/source/cmdlist/cmdlist_hw_xehp_and_later.inl @@ -319,6 +319,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K bool inOrderExecSignalRequired = false; bool inOrderNonWalkerSignalling = false; + bool isCounterBasedEvent = false; uint64_t inOrderCounterValue = 0; uint64_t inOrderIncrementValue = 0; @@ -348,6 +349,7 @@ ze_result_t CommandListCoreFamily::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(); @@ -382,6 +384,7 @@ ze_result_t CommandListCoreFamily::appendLaunchKernelWithParams(K .inOrderIncrementValue = inOrderIncrementValue, .device = neoDevice, .inOrderExecInfo = inOrderExecInfo, + .isCounterBasedEvent = isCounterBasedEvent, .isTimestampEvent = isTimestampEvent, .isHostScopeSignalEvent = isHostSignalScopeEvent, .isUsingSystemAllocation = isKernelUsingSystemAllocation, diff --git a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h index 446097c647..8d4c292919 100644 --- a/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h +++ b/level_zero/core/test/unit_tests/mocks/mock_cmdlist.h @@ -114,6 +114,7 @@ struct WhiteBox<::L0::CommandListCoreFamily> using BaseClass::requiresDcFlushForDcMitigation; using BaseClass::requiresQueueUncachedMocs; using BaseClass::scratchAddressPatchingEnabled; + using BaseClass::setAdditionalBlitProperties; using BaseClass::setupTimestampEventForMultiTile; using BaseClass::signalAllEventPackets; using BaseClass::stateBaseAddressTracking; @@ -628,6 +629,7 @@ class MockCommandListCoreFamily : public CommandListCoreFamily { using BaseClass::encodeMiFlush; using BaseClass::getDeviceCounterAllocForResidency; using BaseClass::ownedPrivateAllocations; + using BaseClass::setAdditionalBlitProperties; using BaseClass::taskCountUpdateFenceRequired; ze_result_t executeMemAdvise(ze_device_handle_t hDevice, @@ -654,7 +656,7 @@ class MockCommandListCoreFamily : public CommandListCoreFamily { uint64_t dstOffset, uintptr_t srcPtr, NEO::GraphicsAllocation *srcPtrAlloc, uint64_t srcOffset, - uint64_t size)); + uint64_t size, Event *signalEvent)); ADDMETHOD_VOIDRETURN(allocateOrReuseKernelPrivateMemory, false, diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp index 55c9236a3a..f887c42db1 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_2.cpp @@ -82,7 +82,7 @@ class MockCommandListHw : public WhiteBox<::L0::CommandListCoreFamilygetProductHelper().useAdditionalBlitProperties()) { + GTEST_SKIP(); + } using MI_STORE_REGISTER_MEM = typename FamilyType::MI_STORE_REGISTER_MEM; using MI_FLUSH_DW = typename FamilyType::MI_FLUSH_DW; diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_blit.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_blit.cpp index 5f1f93db95..6e7600be52 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_blit.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_blit.cpp @@ -42,7 +42,7 @@ class MockCommandListForMemFill : public WhiteBox<::L0::CommandListCoreFamily(dstPtr), 0x1000, 0, sizeof(uint32_t), MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); - commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize); + commandList->appendMemoryCopyBlit(ptrOffset(dstPtr, dstOffset), &mockAllocationDst, 0, ptrOffset(srcPtr, srcOffset), &mockAllocationSrc, 0, copySize, nullptr); auto &commandContainer = commandList->getCmdContainer(); GenCmdList genCmdList; @@ -429,5 +429,72 @@ HWTEST2_F(AppendMemoryCopyTests, givenCopyCommandListWhenNotTiled1DArrayImagePas EXPECT_EQ(cmd->getSourceSurfaceHeight(), arrayLevels); } +template +class MockCommandListForAdditionalBlitProperties : public WhiteBox<::L0::CommandListCoreFamily> { + public: + using BaseClass = WhiteBox<::L0::CommandListCoreFamily>; + 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>(); + 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 +class MockCommandListForAdditionalBlitProperties2 : public WhiteBox<::L0::CommandListCoreFamily> { + public: + using BaseClass = WhiteBox<::L0::CommandListCoreFamily>; + 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>(); + 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(srcPtr), 0x1000, 0, sizeof(uint32_t), + MemoryPool::system4KBPages, MemoryManager::maxOsContextCount); + NEO::MockGraphicsAllocation mockAllocationDst(0, 1u /*num gmms*/, NEO::AllocationType::internalHostMemory, + reinterpret_cast(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 diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_memory_extension.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_memory_extension.cpp index 7474613d75..5d5402e923 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_memory_extension.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_cmdlist_memory_extension.cpp @@ -120,7 +120,7 @@ class MockCommandListExtensionHw : public WhiteBox<::L0::CommandListCoreFamily(*itor)); - auto flushDwItor = find(++itor, cmdList.end()); - ASSERT_NE(cmdList.end(), flushDwItor); - - auto signalSubCopyEvent = genCmdCast(*flushDwItor); - ASSERT_NE(nullptr, signalSubCopyEvent); - - while (signalSubCopyEvent->getDestinationAddress() != signalSubCopyEventGpuVa) { - flushDwItor = find(++flushDwItor, cmdList.end()); + if (!device->getProductHelper().useAdditionalBlitProperties()) { + auto flushDwItor = find(++itor, cmdList.end()); ASSERT_NE(cmdList.end(), flushDwItor); - signalSubCopyEvent = genCmdCast(*flushDwItor); + auto signalSubCopyEvent = genCmdCast(*flushDwItor); ASSERT_NE(nullptr, signalSubCopyEvent); - } - itor = ++flushDwItor; + while (signalSubCopyEvent->getDestinationAddress() != signalSubCopyEventGpuVa) { + flushDwItor = find(++flushDwItor, cmdList.end()); + ASSERT_NE(cmdList.end(), flushDwItor); + + signalSubCopyEvent = genCmdCast(*flushDwItor); + ASSERT_NE(nullptr, signalSubCopyEvent); + } + itor = ++flushDwItor; + } auto semaphoreCmds = findAll(beginItor, itor); EXPECT_EQ(numExpectedSemaphores, semaphoreCmds.size()); diff --git a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp index c82ad5362f..30a2862b12 100644 --- a/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp +++ b/opencl/test/unit_test/command_stream/command_stream_receiver_hw_2_tests.cpp @@ -2259,4 +2259,4 @@ HWTEST_F(BcsTests, given1DNotTiledArrayImageWhenConstructPropertiesThenImageNotT builtinOpParams); EXPECT_EQ(blitProperties.copySize.y, builtinOpParams.size.y); EXPECT_EQ(blitProperties.copySize.z, builtinOpParams.size.z); -} \ No newline at end of file +} diff --git a/shared/source/helpers/blit_properties.cpp b/shared/source/helpers/blit_properties.cpp index bbdb82ae12..521ca077aa 100644 --- a/shared/source/helpers/blit_properties.cpp +++ b/shared/source/helpers/blit_properties.cpp @@ -220,4 +220,4 @@ void BlitProperties::transform1DArrayTo2DArrayIfNeeded() { this->copySize.y = 1; } } -} // namespace NEO \ No newline at end of file +} // namespace NEO diff --git a/shared/test/common/test_macros/header/common_matchers.h b/shared/test/common/test_macros/header/common_matchers.h index 9b884c915f..5e86cb1451 100644 --- a/shared/test/common/test_macros/header/common_matchers.h +++ b/shared/test/common/test_macros/header/common_matchers.h @@ -30,6 +30,7 @@ using IsBeforeXeHpgCore = IsBeforeGfxCore; using IsAtLeastXeHpcCore = IsAtLeastGfxCore; using IsAtMostXeHpcCore = IsAtMostGfxCore; using IsBeforeXeHpcCore = IsBeforeGfxCore; +using IsWithinXeHpcCoreAndXe3Core = IsWithinGfxCore; using IsAtLeastXe2HpgCore = IsAtLeastGfxCore; using IsAtMostXe2HpgCore = IsAtMostGfxCore;