fix: always initialize internal bcs engine

Related-To: NEO-16766, HSD-18043945067

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2025-11-18 12:31:22 +00:00
committed by Compute-Runtime-Automation
parent 4eb37124cb
commit a673c5deea
2 changed files with 8 additions and 1 deletions

View File

@@ -35,7 +35,7 @@ bool OsContext::isImmediateContextInitializationEnabled(bool isDefaultEngine) co
}
if (engineUsage == EngineUsage::internal) {
return initializeInternalEngineImmediately;
return initializeInternalEngineImmediately || engineType == aub_stream::EngineType::ENGINE_BCS;
}
if (isDefaultEngine) {

View File

@@ -231,6 +231,7 @@ struct DeferredOsContextCreationTests : ::testing::Test {
static inline const EngineTypeUsage engineTypeUsageRegular{aub_stream::ENGINE_RCS, EngineUsage::regular};
static inline const EngineTypeUsage engineTypeUsageInternal{aub_stream::ENGINE_RCS, EngineUsage::internal};
static inline const EngineTypeUsage engineTypeUsageBlitter{aub_stream::ENGINE_BCS, EngineUsage::regular};
static inline const EngineTypeUsage engineTypeUsageInternalBlitter{aub_stream::ENGINE_BCS, EngineUsage::internal};
};
TEST_F(DeferredOsContextCreationTests, givenRegularEngineWhenCreatingOsContextThenOsContextIsInitializedDeferred) {
@@ -263,27 +264,33 @@ TEST_F(DeferredOsContextCreationTests, givenInternalEngineWhenCreatingOsContextT
{
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = true;
expectImmediateContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = false;
expectDeferredContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
}
{
debugManager.flags.DeferOsContextInitialization.set(1);
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = true;
expectImmediateContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = false;
expectDeferredContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
}
{
debugManager.flags.DeferOsContextInitialization.set(0);
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = true;
expectImmediateContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
productHelper.mockProductHelper->initializeInternalEngineImmediatelyResult = false;
expectImmediateContextCreation(engineTypeUsageInternal, false);
expectImmediateContextCreation(engineTypeUsageInternalBlitter, false);
}
}