diff --git a/opencl/source/command_queue/command_queue.cpp b/opencl/source/command_queue/command_queue.cpp index 5893906a6c..4dfdc5ecb3 100644 --- a/opencl/source/command_queue/command_queue.cpp +++ b/opencl/source/command_queue/command_queue.cpp @@ -302,8 +302,12 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec case TransferDirection::hostToHost: case TransferDirection::hostToLocal: case TransferDirection::localToHost: { - preferBcs = true; - + auto isWriteToImageFromBuffer = args.dstResource.image && args.dstResource.image->isImageFromBuffer(); + auto &productHelper = device->getProductHelper(); + preferBcs = device->getRootDeviceEnvironment().isWddmOnLinux() || productHelper.blitEnqueuePreferred(isWriteToImageFromBuffer); + if (debugManager.flags.EnableBlitterForEnqueueOperations.get() == 1) { + preferBcs = true; + } auto preferredBCSType = true; if (debugManager.flags.AssignBCSAtEnqueue.get() != -1) { @@ -322,6 +326,11 @@ CommandStreamReceiver &CommandQueue::selectCsrForBuiltinOperation(const CsrSelec device->getSelectorCopyEngine(), false); } } + + if (!preferBcs && isOOQEnabled() && getGpgpuCommandStreamReceiver().isBusy()) { + // If CCS is preferred but it's OOQ and compute engine is busy, select BCS instead + preferBcs = true; + } break; } default: @@ -1093,8 +1102,7 @@ bool CommandQueue::queueDependenciesClearRequired() const { } bool CommandQueue::blitEnqueueAllowed(const CsrSelectionArgs &args) const { - auto isWriteToImageFromBuffer = args.dstResource.image && args.dstResource.image->isImageFromBuffer(); - bool blitEnqueueAllowed = ((device->getRootDeviceEnvironment().isWddmOnLinux() || device->getRootDeviceEnvironment().getProductHelper().blitEnqueueAllowed(isWriteToImageFromBuffer)) && getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled()) || this->isCopyOnly; + bool blitEnqueueAllowed = getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() || this->isCopyOnly; if (debugManager.flags.EnableBlitterForEnqueueOperations.get() != -1) { blitEnqueueAllowed = debugManager.flags.EnableBlitterForEnqueueOperations.get(); } @@ -1611,6 +1619,13 @@ bool CommandQueue::isValidForStagingBufferCopy(Device &device, void *dstPtr, con // Direct transfer from mapped allocation is faster than staging buffer return false; } + auto rootDeviceIndex = device.getRootDeviceIndex(); + auto isLocalMem = device.getMemoryManager()->isLocalMemorySupported(rootDeviceIndex); + if (isOOQEnabled() && getGpgpuCommandStreamReceiver().isBusy() && !isLocalMem) { + // It's not beneficial to make copy through staging buffers if it's OOQ, + // compute engine is busy and device is iGPU. + return false; + } CsrSelectionArgs csrSelectionArgs{CL_COMMAND_SVM_MEMCPY, nullptr}; csrSelectionArgs.direction = TransferDirection::hostToLocal; auto csr = &selectCsrForBuiltinOperation(csrSelectionArgs); diff --git a/opencl/test/unit_test/aub_tests/fixtures/image_aub_fixture.h b/opencl/test/unit_test/aub_tests/fixtures/image_aub_fixture.h index 2a108b29a1..29af60fc0b 100644 --- a/opencl/test/unit_test/aub_tests/fixtures/image_aub_fixture.h +++ b/opencl/test/unit_test/aub_tests/fixtures/image_aub_fixture.h @@ -33,7 +33,7 @@ struct ImageAubFixture : public AUBCommandStreamFixture { MockExecutionEnvironment mockExecutionEnvironment{}; auto &productHelper = mockExecutionEnvironment.rootDeviceEnvironments[rootDeviceIndex]->getHelper(); - if (!productHelper.isBlitterForImagesSupported() || !productHelper.blitEnqueueAllowed(false)) { + if (!productHelper.isBlitterForImagesSupported() || !productHelper.blitEnqueuePreferred(false)) { GTEST_SKIP(); } diff --git a/opencl/test/unit_test/command_queue/command_queue_tests.cpp b/opencl/test/unit_test/command_queue/command_queue_tests.cpp index d31e7aba32..502a007369 100644 --- a/opencl/test/unit_test/command_queue/command_queue_tests.cpp +++ b/opencl/test/unit_test/command_queue/command_queue_tests.cpp @@ -1658,8 +1658,7 @@ TEST(CommandQueue, givenCopyOnlyQueueWhenCallingBlitEnqueueAllowedThenReturnTrue CsrSelectionArgs selectionArgs{CL_COMMAND_READ_BUFFER, &multiAlloc, &multiAlloc, 0u, nullptr}; queue.isCopyOnly = false; - EXPECT_EQ(queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() && context.getDevice(0)->getProductHelper().blitEnqueueAllowed(false), - queue.blitEnqueueAllowed(selectionArgs)); + EXPECT_EQ(queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled(), queue.blitEnqueueAllowed(selectionArgs)); queue.isCopyOnly = true; EXPECT_TRUE(queue.blitEnqueueAllowed(selectionArgs)); @@ -1685,7 +1684,7 @@ TEST(CommandQueue, givenSimpleClCommandWhenCallingBlitEnqueueAllowedThenReturnCo CL_COMMAND_SVM_MEMCPY}) { CsrSelectionArgs args{cmdType, &multiAlloc, &multiAlloc, 0u, nullptr}; - bool expectedValue = queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() && context.getDevice(0)->getProductHelper().blitEnqueueAllowed(false); + bool expectedValue = queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled(); if (cmdType == CL_COMMAND_COPY_IMAGE_TO_BUFFER) { expectedValue = false; } @@ -1765,7 +1764,7 @@ TEST(CommandQueue, givenWriteToImageFromBufferWhenCallingBlitEnqueueAllowedThenR CsrSelectionArgs args{CL_COMMAND_WRITE_IMAGE, nullptr, &dstImage, 0u, region, nullptr, origin}; - bool expectedValue = queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() && context.getDevice(0)->getProductHelper().blitEnqueueAllowed(true) && context.getDevice(0)->getProductHelper().isBlitterForImagesSupported(); + bool expectedValue = queue.getGpgpuCommandStreamReceiver().peekTimestampPacketWriteEnabled() && context.getDevice(0)->getProductHelper().isBlitterForImagesSupported(); EXPECT_EQ(queue.blitEnqueueAllowed(args), expectedValue); } @@ -3220,3 +3219,106 @@ TEST_F(MultiTileFixture, givenNotDefaultContextWithRootDeviceAndTileIdMaskWhenQu EXPECT_EQ(rootCsr->isMultiOsContextCapable(), queue.getGpgpuCommandStreamReceiver().isMultiOsContextCapable()); EXPECT_EQ(rootCsr, queue.gpgpuEngine->commandStreamReceiver); } + +HWTEST_F(CsrSelectionCommandQueueWithBlitterTests, givenBlitterAndBcsEnqueueNotPreferredThenOverrideIfConditionsMet) { + auto ccsCsr = static_cast *>(&queue->getGpgpuCommandStreamReceiver()); + auto bcsCsr = queue->getBcsCommandStreamReceiver(*queue->bcsQueueEngineType); + + MockGraphicsAllocation srcGraphicsAllocation{}; + MockGraphicsAllocation dstGraphicsAllocation{}; + MockBuffer srcMemObj{srcGraphicsAllocation}; + MockBuffer dstMemObj{dstGraphicsAllocation}; + CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &srcMemObj, &dstMemObj, 0u, nullptr}; + args.direction = TransferDirection::hostToLocal; + cl_command_queue_properties queueProperties[5] = {}; + + struct { + bool isOOQ; + bool isIdle; + CommandStreamReceiver *csr; + } queueState[4]{ + {false, false, ccsCsr}, // IOQ -> use CCS + {false, true, ccsCsr}, // IOQ -> use CCS + {true, false, bcsCsr}, // OOQ & CCS busy -> BCS + {true, true, ccsCsr} // OOQ & CCS idle -> CCS + }; + + for (auto &state : queueState) { + auto queue = std::make_unique(context.get(), clDevice.get(), queueProperties, false); + if (state.isOOQ) { + queue->setOoqEnabled(); + } + + *ccsCsr->tagAddress = 0u; + ccsCsr->taskCount = 1u; + if (state.isIdle) { + ccsCsr->taskCount = 0u; + } + + if (device->getProductHelper().blitEnqueuePreferred(false)) { + // if BCS is preferred, it will be always selected + EXPECT_EQ(bcsCsr, &queue->selectCsrForBuiltinOperation(args)); + } else { + EXPECT_EQ(state.csr, &queue->selectCsrForBuiltinOperation(args)); + } + } +} + +HWTEST_F(CsrSelectionCommandQueueWithBlitterTests, givenDebugFlagSetThenBcsAlwaysPreferred) { + DebugManagerStateRestore restore{}; + debugManager.flags.EnableBlitterForEnqueueOperations.set(1); + + MockGraphicsAllocation srcGraphicsAllocation{}; + MockGraphicsAllocation dstGraphicsAllocation{}; + MockBuffer srcMemObj{srcGraphicsAllocation}; + MockBuffer dstMemObj{dstGraphicsAllocation}; + CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &srcMemObj, &dstMemObj, 0u, nullptr}; + args.direction = TransferDirection::hostToLocal; + + cl_command_queue_properties queueProperties[5] = {}; + auto queue = std::make_unique(context.get(), clDevice.get(), queueProperties, false); + + auto bcsCsr = queue->getBcsCommandStreamReceiver(*queue->bcsQueueEngineType); + EXPECT_EQ(bcsCsr, &queue->selectCsrForBuiltinOperation(args)); +} + +HWTEST_F(CsrSelectionCommandQueueWithBlitterTests, givenWddmOnLinuxThenBcsAlwaysPreferred) { + MockGraphicsAllocation srcGraphicsAllocation{}; + MockGraphicsAllocation dstGraphicsAllocation{}; + MockBuffer srcMemObj{srcGraphicsAllocation}; + MockBuffer dstMemObj{dstGraphicsAllocation}; + CsrSelectionArgs args{CL_COMMAND_SVM_MEMCPY, &srcMemObj, &dstMemObj, 0u, nullptr}; + + cl_command_queue_properties queueProperties[5] = {}; + auto queue = std::make_unique(context.get(), clDevice.get(), queueProperties, false); + + reinterpret_cast(&device->getRootDeviceEnvironmentRef())->isWddmOnLinuxEnable = true; + + auto bcsCsr = queue->getBcsCommandStreamReceiver(*queue->bcsQueueEngineType); + EXPECT_EQ(bcsCsr, &queue->selectCsrForBuiltinOperation(args)); +} + +HWTEST_F(CsrSelectionCommandQueueWithBlitterTests, givenImageFromBufferThenBcsAlwaysPreferred) { + DebugManagerStateRestore restore{}; + debugManager.flags.EnableBlitterForEnqueueImageOperations.set(1); + + auto buffer = std::unique_ptr(BufferHelper<>::create(context.get())); + size_t origin[3] = {0, 0, 0}; + size_t region[3] = {1, 1, 1}; + MockImageBase dstImage{}; + dstImage.associatedMemObject = buffer.get(); + + cl_command_queue_properties queueProperties[5] = {}; + auto queue = std::make_unique(context.get(), clDevice.get(), queueProperties, false); + + CsrSelectionArgs args{CL_COMMAND_WRITE_IMAGE, nullptr, &dstImage, 0u, region, nullptr, origin}; + EXPECT_TRUE(args.dstResource.image && args.dstResource.image->isImageFromBuffer()); + + auto ccsCsr = static_cast *>(&queue->getGpgpuCommandStreamReceiver()); + auto bcsCsr = queue->getBcsCommandStreamReceiver(*queue->bcsQueueEngineType); + if (device->getProductHelper().blitEnqueuePreferred(true)) { + EXPECT_EQ(bcsCsr, &queue->selectCsrForBuiltinOperation(args)); + } else { + EXPECT_EQ(ccsCsr, &queue->selectCsrForBuiltinOperation(args)); + } +} \ No newline at end of file diff --git a/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp b/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp index eba3dc8f66..f65d314999 100644 --- a/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp +++ b/opencl/test/unit_test/command_queue/enqueue_svm_tests.cpp @@ -2607,4 +2607,55 @@ HWTEST_F(StagingBufferTest, givenIsValidForStagingBufferCopyWhenSrcIsMappedThenR MockCommandQueueHw myCmdQ(context, pClDevice, 0); auto [buffer, mappedPtr] = createBufferAndMapItOnGpu(); EXPECT_FALSE(myCmdQ.isValidForStagingBufferCopy(pClDevice->getDevice(), dstPtr, mappedPtr, buffer->getSize(), false)); -} \ No newline at end of file +} + +HWTEST_F(StagingBufferTest, givenIsValidForStagingBufferCopyWhenIsNotLocalMemoryAndOOQAndGpuBusyThenReturnFalse) { + DebugManagerStateRestore restore{}; + debugManager.flags.EnableCopyWithStagingBuffers.set(1); + + auto mockDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + auto mockContext = std::make_unique(mockDevice.get()); + MockCommandQueueHw myCmdQ(mockContext.get(), mockDevice.get(), 0); + + SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::deviceUnifiedMemory, 1, mockContext->getRootDeviceIndices(), mockContext->getDeviceBitfields()); + unifiedMemoryProperties.device = &mockDevice->getDevice(); + auto dstPtr = mockContext->getSVMAllocsManager()->createUnifiedMemoryAllocation(copySize, unifiedMemoryProperties); + auto ccsCsr = static_cast *>(&myCmdQ.getGpgpuCommandStreamReceiver()); + + *ccsCsr->tagAddress = 0u; + ccsCsr->taskCount = 0u; + EXPECT_TRUE(myCmdQ.isValidForStagingBufferCopy(mockDevice->getDevice(), dstPtr, srcPtr, 1024ul, false)); + + *ccsCsr->tagAddress = 0u; + ccsCsr->taskCount = 1u; + EXPECT_TRUE(myCmdQ.isValidForStagingBufferCopy(mockDevice->getDevice(), dstPtr, srcPtr, 1024ul, false)); + + myCmdQ.setOoqEnabled(); + EXPECT_FALSE(myCmdQ.isValidForStagingBufferCopy(mockDevice->getDevice(), dstPtr, srcPtr, 1024ul, false)); + mockContext->getSVMAllocsManager()->freeSVMAlloc(dstPtr); +} + +HWTEST_F(StagingBufferTest, givenIsValidForStagingBufferCopyWhenIsLocalMemoryAndOOQAndGpuBusyThenReturnTrue) { + DebugManagerStateRestore restore{}; + debugManager.flags.EnableCopyWithStagingBuffers.set(1); + debugManager.flags.EnableLocalMemory.set(1); + + auto mockDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); + auto mockContext = std::make_unique(mockDevice.get()); + MockCommandQueueHw myCmdQ(mockContext.get(), mockDevice.get(), 0); + + SVMAllocsManager::UnifiedMemoryProperties unifiedMemoryProperties(InternalMemoryType::deviceUnifiedMemory, 1, mockContext->getRootDeviceIndices(), mockContext->getDeviceBitfields()); + unifiedMemoryProperties.device = &mockDevice->getDevice(); + auto dstPtr = mockContext->getSVMAllocsManager()->createUnifiedMemoryAllocation(copySize, unifiedMemoryProperties); + auto ccsCsr = static_cast *>(&myCmdQ.getGpgpuCommandStreamReceiver()); + + *ccsCsr->tagAddress = 0u; + ccsCsr->taskCount = 0u; + EXPECT_TRUE(myCmdQ.isValidForStagingBufferCopy(mockDevice->getDevice(), dstPtr, srcPtr, 1024ul, false)); + + *ccsCsr->tagAddress = 0u; + ccsCsr->taskCount = 1u; + myCmdQ.setOoqEnabled(); + EXPECT_TRUE(myCmdQ.isValidForStagingBufferCopy(mockDevice->getDevice(), dstPtr, srcPtr, 1024ul, false)); + mockContext->getSVMAllocsManager()->freeSVMAlloc(dstPtr); +} diff --git a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp index d2ce6bc6db..e02cc5e661 100644 --- a/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp +++ b/opencl/test/unit_test/mem_obj/buffer_bcs_tests.cpp @@ -173,7 +173,7 @@ HWTEST_F(NoBcsBufferTests, givenProductWithNoFullyBlitterSupportWhenCreatingBuff } HWTEST_TEMPLATED_F(BcsBufferTests, givenBcsSupportedWhenEnqueueBufferOperationIsCalledThenUseBcsCsr) { - if (!device->getRootDeviceEnvironment().getProductHelper().blitEnqueueAllowed(false)) { + if (!device->getRootDeviceEnvironment().getProductHelper().blitEnqueuePreferred(false)) { GTEST_SKIP(); } diff --git a/shared/source/command_stream/command_stream_receiver.h b/shared/source/command_stream/command_stream_receiver.h index 37a73e877c..18b731d5e2 100644 --- a/shared/source/command_stream/command_stream_receiver.h +++ b/shared/source/command_stream/command_stream_receiver.h @@ -536,6 +536,10 @@ class CommandStreamReceiver { uint32_t getRequiredScratchSlot1Size() { return requiredScratchSlot1Size; } virtual bool submitDependencyUpdate(TagNodeBase *tag) = 0; + bool isBusy() { + return !testTaskCountReady(getTagAddress(), this->taskCount); + } + protected: void cleanupResources(); void printDeviceIndex(); diff --git a/shared/source/os_interface/product_helper.h b/shared/source/os_interface/product_helper.h index 45965f104d..4e648e5907 100644 --- a/shared/source/os_interface/product_helper.h +++ b/shared/source/os_interface/product_helper.h @@ -166,7 +166,7 @@ class ProductHelper { virtual uint32_t getL1CachePolicy(bool isDebuggerActive) const = 0; virtual bool isEvictionIfNecessaryFlagSupported() const = 0; virtual void adjustNumberOfCcs(HardwareInfo &hwInfo) const = 0; - virtual bool blitEnqueueAllowed(bool isWriteToImageFromBuffer) const = 0; + virtual bool blitEnqueuePreferred(bool isWriteToImageFromBuffer) const = 0; virtual bool isPrefetcherDisablingInDirectSubmissionRequired() const = 0; virtual bool isStatefulAddressingModeSupported() const = 0; virtual bool isPlatformQuerySupported() const = 0; diff --git a/shared/source/os_interface/product_helper.inl b/shared/source/os_interface/product_helper.inl index 4818078703..710d6744c9 100644 --- a/shared/source/os_interface/product_helper.inl +++ b/shared/source/os_interface/product_helper.inl @@ -377,7 +377,7 @@ bool ProductHelperHw::isPageFaultSupported() const { } template -bool ProductHelperHw::blitEnqueueAllowed(bool isWriteToImageFromBuffer) const { +bool ProductHelperHw::blitEnqueuePreferred(bool isWriteToImageFromBuffer) const { return true; } diff --git a/shared/source/os_interface/product_helper_hw.h b/shared/source/os_interface/product_helper_hw.h index 191217c8cd..eaffca53e2 100644 --- a/shared/source/os_interface/product_helper_hw.h +++ b/shared/source/os_interface/product_helper_hw.h @@ -70,7 +70,7 @@ class ProductHelperHw : public ProductHelper { bool isStorageInfoAdjustmentRequired() const override; bool isBlitterForImagesSupported() const override; bool isPageFaultSupported() const override; - bool blitEnqueueAllowed(bool isWriteToImageFromBuffer) const override; + bool blitEnqueuePreferred(bool isWriteToImageFromBuffer) const override; bool isKmdMigrationSupported() const override; bool isDisableScratchPagesSupported() const override; bool isTile64With3DSurfaceOnBCSSupported(const HardwareInfo &hwInfo) const override; diff --git a/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl b/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl index b9983bb4ec..7059dd6379 100644 --- a/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl +++ b/shared/source/xe2_hpg_core/lnl/os_agnostic_product_helper_lnl.inl @@ -52,7 +52,7 @@ std::optional ProductHelperHw::getPreferr } template <> -bool ProductHelperHw::blitEnqueueAllowed(bool isWriteToImageFromBuffer) const { +bool ProductHelperHw::blitEnqueuePreferred(bool isWriteToImageFromBuffer) const { return isWriteToImageFromBuffer; } diff --git a/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl index b2613e324b..656a5ab649 100644 --- a/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl +++ b/shared/source/xe_hpg_core/xe_lpg/os_agnostic_product_helper_xe_lpg.inl @@ -44,7 +44,7 @@ bool ProductHelperHw::isEvictionIfNecessaryFlagSupported() const { } template <> -bool ProductHelperHw::blitEnqueueAllowed(bool isWriteToImageFromBuffer) const { +bool ProductHelperHw::blitEnqueuePreferred(bool isWriteToImageFromBuffer) const { return false; } diff --git a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp index 08d2d39ab4..a4b641cb0a 100644 --- a/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp +++ b/shared/test/unit_test/command_stream/command_stream_receiver_tests.cpp @@ -782,6 +782,19 @@ TEST(CommandStreamReceiverSimpleTest, givenCsrWhenSubmittingBatchBufferAndFlushF executionEnvironment.memoryManager->freeGraphicsMemoryImpl(commandBuffer); } +TEST(CommandStreamReceiverSimpleTest, givenCsrWhenTaskCountGreaterThanTagAddressThenIsBusyReturnsTrue) { + MockExecutionEnvironment executionEnvironment; + executionEnvironment.prepareRootDeviceEnvironments(1); + executionEnvironment.initializeMemoryManager(); + DeviceBitfield deviceBitfield(1); + MockCommandStreamReceiver csr(executionEnvironment, 0, deviceBitfield); + csr.taskCount = 0u; + *csr.tagAddress = 0u; + EXPECT_FALSE(csr.isBusy()); + csr.taskCount = 1u; + EXPECT_TRUE(csr.isBusy()); +} + HWTEST_F(CommandStreamReceiverTest, givenUpdateTaskCountFromWaitWhenSubmitiingBatchBufferThenTaskCountIsIncrementedAndLatestsValuesSetCorrectly) { DebugManagerStateRestore restorer; debugManager.flags.UpdateTaskCountFromWait.set(3); diff --git a/shared/test/unit_test/os_interface/product_helper_tests.cpp b/shared/test/unit_test/os_interface/product_helper_tests.cpp index 0c11a590ce..08c2d779cf 100644 --- a/shared/test/unit_test/os_interface/product_helper_tests.cpp +++ b/shared/test/unit_test/os_interface/product_helper_tests.cpp @@ -478,8 +478,8 @@ HWTEST2_F(ProductHelperTest, givenProductHelperWhenAskedIfDisableScratchPagesIsS EXPECT_FALSE(productHelper->isDisableScratchPagesSupported()); } -HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnTrue) { - EXPECT_TRUE(productHelper->blitEnqueueAllowed(false)); +HWTEST_F(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue) { + EXPECT_TRUE(productHelper->blitEnqueuePreferred(false)); } HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfTile64With3DSurfaceOnBCSIsSupportedThenTrueIsReturned) { diff --git a/shared/test/unit_test/xe2_hpg_core/lnl/excludes_xe2_hpg_core_lnl.cpp b/shared/test/unit_test/xe2_hpg_core/lnl/excludes_xe2_hpg_core_lnl.cpp index c7fa652fa8..007217b930 100644 --- a/shared/test/unit_test/xe2_hpg_core/lnl/excludes_xe2_hpg_core_lnl.cpp +++ b/shared/test/unit_test/xe2_hpg_core/lnl/excludes_xe2_hpg_core_lnl.cpp @@ -8,4 +8,4 @@ #include "shared/test/common/test_macros/hw_test_base.h" HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_LUNARLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnTrue, IGFX_LUNARLAKE); +HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue, IGFX_LUNARLAKE); diff --git a/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp b/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp index 1e08ef70a3..bd6ea91d6a 100644 --- a/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp +++ b/shared/test/unit_test/xe2_hpg_core/lnl/product_helper_tests_lnl.cpp @@ -153,9 +153,9 @@ LNLTEST_F(LnlProductHelper, givenExternalHostPtrWhenMitigateDcFlushThenOverrideC } } -LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnCorrectValue) { - EXPECT_TRUE(productHelper->blitEnqueueAllowed(true)); - EXPECT_FALSE(productHelper->blitEnqueueAllowed(false)); +LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnCorrectValue) { + EXPECT_TRUE(productHelper->blitEnqueuePreferred(true)); + EXPECT_FALSE(productHelper->blitEnqueuePreferred(false)); } LNLTEST_F(LnlProductHelper, givenProductHelperWhenCheckingIsDeviceUsmAllocationReuseSupportedThenCorrectValueIsReturned) { diff --git a/shared/test/unit_test/xe_hpg_core/arl/excludes_xe_hpg_core_arl.cpp b/shared/test/unit_test/xe_hpg_core/arl/excludes_xe_hpg_core_arl.cpp index 8d104e69cb..98621c02a3 100644 --- a/shared/test/unit_test/xe_hpg_core/arl/excludes_xe_hpg_core_arl.cpp +++ b/shared/test/unit_test/xe_hpg_core/arl/excludes_xe_hpg_core_arl.cpp @@ -19,7 +19,7 @@ HWTEST_EXCLUDE_PRODUCT(GfxCoreHelperTest, givenDebugVariableSetWhenAskingForAuxT HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPatIndexProgrammingSupportedThenReturnFalse, IGFX_ARROWLAKE); HWTEST_EXCLUDE_PRODUCT(CommandEncoderTests, givenRequiredWorkGroupOrderWhenCallAdjustWalkOrderThenWalkerIsNotChanged_IsAtMostXeHpcCore, IGFX_ARROWLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustWalkOrderAvailableCallThenFalseReturn, IGFX_ARROWLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnTrue, IGFX_ARROWLAKE); +HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue, IGFX_ARROWLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_ARROWLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_ARROWLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse, IGFX_ARROWLAKE); diff --git a/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp index 82062d5799..45248f23e5 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/excludes_xe_hpg_core_mtl.cpp @@ -15,7 +15,7 @@ HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenComputeModeProgrammingWhenR HWTEST_EXCLUDE_PRODUCT(ComputeModeRequirements, givenComputeModeProgrammingWhenRequiredGRFNumberIsGreaterThan128ThenLargeGRFModeIsProgrammed_ForceNonCoherentSupportedMatcher, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenAskedIfPatIndexProgrammingSupportedThenReturnFalse, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenIsAdjustWalkOrderAvailableCallThenFalseReturn, IGFX_METEORLAKE); -HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnTrue, IGFX_METEORLAKE); +HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnTrue, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, whenGettingPreferredAllocationMethodThenNoPreferenceIsReturned, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenBooleanUncachedWhenCallOverridePatIndexThenProperPatIndexIsReturned, IGFX_METEORLAKE); HWTEST_EXCLUDE_PRODUCT(ProductHelperTest, givenProductHelperWhenCheckDummyBlitWaRequiredThenReturnFalse, IGFX_METEORLAKE); diff --git a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp index cbef2bc69f..51eb596e55 100644 --- a/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp +++ b/shared/test/unit_test/xe_hpg_core/os_agnostic_product_helper_xe_lpg_tests.cpp @@ -192,8 +192,8 @@ HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenGettingEvictIfNecessary EXPECT_TRUE(productHelper->isEvictionIfNecessaryFlagSupported()); } -HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckBlitEnqueueAllowedThenReturnFalse, IsXeLpg) { - EXPECT_FALSE(productHelper->blitEnqueueAllowed(false)); +HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCheckBlitEnqueuePreferredThenReturnFalse, IsXeLpg) { + EXPECT_FALSE(productHelper->blitEnqueuePreferred(false)); } HWTEST2_F(XeLpgProductHelperTests, givenProductHelperWhenCallGetInternalHeapsPreallocatedThenReturnCorrectValue, IsXeLpg) {