fix: add hasEngines() to check for engines detection

Related-To: NEO-9754
Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
Maciej Bielski
2024-05-21 17:10:41 +00:00
committed by Compute-Runtime-Automation
parent 0977d9e09d
commit dafaaf5f7d
5 changed files with 9 additions and 2 deletions

View File

@@ -992,7 +992,7 @@ bool Drm::queryMemoryInfo() {
bool Drm::queryEngineInfo(bool isSysmanEnabled) {
this->engineInfo = ioctlHelper->createEngineInfo(isSysmanEnabled);
if (this->engineInfo && this->engineInfo.get()->engines.size() == 0) {
if (this->engineInfo && (this->engineInfo->hasEngines() == false)) {
printDebugString(debugManager.flags.PrintDebugMessages.get(), stderr, "%s", "FATAL: Engine info size is equal to 0.\n");
}

View File

@@ -224,6 +224,10 @@ void EngineInfo::assignCopyEngine(aub_stream::EngineType baseEngineType, uint32_
bcsInfoMask.set(0, true);
}
bool EngineInfo::hasEngines() {
return (tileToEngineMap.size() > 0LU);
}
// EngineIndex = (Base + EngineCounter - 1)
aub_stream::EngineType EngineInfo::getBaseCopyEngineType(IoctlHelper *ioctlHelper, uint64_t capabilities, bool isIntegratedDevice) {
if (!isIntegratedDevice) {

View File

@@ -35,6 +35,7 @@ struct EngineInfo {
uint32_t getEngineTileIndex(const EngineClassInstance &engine);
void getListOfEnginesOnATile(uint32_t tile, std::vector<EngineClassInstance> &listOfEngines);
std::multimap<uint32_t, EngineClassInstance> getEngineTileInfo();
bool hasEngines();
std::vector<EngineCapabilities> engines;
protected: