support max_profiling_buffer_entries
This commit is contained in:
parent
0e989df426
commit
bdc5846c58
@ -184,7 +184,8 @@ void RunInference(Settings* s) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
profiling::Profiler* profiler = new profiling::Profiler();
|
profiling::Profiler* profiler =
|
||||||
|
new profiling::Profiler(s->max_profiling_buffer_entries);
|
||||||
interpreter->SetProfiler(profiler);
|
interpreter->SetProfiler(profiler);
|
||||||
|
|
||||||
if (s->profiling) profiler->StartProfiling();
|
if (s->profiling) profiler->StartProfiling();
|
||||||
@ -287,12 +288,13 @@ int Main(int argc, char** argv) {
|
|||||||
{"input_mean", required_argument, nullptr, 'b'},
|
{"input_mean", required_argument, nullptr, 'b'},
|
||||||
{"input_std", required_argument, nullptr, 's'},
|
{"input_std", required_argument, nullptr, 's'},
|
||||||
{"num_results", required_argument, nullptr, 'r'},
|
{"num_results", required_argument, nullptr, 'r'},
|
||||||
|
{"max_profiling_buffer_entries", required_argument, nullptr, 'e'},
|
||||||
{nullptr, 0, nullptr, 0}};
|
{nullptr, 0, nullptr, 0}};
|
||||||
|
|
||||||
/* getopt_long stores the option index here. */
|
/* getopt_long stores the option index here. */
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
|
|
||||||
c = getopt_long(argc, argv, "a:b:c:f:i:l:m:p:r:s:t:v:", long_options,
|
c = getopt_long(argc, argv, "a:b:c:e:f:i:l:m:p:r:s:t:v:", long_options,
|
||||||
&option_index);
|
&option_index);
|
||||||
|
|
||||||
/* Detect the end of the options. */
|
/* Detect the end of the options. */
|
||||||
@ -309,6 +311,10 @@ int Main(int argc, char** argv) {
|
|||||||
s.loop_count =
|
s.loop_count =
|
||||||
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
|
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
s.max_profiling_buffer_entries =
|
||||||
|
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
s.allow_fp16 =
|
s.allow_fp16 =
|
||||||
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
|
strtol(optarg, nullptr, 10); // NOLINT(runtime/deprecated_fn)
|
||||||
|
@ -36,6 +36,7 @@ struct Settings {
|
|||||||
string input_layer_type = "uint8_t";
|
string input_layer_type = "uint8_t";
|
||||||
int number_of_threads = 4;
|
int number_of_threads = 4;
|
||||||
int number_of_results = 5;
|
int number_of_results = 5;
|
||||||
|
int max_profiling_buffer_entries = 1024;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace label_image
|
} // namespace label_image
|
||||||
|
Loading…
Reference in New Issue
Block a user