fix: handle not exisiting wsl compute helper library

https://github.com/intel/compute-runtime/issues/688
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-11-14 15:07:54 +00:00
committed by Compute-Runtime-Automation
parent 9a8138725a
commit c454e0d33e
2 changed files with 18 additions and 3 deletions

View File

@@ -282,10 +282,12 @@ std::unique_ptr<UmKmDataTranslator> createUmKmDataTranslator(const Gdi &gdi, D3D
path.append(Os::fileSeparator);
path.append(wslComputeHelperLibNameToLoad);
}
return std::make_unique<WslComputeHelperUmKmDataTranslator>(std::unique_ptr<OsLibrary>(OsLibrary::load(path)));
} else {
return std::make_unique<UmKmDataTranslator>();
std::unique_ptr<OsLibrary> lib{OsLibrary::load(path)};
if ((nullptr != lib) && (lib->isLoaded())) {
return std::make_unique<WslComputeHelperUmKmDataTranslator>(std::move(lib));
}
}
return std::make_unique<UmKmDataTranslator>();
}
} // namespace NEO