|
4 | 4 |
|
5 | 5 | #include "config.h"
|
6 | 6 |
|
| 7 | +#include <algorithm> |
| 8 | +#include <map> |
| 9 | +#include <string> |
| 10 | + |
7 | 11 | #include "cpu/x64/cpu_isa_traits.hpp"
|
8 | 12 | #include "openvino/core/parallel.hpp"
|
9 | 13 | #include "openvino/core/type/element_type_traits.hpp"
|
10 | 14 | #include "openvino/runtime/intel_cpu/properties.hpp"
|
11 | 15 | #include "openvino/runtime/internal_properties.hpp"
|
12 | 16 | #include "openvino/runtime/properties.hpp"
|
| 17 | +#include "utils/cpu_utils.hpp" |
13 | 18 | #include "utils/debug_capabilities.h"
|
14 | 19 | #include "utils/precision_support.h"
|
15 |
| -#include "utils/cpu_utils.hpp" |
16 |
| - |
17 |
| -#include <algorithm> |
18 |
| -#include <map> |
19 |
| -#include <string> |
20 | 20 |
|
21 | 21 | namespace ov {
|
22 | 22 | namespace intel_cpu {
|
@@ -61,9 +61,7 @@ Config::Config() {
|
61 | 61 | */
|
62 | 62 | void Config::applyDebugCapsProperties() {
|
63 | 63 | // always enable perf counters for verbose, performance summary and average counters
|
64 |
| - if (!debugCaps.verbose.empty() || |
65 |
| - !debugCaps.summaryPerf.empty() || |
66 |
| - !debugCaps.averageCountersPath.empty()) { |
| 64 | + if (!debugCaps.verbose.empty() || !debugCaps.summaryPerf.empty() || !debugCaps.averageCountersPath.empty()) { |
67 | 65 | collectPerfCounters = true;
|
68 | 66 | }
|
69 | 67 | }
|
@@ -151,10 +149,10 @@ void Config::readProperties(const ov::AnyMap& prop, const ModelType modelType) {
|
151 | 149 | logLevel = val.as<ov::log::Level>();
|
152 | 150 | } catch (const ov::Exception&) {
|
153 | 151 | OPENVINO_THROW("Wrong value ",
|
154 |
| - val.as<std::string>(), |
155 |
| - " for property key ", |
156 |
| - key, |
157 |
| - ". Expected only ov::log::Level::NO/ERR/WARNING/INFO/DEBUG/TRACE."); |
| 152 | + val.as<std::string>(), |
| 153 | + " for property key ", |
| 154 | + key, |
| 155 | + ". Expected only ov::log::Level::NO/ERR/WARNING/INFO/DEBUG/TRACE."); |
158 | 156 | }
|
159 | 157 | } else if (key == ov::hint::num_requests.name()) {
|
160 | 158 | try {
|
@@ -243,8 +241,8 @@ void Config::readProperties(const ov::AnyMap& prop, const ModelType modelType) {
|
243 | 241 | fcDynamicQuantizationGroupSize = val.as<uint64_t>();
|
244 | 242 | } catch (const ov::Exception&) {
|
245 | 243 | OPENVINO_THROW("Wrong value for property key ",
|
246 |
| - ov::hint::dynamic_quantization_group_size.name(), |
247 |
| - ". Expected only unsinged integer numbers"); |
| 244 | + ov::hint::dynamic_quantization_group_size.name(), |
| 245 | + ". Expected only unsinged integer numbers"); |
248 | 246 | }
|
249 | 247 | } else if (key == ov::enable_profiling.name()) {
|
250 | 248 | try {
|
@@ -366,7 +364,7 @@ void Config::readProperties(const ov::AnyMap& prop, const ModelType modelType) {
|
366 | 364 | if (one_of(prec, ov::element::f32, ov::element::f16, ov::element::bf16, ov::element::u8)) {
|
367 | 365 | kvCachePrecision = prec;
|
368 | 366 | } else {
|
369 |
| - OPENVINO_THROW("invalid value"); |
| 367 | + OPENVINO_THROW("invalid value"); |
370 | 368 | }
|
371 | 369 | } catch (ov::Exception&) {
|
372 | 370 | OPENVINO_THROW("Wrong value ",
|
@@ -462,10 +460,13 @@ void Config::updateProperties() {
|
462 | 460 |
|
463 | 461 | void Config::applyRtInfo(const std::shared_ptr<const ov::Model>& model) {
|
464 | 462 | // if user sets explicitly, it will be higher priority than rt_info
|
465 |
| - if (!kvCachePrecisionSetExplicitly && model->has_rt_info({"runtime_options", ov::hint::kv_cache_precision.name()})) { |
466 |
| - this->kvCachePrecision = model->get_rt_info<ov::element::Type>({"runtime_options", ov::hint::kv_cache_precision.name()}); |
| 463 | + if (!kvCachePrecisionSetExplicitly && |
| 464 | + model->has_rt_info({"runtime_options", ov::hint::kv_cache_precision.name()})) { |
| 465 | + this->kvCachePrecision = |
| 466 | + model->get_rt_info<ov::element::Type>({"runtime_options", ov::hint::kv_cache_precision.name()}); |
467 | 467 | }
|
468 |
| - if (!fcDynamicQuantizationGroupSizeSetExplicitly && model->has_rt_info({"runtime_options", ov::hint::dynamic_quantization_group_size.name()})) { |
| 468 | + if (!fcDynamicQuantizationGroupSizeSetExplicitly && |
| 469 | + model->has_rt_info({"runtime_options", ov::hint::dynamic_quantization_group_size.name()})) { |
469 | 470 | this->fcDynamicQuantizationGroupSize =
|
470 | 471 | model->get_rt_info<uint64_t>({"runtime_options", ov::hint::dynamic_quantization_group_size.name()});
|
471 | 472 | }
|
|
0 commit comments