Skip to content

Commit 54151b1

Browse files
Enable dynamic path for NPU when enable_causallm is true (#732)
Co-authored-by: Ankit Maheshkar <ankit.maheshkar@intel.com>
1 parent 8264e36 commit 54151b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

onnxruntime/core/providers/openvino/backend_manager.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ BackendManager::BackendManager(SessionContext& session_context,
118118
LOGS_DEFAULT(INFO) << "[OpenVINO-EP] Model has symbolic input dims";
119119
if ((!session_context_.disable_dynamic_shapes &&
120120
(session_context_.device_type.find("CPU") != std::string::npos ||
121-
session_context_.device_type.find("GPU") != std::string::npos)) ||
121+
session_context_.device_type.find("GPU") != std::string::npos ||
122+
(session_context_.device_type.find("NPU") != std::string::npos &&
123+
session_context_.enable_causallm) )) ||
122124
(subgraph_context_.is_ep_ctx_graph)) {
123125
LOGS_DEFAULT(INFO) << "[OpenVINO-EP] Starting backend initialization. "
124126
<< "Creating backend Dynamic Shapes";

0 commit comments

Comments
 (0)