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
[intel-npu] getDevice quickfix for off-device compilation (#30527)
Attila Csokdfb78f8d5314
diff --git a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp b/src/plugins/intel_npu/src/backend/src/zero_backend.cppindex 8043bcdb17f..9e10963d9b6 100644--- a/src/plugins/intel_npu/src/backend/src/zero_backend.cpp+++ b/src/plugins/intel_npu/src/backend/src/zero_backend.cpp@@ -50,6 +50,12 @@ const std::shared_ptr<IDevice> ZeroEngineBackend::getDevice() const {}const std::shared_ptr<IDevice> ZeroEngineBackend::getDevice(const std::string& name) const {+ // sanity check. are we off-device?+ // return empty device for off-device compilation case+ if (_devices.empty()) {+ _logger.debug("ZeroEngineBackend - getDevice() returning empty list");+ return {};+ }// sanity check - if string is empty, call the default function// which will pick the first available and valid npu deviceif (name.length() == 0) {