Skip to content

Commit 5a2e4ff

Browse files
not apply auto batch for CPU plugin
Signed-off-by: HU Yuan2 <[email protected]>
1 parent da4ff89 commit 5a2e4ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/inference/src/dev/core_impl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,10 @@ std::shared_ptr<const ov::Model> ov::CoreImpl::apply_auto_batching(const std::sh
10941094
.get_property(ov::supported_properties.name(), parsed._config)
10951095
.as<std::vector<ov::PropertyName>>();
10961096
auto it = std::find(metrics.begin(), metrics.end(), ov::optimal_batch_size.name());
1097-
if (metrics.end() == it)
1097+
// not apply auto batch for CPU plugin
1098+
if (metrics.end() == it || parsed._deviceName == "CPU") {
10981099
return model;
1100+
}
10991101

11001102
// if applicable, the Auto-Batching is implicitly enabled via the performance hints
11011103
bool bTputInPlg = get_plugin(parsed._deviceName)

src/plugins/intel_cpu/src/plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ ov::Any Plugin::get_ro_property(const std::string& name, const ov::AnyMap& optio
528528
#else
529529
# error "Undefined system processor"
530530
#endif
531-
} else if (name == ov::optimal_batch_size){
531+
} else if (name == ov::optimal_batch_size) {
532532
return decltype(ov::optimal_batch_size)::value_type(1);
533533
} else if (name == ov::hint::model.name()) {
534534
return decltype(ov::hint::model)::value_type(nullptr);

0 commit comments

Comments
 (0)