diff --git a/tools/benchmark_tool/openvino/tools/benchmark/parameters.py b/tools/benchmark_tool/openvino/tools/benchmark/parameters.py index 9463cebe633..29ea79376d8 100644 --- a/tools/benchmark_tool/openvino/tools/benchmark/parameters.py +++ b/tools/benchmark_tool/openvino/tools/benchmark/parameters.py @@ -98,7 +98,7 @@ def parse_args(): 'Also, using nstreams>1 is inherently throughput-oriented option, while for the best-latency ' 'estimations the number of streams should be set to 1. ' 'See samples README for more details.') - args.add_argument('--latency_percentile', type=int, required=False, default=50, choices=range(1,101), + args.add_argument('--latency_percentile', type=int, required=False, default=50, help='Optional. Defines the percentile to be reported in latency metric. The valid range is [1, 100]. The default value is 50 (median).') args.add_argument('-nthreads', '--number_threads', type=int, required=False, default=None, help='Number of threads to use for inference on the CPU, GNA ' @@ -159,4 +159,8 @@ def parse_args(): "Example: -imean data[255,255,255],info[255,255,255]\n") parsed_args = parser.parse_args() + if parsed_args.latency_percentile < 0 or parsed_args.latency_percentile > 100: + parser.print_help() + raise RuntimeError("The percentile value is incorrect. The applicable values range is [1, 100].") + return parsed_args