From 3e303f016b9ae35848fdf8bba9b7f395e8240f5d Mon Sep 17 00:00:00 2001 From: Kate Generalova Date: Fri, 28 May 2021 13:32:58 +0300 Subject: [PATCH] samples: hide -we_gen and remove -l options for C++ speech (#5840) * samples: hide and remove options for C++ speech * sample: revert -we option --- inference-engine/samples/speech_sample/README.md | 7 ++----- inference-engine/samples/speech_sample/main.cpp | 7 ------- inference-engine/samples/speech_sample/speech_sample.hpp | 8 +------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/inference-engine/samples/speech_sample/README.md b/inference-engine/samples/speech_sample/README.md index 91365bd6c60dde..293f3240f645e9 100644 --- a/inference-engine/samples/speech_sample/README.md +++ b/inference-engine/samples/speech_sample/README.md @@ -10,7 +10,6 @@ Automatic Speech Recognition C++ sample application demonstrates how to use the |:--- |:--- |:--- |Inference Engine Version| `InferenceEngine::GetInferenceEngineVersion` | Get Inference Engine API version |Available Devices|`InferenceEngine::Core::GetAvailableDevices`| Get version information of the devices for inference -|Custom Extension Kernels|`InferenceEngine::Core::AddExtension`| Load extension library to the device plugin | Network Operations | `InferenceEngine::CNNNetwork::setBatchSize`, `InferenceEngine::CNNNetwork::getBatchSize` | Managing of network, operate with its batch size. |Network Operations|`InferenceEngine::CNNNetwork::addOutput`| Change names of output layers in the network |Import Network|`InferenceEngine::ExecutableNetwork::Export`,`InferenceEngine::Core::ImportNetwork`| Creates an executable network from a previously exported network @@ -72,8 +71,7 @@ Several execution modes are supported via the `-d` flag: #### Loading and Saving Models -The GNA plugin supports loading and saving of the GNA-optimized model (non-IR) via the `-rg` and `-wg` flags. Thereby, it is possible to avoid the cost of full model quantization at run time. The GNA plugin also -supports export of firmware-compatible embedded model images for the IntelĀ® Speech Enabling Developer Kit and Amazon Alexa* Premium Far-Field Voice Development Kit via the `-we` flag (save only). +The GNA plugin supports loading and saving of the GNA-optimized model (non-IR) via the `-rg` and `-wg` flags. Thereby, it is possible to avoid the cost of full model quantization at run time. The GNA plugin also supports export of firmware-compatible embedded model images for the IntelĀ® Speech Enabling Developer Kit and Amazon Alexa* Premium Far-Field Voice Development Kit via the `-we` flag (save only). In addition to performing inference directly from a GNA model file, these options make it possible to: @@ -104,7 +102,6 @@ Options: -i "" Required. Paths to .ark files. Example of usage: or . -m "" Required. Path to an .xml file with a trained model (required if -rg is missing). -o "" Optional. Output file name to save ark scores. - -l "" Required for CPU custom layers. Absolute path to a shared library with the kernel implementations. -d "" Optional. Specify a target device to infer on. CPU, GPU, MYRIAD, GNA_AUTO, GNA_HW, GNA_SW_FP32, GNA_SW_EXACT and HETERO with combination of GNA as the primary device and CPU as a secondary (e.g. HETERO:GNA,CPU) are supported. The list of available devices is shown below. The sample will look for a suitable plugin for device specified. -pc Optional. Enables per-layer performance report. @@ -160,7 +157,7 @@ Once the IR is created, you can use the following command to do inference on Int ``` Here, the floating point Kaldi-generated reference neural network scores (`dev93_scores_10.ark`) corresponding to the input feature file (`dev93_10.ark`) are assumed to be available -for comparison. +for comparison. All of them can be downloaded from [https://storage.openvinotoolkit.org/models_contrib/speech/2021.2/wsj_dnn5b_smbr](https://storage.openvinotoolkit.org/models_contrib/speech/2021.2/wsj_dnn5b_smbr). Inference Engine Intermediate Representation `wsj_dnn5b.xml` file was generated in the previous [Model Preparation](#model-preparation) section. diff --git a/inference-engine/samples/speech_sample/main.cpp b/inference-engine/samples/speech_sample/main.cpp index 3c883e3bf643aa..4d0e82d5347025 100644 --- a/inference-engine/samples/speech_sample/main.cpp +++ b/inference-engine/samples/speech_sample/main.cpp @@ -663,13 +663,6 @@ int main(int argc, char* argv[]) { CNNNetwork network; ExecutableNetwork executableNet; - if (!FLAGS_l.empty()) { - // Custom CPU extension is loaded as a shared library and passed as a pointer to base extension - IExtensionPtr extension_ptr = std::make_shared(FLAGS_l); - ie.AddExtension(extension_ptr); - slog::info << "Custom Extension loaded: " << FLAGS_l << slog::endl; - } - // ------------------------------ Get Available Devices ------------------------------------------------------ auto isFeature = [&](const std::string xFeature) { return FLAGS_d.find(xFeature) != std::string::npos; diff --git a/inference-engine/samples/speech_sample/speech_sample.hpp b/inference-engine/samples/speech_sample/speech_sample.hpp index 9ae11ecb47c8b4..9e8358e4baea97 100644 --- a/inference-engine/samples/speech_sample/speech_sample.hpp +++ b/inference-engine/samples/speech_sample/speech_sample.hpp @@ -132,10 +132,6 @@ DEFINE_string(compile_target, "", compile_target_message); /// \brief Enable per-layer performance report DEFINE_bool(pc, false, performance_counter_message); -/// @brief Absolute path to CPU library with user layers
-/// It is an optional parameter -DEFINE_string(l, "", custom_cpu_library_message); - /// @brief Write output file to save ark scores DEFINE_string(o, "", output_message); @@ -151,7 +147,7 @@ DEFINE_string(wg, "", write_gna_model_message); /// @brief Write GNA embedded model to file (model.bin) DEFINE_string(we, "", write_embedded_model_message); -/// @brief Optional GNA embedded device generation (default GNA1 aka Sue Creek) +/// @brief Optional GNA embedded device generation (default GNA1 aka Sue Creek) - hide option DEFINE_string(we_gen, "GNA1", write_embedded_model_generation_message); /// @brief Input quantization mode (default static) @@ -196,7 +192,6 @@ static void showUsage() { std::cout << " -i \"\" " << input_message << std::endl; std::cout << " -m \"\" " << model_message << std::endl; std::cout << " -o \"\" " << output_message << std::endl; - std::cout << " -l \"\" " << custom_cpu_library_message << std::endl; std::cout << " -d \"\" " << target_device_message << std::endl; std::cout << " -pc " << performance_counter_message << std::endl; std::cout << " -q \"\" " << quantization_message << std::endl; @@ -207,7 +202,6 @@ static void showUsage() { std::cout << " -rg \"\" " << read_gna_model_message << std::endl; std::cout << " -wg \"\" " << write_gna_model_message << std::endl; std::cout << " -we \"\" " << write_embedded_model_message << std::endl; - std::cout << " -we_gen \"\" " << write_embedded_model_generation_message << std::endl; std::cout << " -nthreads \"\" " << infer_num_threads_message << std::endl; std::cout << " -cw_l \"\" " << context_window_message_l << std::endl; std::cout << " -cw_r \"\" " << context_window_message_r << std::endl;