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:
sfatimar 2023-04-30 04:18:34 +05:30 committed by GitHub
parent d32c540b2d
commit 4fbc08e3c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}