From eaa0a68fdb892a104f3831087b33fb83b5c47bd4 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 28 Jan 2022 18:52:50 +0300 Subject: [PATCH] Updated on OV 2.0 properties (#9906) --- src/inference/include/openvino/runtime/properties.hpp | 7 ++++--- src/inference/src/any_copy.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/inference/include/openvino/runtime/properties.hpp b/src/inference/include/openvino/runtime/properties.hpp index 462bb9f5bc8..d40620248bb 100644 --- a/src/inference/include/openvino/runtime/properties.hpp +++ b/src/inference/include/openvino/runtime/properties.hpp @@ -292,7 +292,7 @@ namespace log { * @brief Enum to define possible log levels */ enum class Level { - NO = -1, //!< disable any loging + NO = -1, //!< disable any logging ERR = 0, //!< error events that might still allow the application to continue running WARNING = 1, //!< potentially harmful situations which may further lead to ERROR INFO = 2, //!< informational messages that display the progress of the application at coarse-grained level @@ -304,7 +304,7 @@ enum class Level { inline std::ostream& operator<<(std::ostream& os, const Level& level) { switch (level) { case Level::NO: - return os << "NO"; + return os << "LOG_NONE"; case Level::ERR: return os << "LOG_ERROR"; case Level::WARNING: @@ -323,7 +323,7 @@ inline std::ostream& operator<<(std::ostream& os, const Level& level) { inline std::istream& operator>>(std::istream& is, Level& level) { std::string str; is >> str; - if (str == "NO") { + if (str == "LOG_NONE") { level = Level::NO; } else if (str == "LOG_ERROR") { level = Level::ERR; @@ -556,6 +556,7 @@ constexpr static const auto FP32 = "FP32"; //!< Device suppor constexpr static const auto BF16 = "BF16"; //!< Device supports bf16 inference constexpr static const auto FP16 = "FP16"; //!< Device supports fp16 inference constexpr static const auto INT8 = "INT8"; //!< Device supports int8 inference +constexpr static const auto INT16 = "INT16"; //!< Device supports int16 inference constexpr static const auto BIN = "BIN"; //!< Device supports binary inference constexpr static const auto WINOGRAD = "WINOGRAD"; //!< Device supports winograd optimization constexpr static const auto EXPORT_IMPORT = "EXPORT_IMPORT"; //!< Device supports model export and import diff --git a/src/inference/src/any_copy.cpp b/src/inference/src/any_copy.cpp index 64363e90687..17f1c94bbc6 100644 --- a/src/inference/src/any_copy.cpp +++ b/src/inference/src/any_copy.cpp @@ -6,13 +6,14 @@ #include +#include "ie_plugin_config.hpp" #include "openvino/runtime/properties.hpp" namespace ov { std::map any_copy(const ov::AnyMap& params) { std::function to_config_string = [&](const Any& any) -> std::string { if (any.is()) { - return any.as() ? "YES" : "NO"; + return any.as() ? CONFIG_VALUE(YES) : CONFIG_VALUE(NO); } else if (any.is()) { std::stringstream strm; for (auto&& val : any.as()) { @@ -40,9 +41,9 @@ void any_lexical_cast(const ov::Any& from, ov::Any& to) { if (to.is()) { to = from; } else if (to.is()) { - if (str == "YES") { + if (str == CONFIG_VALUE(YES)) { to = true; - } else if (str == "NO") { + } else if (str == CONFIG_VALUE(NO)) { to = false; } else { OPENVINO_UNREACHABLE("Unsupported lexical cast to bool from: ", str);