mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-01 23:30:35 +00:00
VPUX config fix and dynamic_shape bug fixed. (#15737)
Dynamic shapes was not working with serialized model so we are switching to compile model method ### Motivation and Context Dynamic shapes was not working with serialized model - If it fixes an open issue, please link to the issue here. --> Signed-off-by: MaajidKhan <n.maajid.khan@intel.com> Co-authored-by: MaajidKhan <n.maajid.khan@intel.com>
This commit is contained in:
parent
d32c540b2d
commit
4fbc08e3c2
1 changed files with 8 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
|
|||
#endif
|
||||
#else
|
||||
#if defined(OPENVINO_2023_0)
|
||||
if (subgraph_context.precision != InferenceEngine::Precision::FP16) {
|
||||
if (subgraph_context.precision != InferenceEngine::Precision::FP16 && global_context_.enable_dynamic_shapes == false) {
|
||||
const std::string model = model_proto.SerializeAsString();
|
||||
exe_network_ = global_context_.ie_core.LoadNetwork(model, hw_target, device_config, subgraph_context_.subgraph_name);
|
||||
LOGS_DEFAULT(INFO) << log_tag << "Loaded model to the plugin";
|
||||
|
|
@ -131,6 +131,13 @@ BasicBackend::BasicBackend(const ONNX_NAMESPACE::ModelProto& model_proto,
|
|||
if (openvino_ep::backend_utils::IsDebugEnabled()) {
|
||||
device_config.emplace(ov::enable_profiling(true));
|
||||
}
|
||||
#endif
|
||||
#if defined(OPENVINO_2023_0)
|
||||
if (global_context_.device_type.find("VPUX") != std::string::npos) {
|
||||
std::pair<std::string, ov::Any> device_property;
|
||||
device_property = std::make_pair("VPUX_COMPILER_TYPE", "MLIR");
|
||||
device_config.emplace(ov::device::properties("VPUX", device_property));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue