diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 8260041cce762d..3dc92ccd7cee81 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -28,41 +28,10 @@ #include "remote_tensors_filling.hpp" #include "statistics_report.hpp" #include "utils.hpp" - -#if defined(_WIN32) || defined(WIN32) -# include -#endif // clang-format on static const size_t progressBarDefaultTotalCount = 1000; -std::string get_console_command(int argc, char* argv[]) { - std::stringstream args_command; - -#if defined(_WIN32) || defined(WIN32) - std::string relative_path(argv[0]); - std::vector buffer; - - uint32_t len = 1; - do { - buffer.resize(len); - len = GetFullPathNameA(relative_path.data(), len, buffer.data(), nullptr); - } while (len > buffer.size()); - - std::string full_path(buffer.begin(), buffer.end()); - args_command << full_path; -#else - args_command << realpath(argv[0], nullptr); -#endif - args_command << " "; - - for (int i = 1; i < argc; i++) { - args_command << argv[i] << " "; - } - - return args_command.str(); -} - bool parse_and_check_command_line(int argc, char* argv[]) { // ---------------------------Parsing and validating input // arguments-------------------------------------- @@ -224,19 +193,12 @@ int main(int argc, char* argv[]) { // ----------------- 1. Parsing and validating input arguments // ------------------------------------------------- - - // Must be executed before parse_and_check_command_line() - // gflags::ParseCommandLineNonHelpFlags() modifies the argv array - auto command_from_args = get_console_command(argc, argv); - next_step(); if (!parse_and_check_command_line(argc, argv)) { return 0; } - slog::info << "Input command: " << command_from_args << slog::endl; - bool isNetworkCompiled = fileExt(FLAGS_m) == "blob"; if (isNetworkCompiled) { slog::info << "Model is compiled" << slog::endl; diff --git a/tools/benchmark_tool/openvino/tools/benchmark/main.py b/tools/benchmark_tool/openvino/tools/benchmark/main.py index 5ef1c1779f3c67..ff64674a2fdb29 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/main.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/main.py @@ -36,10 +36,10 @@ def arg_not_empty(arg_value,empty_value): raise Exception("-nstreams, -nthreads and -pin options are fine tune options. To use them you " \ "should explicitely set -hint option to none. This is not OpenVINO limitation " \ "(those options can be used in OpenVINO together), but a benchmark_app UI rule.") - + if args.report_type == "average_counters" and "MULTI" in args.target_device: raise Exception("only detailed_counters report type is supported for MULTI device") - + _, ext = os.path.splitext(args.path_to_model) is_network_compiled = True if ext == BLOB_EXTENSION else False is_precisiton_set = not (args.input_precision == "" and args.output_precision == "" and args.input_output_precision == "") @@ -48,21 +48,16 @@ def arg_not_empty(arg_value,empty_value): raise Exception("Cannot set precision for a compiled model. " \ "Please re-compile your model with required precision " \ "using compile_tool") - + return args, is_network_compiled def main(): statistics = None try: # ------------------------------ 1. Parsing and validating input arguments ------------------------------ - args_string = f"{os.path.realpath(sys.argv[0])} " - for i in range(1,len(sys.argv)): - args_string += f"{sys.argv[i]} " - next_step() logger.info("Parsing input parameters") args, is_network_compiled = parse_and_check_command_line() - logger.info(f"Input command: {args_string}") command_line_arguments = get_command_line_arguments(sys.argv) if args.report_type: @@ -509,7 +504,7 @@ def set_throughput_streams(): total_sorted_list = print_perf_counters_sort(perfs_count_list,sort_flag=args.perf_counts_sort) if statistics: statistics.dump_performance_counters_sorted(total_sorted_list) - + elif args.perf_counts: print_perf_counters(perfs_count_list)