[GNA] Deprecate GNA_LIB_N_THREADS and SINGLE_THREAD parameters + sample update (#9637)

* Deprecate GNA_LIB_N_THREADS and SINGLE_THREAD parameters

* Remove deprecated options from sample

* Fix speech sample test

* Adds doxy deprecated comment
This commit is contained in:
Nadezhda Ageeva
2022-01-14 12:20:36 +03:00
committed by GitHub
parent 645c44459c
commit 12ab842970
15 changed files with 52 additions and 125 deletions

View File

@@ -99,13 +99,13 @@ static const char infer_num_threads_message[] = "Optional. Number of threads to
static const char context_window_message_l[] =
"Optional. Number of frames for left context windows (default is 0). "
"Works only with context window networks."
" If you use the cw_l or cw_r flag, then batch size and nthreads arguments are ignored.";
" If you use the cw_l or cw_r flag, then batch size argument is ignored.";
/// @brief message for right context window argument
static const char context_window_message_r[] =
"Optional. Number of frames for right context windows (default is 0). "
"Works only with context window networks."
" If you use the cw_r or cw_l flag, then batch size and nthreads arguments are ignored.";
" If you use the cw_r or cw_l flag, then batch size argument is ignored.";
/// @brief message for output layer names
static const char output_layer_names_message[] = "Optional. Layer names for output blobs. "
@@ -214,7 +214,6 @@ static void showUsage() {
std::cout << " -rg \"<path>\" " << read_gna_model_message << std::endl;
std::cout << " -wg \"<path>\" " << write_gna_model_message << std::endl;
std::cout << " -we \"<path>\" " << write_embedded_model_message << std::endl;
std::cout << " -nthreads \"<integer>\" " << infer_num_threads_message << std::endl;
std::cout << " -cw_l \"<integer>\" " << context_window_message_l << std::endl;
std::cout << " -cw_r \"<integer>\" " << context_window_message_r << std::endl;
std::cout << " -oname \"<string>\" " << output_layer_names_message << std::endl;
@@ -297,10 +296,6 @@ bool ParseAndCheckCommandLine(int argc, char* argv[]) {
throw std::logic_error("Only 8 or 16 bits supported.");
}
if (FLAGS_nthreads <= 0) {
throw std::logic_error("Invalid value for 'nthreads' argument. It must be greater that or equal to 0");
}
if (FLAGS_cw_r < 0) {
throw std::logic_error("Invalid value for 'cw_r' argument. It must be greater than or equal to 0");
}