mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Disable copy command buffer into ring when metrics enabled
Related-To: NEO-7422 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c00c310cf4
commit
494ef4129e
@@ -202,6 +202,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::initialize(Device *device, NEO
|
||||
!device->isImplicitScalingCapable() &&
|
||||
this->csr &&
|
||||
this->csr->isAnyDirectSubmissionEnabled() &&
|
||||
!deviceImp->getNEODevice()->getExecutionEnvironment()->areMetricsEnabled() &&
|
||||
deviceImp->getNEODevice()->getMemoryManager()->isLocalMemorySupported(deviceImp->getRootDeviceIndex());
|
||||
|
||||
if (NEO::DebugManager.flags.DirectSubmissionFlatRingBuffer.get() != -1) {
|
||||
|
||||
@@ -838,6 +838,23 @@ HWTEST_F(CommandListCreate, givenImmediateCopyOnlySingleTileDirectSubmissionComm
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListCreate, givenMetricsImmediateCopyOnlySingleTileDirectSubmissionCommandListWhenInitializeThenNotCreateSecondaryCmdBufferInSystemMemory) {
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.DirectSubmissionFlatRingBuffer.set(-1);
|
||||
|
||||
device->getNEODevice()->getExecutionEnvironment()->setMetricsEnabled(true);
|
||||
ze_command_queue_desc_t desc = {};
|
||||
desc.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS;
|
||||
ze_result_t returnValue;
|
||||
CommandStreamReceiver *csr = nullptr;
|
||||
device->getCsrForOrdinalAndIndex(&csr, desc.ordinal, desc.index);
|
||||
reinterpret_cast<UltCommandStreamReceiver<FamilyType> *>(csr)->directSubmissionAvailable = true;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::createImmediate(productFamily, device, &desc, false, NEO::EngineGroupType::Copy, returnValue));
|
||||
ASSERT_NE(nullptr, commandList);
|
||||
|
||||
EXPECT_EQ(reinterpret_cast<CmdContainerMock *>(&commandList->commandContainer)->secondaryCommandStreamForImmediateCmdList.get(), nullptr);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListCreate, givenSecondaryCommandStreamForImmediateCmdListWhenCheckAvailableSpaceThenSwapCommandStreams, IsAtLeastSkl) {
|
||||
if (!device->getHwInfo().featureTable.flags.ftrLocalMemory) {
|
||||
GTEST_SKIP();
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "shared/source/direct_submission/direct_submission_hw.h"
|
||||
#include "shared/source/direct_submission/direct_submission_hw_diagnostic_mode.h"
|
||||
#include "shared/source/direct_submission/relaxed_ordering_helper.h"
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
@@ -902,6 +903,7 @@ void DirectSubmissionHw<GfxFamily, Dispatcher>::dispatchTaskStoreSection(uint64_
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
bool DirectSubmissionHw<GfxFamily, Dispatcher>::copyCommandBufferIntoRing(BatchBuffer &batchBuffer) {
|
||||
auto ret = this->osContext.getNumSupportedDevices() == 1u &&
|
||||
!this->rootDeviceEnvironment.executionEnvironment.areMetricsEnabled() &&
|
||||
!batchBuffer.chainedBatchBuffer &&
|
||||
batchBuffer.commandBufferAllocation &&
|
||||
MemoryPoolHelper::isSystemMemoryPool(batchBuffer.commandBufferAllocation->getMemoryPool()) &&
|
||||
|
||||
@@ -292,6 +292,18 @@ HWTEST_F(DirectSubmissionDispatchBufferTest, givenDefaultDirectSubmissionFlatRin
|
||||
EXPECT_TRUE(directSubmission.copyCommandBufferIntoRing(batchBuffer));
|
||||
}
|
||||
|
||||
HWTEST_F(DirectSubmissionDispatchBufferTest, givenMetricsDefaultDirectSubmissionFlatRingBufferAndSingleTileDirectSubmissionWhenSubmitSystemMemNotChainedBatchBufferWithoutRelaxingDependenciesThenNotCopyIntoRing) {
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
using Dispatcher = RenderDispatcher<FamilyType>;
|
||||
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.DirectSubmissionFlatRingBuffer.set(-1);
|
||||
pDevice->getExecutionEnvironment()->setMetricsEnabled(true);
|
||||
|
||||
MockDirectSubmissionHw<FamilyType, Dispatcher> directSubmission(*pDevice->getDefaultEngine().commandStreamReceiver);
|
||||
EXPECT_FALSE(directSubmission.copyCommandBufferIntoRing(batchBuffer));
|
||||
}
|
||||
|
||||
HWTEST_F(DirectSubmissionDispatchBufferTest, givenDefaultDirectSubmissionFlatRingBufferAndSingleTileDirectSubmissionWhenSubmitSystemMemNotChainedBatchBufferWithoutCommandBufferRelaxingDependenciesThenNotCopyIntoRing) {
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
using Dispatcher = RenderDispatcher<FamilyType>;
|
||||
|
||||
Reference in New Issue
Block a user