selectdevice returns MULTI:device in cumulative_throughput (#11367)

* selectdevice returns MULTI:device in cumulative_throughput

* load multi with throughput and disable cpu helper in cumulative

* disable cpu helper in cumulative_throughput

* add cumulative to bechmark_app help message

* modify benchmark_app.hpp clang-format
This commit is contained in:
guozhong wang
2022-05-06 12:42:59 +08:00
committed by GitHub
parent caccde6a82
commit 0a65f5f607
7 changed files with 81 additions and 30 deletions

View File

@@ -72,8 +72,9 @@ Options:
-extensions "<absolute_path>" Required for custom layers (extensions). Absolute path to a shared library with the kernels implementations.
Or
-c "<absolute_path>" Required for GPU custom kernels. Absolute path to an .xml file with the kernels description.
-hint "performance hint (latency or throughput or none)" Optional. Performance hint allows the OpenVINO device to select the right network-specific settings.
-hint "performance hint (latency or throughput or cumulative_throughput or none)" Optional. Performance hint allows the OpenVINO device to select the right network-specific settings.
'throughput' or 'tput': device performance mode will be set to THROUGHPUT.
'cumulative_throughput' or 'ctput': device performance mode will be set to CUMULATIVE_THROUGHPUT.
'latency': device performance mode will be set to LATENCY.
'none': no device performance mode will be set.
Using explicit 'nstreams' or other device-specific options, please set hint to 'none'

View File

@@ -38,6 +38,8 @@ static const char model_message[] =
static const char hint_message[] =
"Optional. Performance hint allows the OpenVINO device to select the right network-specific settings.\n"
" 'throughput' or 'tput': device performance mode will be set to THROUGHPUT.\n"
" 'cumulative_throughput' or 'ctput': device performance mode will be set to "
"CUMULATIVE_THROUGHPUT.\n"
" 'latency': device performance mode will be set to LATENCY.\n"
" 'none': no device performance mode will be set.\n"
" Using explicit 'nstreams' or other device-specific options, please set hint to "
@@ -375,7 +377,8 @@ static void show_usage() {
std::cout << " -d \"<device>\" " << target_device_message << std::endl;
std::cout << " -extensions \"<absolute_path>\" " << custom_extensions_library_message << std::endl;
std::cout << " -c \"<absolute_path>\" " << custom_cldnn_message << std::endl;
std::cout << " -hint \"performance hint (latency or throughput or none)\" " << hint_message << std::endl;
std::cout << " -hint \"performance hint (latency or throughput or cumulative_throughput or none)\" "
<< hint_message << std::endl;
std::cout << " -api \"<sync/async>\" " << api_message << std::endl;
std::cout << " -niter \"<integer>\" " << iterations_count_message << std::endl;
std::cout << " -nireq \"<integer>\" " << infer_requests_count_message << std::endl;

View File

@@ -56,9 +56,9 @@ bool parse_and_check_command_line(int argc, char* argv[]) {
throw std::logic_error("Incorrect API. Please set -api option to `sync` or `async` value.");
}
if (!FLAGS_hint.empty() && FLAGS_hint != "throughput" && FLAGS_hint != "tput" && FLAGS_hint != "latency" &&
FLAGS_hint != "none") {
FLAGS_hint != "cumulative_throughput" && FLAGS_hint != "ctput" && FLAGS_hint != "none") {
throw std::logic_error("Incorrect performance hint. Please set -hint option to"
"`throughput`(tput), `latency' value or 'none'.");
"`throughput`(tput), `latency', 'cumulative_throughput'(ctput) value or 'none'.");
}
if (!FLAGS_report_type.empty() && FLAGS_report_type != noCntReport && FLAGS_report_type != averageCntReport &&
FLAGS_report_type != detailedCntReport) {
@@ -119,6 +119,9 @@ ov::hint::PerformanceMode get_performance_hint(const std::string& device, const
} else if (FLAGS_hint == "latency") {
slog::warn << "Device(" << device << ") performance hint is set to LATENCY" << slog::endl;
ov_perf_hint = ov::hint::PerformanceMode::LATENCY;
} else if (FLAGS_hint == "cumulative_throughput" || FLAGS_hint == "ctput") {
slog::warn << "Device(" << device << ") performance hint is set to CUMULATIVE_THROUGHPUT" << slog::endl;
ov_perf_hint = ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT;
} else if (FLAGS_hint == "none") {
slog::warn << "No device(" << device << ") performance hint is set" << slog::endl;
ov_perf_hint = ov::hint::PerformanceMode::UNDEFINED;