OpenVINO™ is an open source toolkit for optimizing and deploying AI inference
C++ aicomputer-visiondeep-learningdeploy-aidiffusion-modelsgenerative-aigood-first-issueinferencellm-inferencenatural-language-processingnlpopenvinooptimize-aiperformance-boostrecommendation-systemspeech-recognitionstable-diffusiontransformersyolo
[NPU] Change CompilerType option only when PREFER_PLUGIN is set (#33870)
Bogdan Pereanue0f524f4a153
diff --git a/src/plugins/intel_npu/src/compiler_adapter/include/compiler_adapter_factory.hpp b/src/plugins/intel_npu/src/compiler_adapter/include/compiler_adapter_factory.hppindex dc1a76a342e..df5aa0b1b2d 100644--- a/src/plugins/intel_npu/src/compiler_adapter/include/compiler_adapter_factory.hpp+++ b/src/plugins/intel_npu/src/compiler_adapter/include/compiler_adapter_factory.hpp@@ -27,9 +27,9 @@ public:std::unique_ptr<ICompilerAdapter> getCompiler(const ov::SoPtr<IEngineBackend>& engineBackend,ov::intel_npu::CompilerType& compilerType) const {- if (engineBackend) {- if (_pluginCompilerIsPresent) {- if (compilerType == ov::intel_npu::CompilerType::PREFER_PLUGIN) {+ if (compilerType == ov::intel_npu::CompilerType::PREFER_PLUGIN) {+ if (engineBackend) {+ if (_pluginCompilerIsPresent) {try {compilerType = ov::intel_npu::CompilerType::PLUGIN;return std::make_unique<PluginCompilerAdapter>(engineBackend->getInitStructs());@@ -37,13 +37,13 @@ public:_pluginCompilerIsPresent = false;compilerType = ov::intel_npu::CompilerType::DRIVER;}+ } else {+ compilerType = ov::intel_npu::CompilerType::DRIVER;}} else {- compilerType = ov::intel_npu::CompilerType::DRIVER;+ // no backend present, offline compilation only+ compilerType = ov::intel_npu::CompilerType::PLUGIN;}- } else {- // no backend present, offline compilation only- compilerType = ov::intel_npu::CompilerType::PLUGIN;}if (compilerType == ov::intel_npu::CompilerType::PLUGIN) {