Merge 2787c716b8 into 43de73cbd6
This commit is contained in:
commit
87b9da50c5
|
|
@ -222,6 +222,7 @@ ov::Any CompiledModel::get_property(const std::string& name) const {
|
|||
RO_property(ov::intel_cpu::sparse_weights_decompression_rate.name()),
|
||||
RO_property(ov::hint::dynamic_quantization_group_size.name()),
|
||||
RO_property(ov::hint::kv_cache_precision.name()),
|
||||
RO_property(ov::optimal_batch_size.name()),
|
||||
};
|
||||
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
|
|
@ -299,6 +300,8 @@ ov::Any CompiledModel::get_property(const std::string& name) const {
|
|||
config.fcDynamicQuantizationGroupSize);
|
||||
} else if (name == ov::hint::kv_cache_precision) {
|
||||
return decltype(ov::hint::kv_cache_precision)::value_type(config.kvCachePrecision);
|
||||
} else if (name == ov::optimal_batch_size.name()) {
|
||||
return decltype(ov::optimal_batch_size)::value_type(1);
|
||||
}
|
||||
OPENVINO_THROW("Unsupported property: ", name);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -445,6 +445,7 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio
|
|||
RO_property(ov::device::capabilities.name()),
|
||||
RO_property(ov::device::type.name()),
|
||||
RO_property(ov::device::architecture.name()),
|
||||
RO_property(ov::optimal_batch_size.name()),
|
||||
};
|
||||
// the whole config is RW before model is loaded.
|
||||
std::vector<ov::PropertyName> rwProperties{
|
||||
|
|
@ -536,6 +537,8 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio
|
|||
#else
|
||||
# error "Undefined system processor"
|
||||
#endif
|
||||
} else if (name == ov::optimal_batch_size){
|
||||
return decltype(ov::optimal_batch_size)::value_type(1);
|
||||
}
|
||||
|
||||
OPENVINO_THROW("Cannot get unsupported property: ", name);
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ TEST_F(OVClassConfigTestCPU, smoke_PluginAllSupportedPropertiesAreAvailable) {
|
|||
RO_property(ov::device::capabilities.name()),
|
||||
RO_property(ov::device::type.name()),
|
||||
RO_property(ov::device::architecture.name()),
|
||||
RO_property(ov::optimal_batch_size.name()),
|
||||
// read write
|
||||
RW_property(ov::num_streams.name()),
|
||||
RW_property(ov::affinity.name()),
|
||||
|
|
@ -384,4 +385,14 @@ TEST_F(OVClassConfigTestCPU, smoke_PluginCheckCPUDeviceArchitecture) {
|
|||
#endif
|
||||
}
|
||||
|
||||
TEST_F(OVClassConfigTestCPU, smoke_CpuExceNetworkCheckCPUOptimalBatchSize) {
|
||||
ov::Core ie;
|
||||
ov::Any value;
|
||||
ov::CompiledModel compiledModel;
|
||||
|
||||
ASSERT_NO_THROW(compiledModel = ie.compile_model(model, deviceName));
|
||||
ASSERT_NO_THROW(value = compiledModel.get_property(ov::optimal_batch_size));
|
||||
ASSERT_EQ(value.as<unsigned int>(), 1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Reference in New Issue