Deprecated UNDEFINED values for execution / performance hints (#16563)
* Deprecated UNDEFINED values for execution / performance hints * Update src/tests/functional/plugin/gpu/shared_tests_instances/behavior/ov_plugin/properties_tests.cpp * Fixes * Fixes
This commit is contained in:
@@ -278,6 +278,8 @@ inline std::istream& operator>>(std::istream& is, Priority& priority) {
|
||||
priority = Priority::MEDIUM;
|
||||
} else if (str == "HIGH") {
|
||||
priority = Priority::HIGH;
|
||||
} else if (str == "DEFAULT") {
|
||||
priority = Priority::DEFAULT;
|
||||
} else {
|
||||
OPENVINO_THROW("Unsupported model priority: ", str);
|
||||
}
|
||||
@@ -297,7 +299,8 @@ static constexpr Property<Priority> model_priority{"MODEL_PRIORITY"};
|
||||
* @ingroup ov_runtime_cpp_prop_api
|
||||
*/
|
||||
enum class PerformanceMode {
|
||||
UNDEFINED = -1, //!< Undefined value, performance setting may vary from device to device
|
||||
UNDEFINED OPENVINO_ENUM_DEPRECATED("Please use actual value instead. Will be removed in 2024.0") =
|
||||
-1, //!< Undefined value, performance setting may vary from device to device
|
||||
LATENCY = 1, //!< Optimize for latency
|
||||
THROUGHPUT = 2, //!< Optimize for throughput
|
||||
CUMULATIVE_THROUGHPUT = 3, //!< Optimize for cumulative throughput
|
||||
@@ -306,8 +309,10 @@ enum class PerformanceMode {
|
||||
/** @cond INTERNAL */
|
||||
inline std::ostream& operator<<(std::ostream& os, const PerformanceMode& performance_mode) {
|
||||
switch (performance_mode) {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
case PerformanceMode::UNDEFINED:
|
||||
return os << "UNDEFINED";
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
case PerformanceMode::LATENCY:
|
||||
return os << "LATENCY";
|
||||
case PerformanceMode::THROUGHPUT:
|
||||
@@ -329,7 +334,9 @@ inline std::istream& operator>>(std::istream& is, PerformanceMode& performance_m
|
||||
} else if (str == "CUMULATIVE_THROUGHPUT") {
|
||||
performance_mode = PerformanceMode::CUMULATIVE_THROUGHPUT;
|
||||
} else if (str == "UNDEFINED") {
|
||||
OPENVINO_SUPPRESS_DEPRECATED_START
|
||||
performance_mode = PerformanceMode::UNDEFINED;
|
||||
OPENVINO_SUPPRESS_DEPRECATED_END
|
||||
} else {
|
||||
OPENVINO_THROW("Unsupported performance mode: ", str);
|
||||
}
|
||||
@@ -443,16 +450,13 @@ static constexpr Property<bool, PropertyMutability::RW> allow_auto_batching{"ALL
|
||||
* @ingroup ov_runtime_cpp_prop_api
|
||||
*/
|
||||
enum class ExecutionMode {
|
||||
UNDEFINED = -1, //!< Undefined value, settings may vary from device to device
|
||||
PERFORMANCE = 1, //!< Optimize for max performance
|
||||
PERFORMANCE = 1, //!< Optimize for max performance, may apply properties which slightly affect accuracy
|
||||
ACCURACY = 2, //!< Optimize for max accuracy
|
||||
};
|
||||
|
||||
/** @cond INTERNAL */
|
||||
inline std::ostream& operator<<(std::ostream& os, const ExecutionMode& mode) {
|
||||
switch (mode) {
|
||||
case ExecutionMode::UNDEFINED:
|
||||
return os << "UNDEFINED";
|
||||
case ExecutionMode::PERFORMANCE:
|
||||
return os << "PERFORMANCE";
|
||||
case ExecutionMode::ACCURACY:
|
||||
@@ -469,8 +473,6 @@ inline std::istream& operator>>(std::istream& is, ExecutionMode& mode) {
|
||||
mode = ExecutionMode::PERFORMANCE;
|
||||
} else if (str == "ACCURACY") {
|
||||
mode = ExecutionMode::ACCURACY;
|
||||
} else if (str == "UNDEFINED") {
|
||||
mode = ExecutionMode::UNDEFINED;
|
||||
} else {
|
||||
OPENVINO_THROW("Unsupported execution mode: ", str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user