Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[NPUW] Relaxed checks in Sliding Window patching to not fail Whisper (#33819)

Anastasiya(Asya) Pronina9c9f06ce5db6
diff --git a/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp b/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp
index ea1bcee4f37..cff7c9b68f5 100644
--- a/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp
+++ b/src/plugins/intel_npu/src/plugin/npuw/llm_compiled_model.cpp
@@ -762,8 +762,9 @@ public:
position_ids_node_ptr = i.get_node_shared_ptr();
}
}
- OPENVINO_ASSERT(attention_mask_node_ptr, "attention_mask input is not found!");
- OPENVINO_ASSERT(position_ids_node_ptr, "position_ids input is not found!");
+ if (attention_mask_node_ptr == nullptr || position_ids_node_ptr == nullptr) {
+ return false;
+ }
ov::pass::Manager manager;
manager.set_per_pass_validation(true);
@@ -1609,8 +1610,10 @@ ov::npuw::LLMCompiledModel::LLMCompiledModel(const std::shared_ptr<ov::Model>& m
LOG_INFO("Two-model pipeline will be created.");
}
- LOG_DEBUG("Try patch Phi-3 sliding window mask, if it exists.");
- patch_phi3_sliding_mask(kvcache_model);
+ if (!m_is_whisper) {
+ LOG_DEBUG("Try patch Phi-3 sliding window mask, if it exists.");
+ patch_phi3_sliding_mask(kvcache_model);
+ }
LOG_DEBUG("Creating prefill model as clone of transformed kvcache one.");
auto prefill_model = kvcache_model->clone();