mirror of
https://github.com/intel/compute-runtime.git
synced 2025-11-10 05:49:51 +08:00
Create cooperative engine once on engineInstanced device
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cb91474b1a
commit
4f77db267b
@@ -369,6 +369,7 @@ struct EngineInstancedDeviceTests : public ::testing::Test {
|
|||||||
bool regularCcsFound = false;
|
bool regularCcsFound = false;
|
||||||
bool internalCcsFound = false;
|
bool internalCcsFound = false;
|
||||||
bool lowPriorityCcsFound = false;
|
bool lowPriorityCcsFound = false;
|
||||||
|
bool cooperativeCcsFound = false;
|
||||||
|
|
||||||
OsContext *defaultOsContext = device->getDefaultEngine().osContext;
|
OsContext *defaultOsContext = device->getDefaultEngine().osContext;
|
||||||
EXPECT_EQ(engineType, defaultOsContext->getEngineType());
|
EXPECT_EQ(engineType, defaultOsContext->getEngineType());
|
||||||
@@ -394,6 +395,9 @@ struct EngineInstancedDeviceTests : public ::testing::Test {
|
|||||||
} else if (osContext->isInternalEngine()) {
|
} else if (osContext->isInternalEngine()) {
|
||||||
EXPECT_FALSE(internalCcsFound);
|
EXPECT_FALSE(internalCcsFound);
|
||||||
internalCcsFound = true;
|
internalCcsFound = true;
|
||||||
|
} else if (osContext->getEngineUsage() == EngineUsage::Cooperative) {
|
||||||
|
EXPECT_FALSE(cooperativeCcsFound);
|
||||||
|
cooperativeCcsFound = true;
|
||||||
} else {
|
} else {
|
||||||
EXPECT_TRUE(false);
|
EXPECT_TRUE(false);
|
||||||
}
|
}
|
||||||
@@ -402,7 +406,9 @@ struct EngineInstancedDeviceTests : public ::testing::Test {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (regularCcsFound && internalCcsFound && lowPriorityCcsFound);
|
auto &hwInfo = device->getHardwareInfo();
|
||||||
|
return (regularCcsFound && internalCcsFound && lowPriorityCcsFound) &&
|
||||||
|
(!HwHelper::get(hwInfo.platform.eRenderCoreFamily).isCooperativeEngineSupported(hwInfo) || cooperativeCcsFound);
|
||||||
}
|
}
|
||||||
|
|
||||||
DebugManagerStateRestore restorer;
|
DebugManagerStateRestore restorer;
|
||||||
|
|||||||
@@ -265,7 +265,8 @@ void Device::translateToEngineInstanced(EngineInstancesContainer &engineInstance
|
|||||||
EngineInstancesContainer newEngines;
|
EngineInstancesContainer newEngines;
|
||||||
|
|
||||||
for (auto &engine : engineInstancesContainer) {
|
for (auto &engine : engineInstancesContainer) {
|
||||||
if (EngineHelpers::isBcs(engine.first) || (engine.first == this->engineInstancedType) || (engine.second != EngineUsage::Regular)) {
|
if (EngineHelpers::isBcs(engine.first) || (engine.first == this->engineInstancedType) ||
|
||||||
|
(engine.second != EngineUsage::Regular && engine.second != EngineUsage::Cooperative)) {
|
||||||
newEngines.push_back(engine);
|
newEngines.push_back(engine);
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user