performance: Disable gem close worker for ULLS light

Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk 2025-02-14 12:30:38 +00:00 committed by Compute-Runtime-Automation
parent 4da8a3694c
commit 14b89591e6
2 changed files with 14 additions and 1 deletions

View File

@ -370,7 +370,7 @@ bool DrmCommandStreamReceiver<GfxFamily>::waitUserFence(TaskCountType waitValue,
template <typename GfxFamily>
bool DrmCommandStreamReceiver<GfxFamily>::isGemCloseWorkerActive() const {
return this->getMemoryManager()->peekGemCloseWorker() && !this->osContext->isInternalEngine() && this->getType() == CommandStreamReceiverType::hardware;
return this->getMemoryManager()->peekGemCloseWorker() && !this->osContext->isInternalEngine() && !this->osContext->isDirectSubmissionLightActive() && this->getType() == CommandStreamReceiverType::hardware;
}
template <typename GfxFamily>

View File

@ -114,6 +114,19 @@ HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenCsrIsCreate
delete osContext;
}
HWTEST_F(DeviceCommandStreamLeaksTest, givenDirectSubmissionLightWhenCsrIsCreatedThenGemCloseWorkerInactiveModeIsSelected) {
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));
auto osContext = OsContext::create(executionEnvironment->rootDeviceEnvironments[0]->osInterface.get(), 0, 0,
EngineDescriptorHelper::getDefaultDescriptor({aub_stream::ENGINE_CCS, EngineUsage::regular}, PreemptionMode::ThreadGroup, 0b1));
ptr->setupContext(*osContext);
osContext->setDirectSubmissionActive();
auto drmCsr = (DrmCommandStreamReceiver<FamilyType> *)ptr.get();
EXPECT_FALSE(drmCsr->isGemCloseWorkerActive());
delete osContext;
}
HWTEST_F(DeviceCommandStreamLeaksTest, givenDefaultGemCloseWorkerWhenInternalCsrIsCreatedThenGemCloseWorkerInactiveModeIsSelected) {
executionEnvironment->memoryManager = DrmMemoryManager::create(*executionEnvironment);
std::unique_ptr<CommandStreamReceiver> ptr(DeviceCommandStreamReceiver<FamilyType>::create(false, *executionEnvironment, 0, 1));