Fix doc and comment 83/316683/1
authorKwanghoon Son <k.son@samsung.com>
Tue, 27 Aug 2024 02:13:52 +0000 (11:13 +0900)
committerKwanghoon Son <k.son@samsung.com>
Tue, 27 Aug 2024 02:13:52 +0000 (11:13 +0900)
[Version] 0.4.9

- Fix wrong description for comments.
- Fix callback -> function.

Change-Id: If006c273d4281d603de0e57ab0eba9085af1594c
Signed-off-by: Kwanghoon Son <k.son@samsung.com>
include/inference_engine_common.h
include/inference_engine_common_impl.h
include/inference_engine_common_profiler.h
packaging/inference-engine-interface.spec
src/inference_engine_common_impl.cpp

index 47695ec5568b9b30162b3c32cdd0d7456527cf2d..26d365eef317629478d9933512431f4665e2705a 100644 (file)
@@ -35,7 +35,7 @@ namespace Common
 
                /**
                 * @brief Set backend private data if needed.
-                * @details This callback passes a backend private data to a given backend.
+                * @details This function passes a backend private data to a given backend.
                 *                      I.e., ML Single API backend needs which tensor filter type of NNStreamer should be used such as NNFW or VIVANTE.
                 *
                 * @since_tizen 6.0
@@ -45,7 +45,7 @@ namespace Common
 
                /**
                 * @brief Set CLTuner configuration.
-                * @details This callback passes a given CLTuner configuration value to inference engine if the inference engine supports for CLTuner feature.
+                * @details This function passes a given CLTuner configuration value to inference engine if the inference engine supports for CLTuner feature.
                 *
                 * @since_tizen 6.5
                 * @param[in] cltuner This contains CLTuner configuration value. See inference_engine_cltuner structure and inference_engine_cltuner_mode_e enumeration.
@@ -55,7 +55,7 @@ namespace Common
                /**
                 * @brief Set target devices.
                 * @details See #inference_target_type_e
-                *          This callback passes given device types - CPU, GPU, CUSTOM or combinated one if a backend engine supports hybrid inferencea - to a backend engine.
+                *          This function passes given device types - CPU, GPU, CUSTOM or combinated one if a backend engine supports hybrid inferencea - to a backend engine.
                 *          Some backend engine can optimize a given NN model at graph level such as dropping operation or fusing operations targating
                 *          a given device or devices when the backend engine loads the NN model file.
                 *
@@ -66,7 +66,7 @@ namespace Common
 
                /**
                 * @brief Request to load model data with user-given model file information.
-                * @details This callback requests a backend engine to load given model files for inference.
+                * @details This function requests a backend engine to load given model files for inference.
                 *          The backend engine should load the given model files according to a given model file format.
                 *
                 * @since_tizen 6.0
@@ -78,13 +78,13 @@ namespace Common
 
                /**
                 * @brief Get input tensor buffers from a given backend engine.
-                * @details This callback requests a backend engine input tensor buffers.
+                * @details This function requests a backend engine input tensor buffers.
                 *          If the backend engine is able to allocate the input tensor buffers internally, then
                 *          it has to add the input tensor buffers to buffers vector. By doing this, upper layer
                 *          will request a inference with the input tensor buffers.
                 *          Otherwise, the backend engine should just return INFERENCE_ENGINE_ERROR_NONE so that
                 *          upper layer can allocate input tensor buffers according to input layer property.
-                *          As for the input layer property, you can see GetInputLyaerProperty callback.
+                *          As for the input layer property, you can see GetInputLyaerProperty function.
                 *
                 * @since_tizen 6.0
                 * @param[out] buffers A backend engine should add input tensor buffers allocated itself to buffers vector.
@@ -94,13 +94,13 @@ namespace Common
 
                /**
                 * @brief Get output tensor buffers from a given backend engine.
-                * @details This callback requests a backend engine output tensor buffers.
+                * @details This function requests a backend engine output tensor buffers.
                 *          If the backend engine is able to allocate the output tensor buffers internally, then
                 *          it has to add the output tensor buffers to buffers vector. By doing this, upper layer
                 *          will request a inference with the output tensor buffers.
                 *          Otherwise, the backend engine should just return INFERENCE_ENGINE_ERROR_NONE so that
                 *          upper layer can allocate output tensor buffers according to output layer property.
-                *          As for the output layer property, you can see GetOutputLyaerProperty callback.
+                *          As for the output layer property, you can see GetOutputLyaerProperty function.
                 *
                 * @since_tizen 6.0
                 * @param[out] buffers A backend engine should add output tensor buffers allocated itself to buffers vector.
@@ -110,10 +110,10 @@ namespace Common
 
                /**
                 * @brief Get input layer property information from a given backend engine.
-                * @details This callback requests a backend engine information about given layers by
-                *          SetInputTensorProperty callback.
+                * @details This function requests a backend engine information about given layers by
+                *          SetInputTensorProperty function.
                 *          If user wants to specify input layer that the backend engine starts from
-                *          then user can call SetInputTensorProperty callback with desired layer information.
+                *          then user can call SetInputTensorProperty function with desired layer information.
                 *          If user dosn't specify the input layer then the backend engine should add tensor information
                 *          of the first layer in model graph in default.
                 *
@@ -125,10 +125,10 @@ namespace Common
 
                /**
                 * @brief Get output layer property information from a given backend engine.
-                * @details This callback requests a backend engine information about given layers by
-                *          SetOutputTensorProperty callback.
+                * @details This function requests a backend engine information about given layers by
+                *          SetOutputTensorProperty function.
                 *          If user wants to specify output layer that the backend engine stores the inference result
-                *          then user can call SetOutputTensorProperty callback with desired layer information.
+                *          then user can call SetOutputTensorProperty function with desired layer information.
                 *          If user dosn't specify the output layer then the backend engine should add tensor information
                 *          of the last layer in model graph in default.
                 *
@@ -140,7 +140,7 @@ namespace Common
 
                /**
                 * @brief Set input layer property information to a given backend engine.
-                * @details This callback passes a given input layer information to a backend engine.
+                * @details This function passes a given input layer information to a backend engine.
                 *          If user wants to start the inference from some given layer in model graph.
                 *          The backend engine should keep the input layer found with the given information
                 *          in model graph and then set the layer as input layer.
@@ -153,7 +153,7 @@ namespace Common
 
                /**
                 * @brief Set output layer property information to a given backend engine.
-                * @details This callback passes a given output layer information to a backend engine.
+                * @details This function passes a given output layer information to a backend engine.
                 *          If user wants to start the inference from some given layer in model graph.
                 *          The backend engine should keep the output layer found with the given information
                 *          in model graph and then set the layer as output layer.
@@ -166,8 +166,8 @@ namespace Common
 
                /**
                 * @brief Get capacity from a given backend engine.
-                * @details This callback requests what supported features and constraints the backend engine has.
-                *          Upper layer should call this callback just after the backend engine library is loaded.
+                * @details This function requests what supported features and constraints the backend engine has.
+                *          Upper layer should call this function just after the backend engine library is loaded.
                 *
                 * @since_tizen 6.0
                 * @param[out] capacity A backend engine should add the features and constraints it has.
@@ -176,7 +176,7 @@ namespace Common
 
                /**
                 * @brief Run an inference with user-given input and output buffers.
-                * @details This callback requests a backend engine to do inference with given input and output tensor buffers.
+                * @details This function requests a backend engine to do inference with given input and output tensor buffers.
                 *          input and output tensor buffers can be allocated by either a backend engine or upper layer according to
                 *          backend engine. So upper layer needs to make sure to clean up the buffers.
                 *
index e3fad9184cb0b1f1976eea7532cbf7142b5495c9..97f28885d1eb9a1d6e4f4849d9de3911e734ffce 100644 (file)
@@ -53,7 +53,7 @@ namespace Common
 
                /**
                 * @brief Load a backend engine library with a given backend name.
-                * @details This callback loads a backend engine library with a given backend name.
+                * @details This function loads a backend engine library with a given backend name.
                 *          In order to find a backend engine library corresponding to the given backend name,
                 *          this function makes a full name of the library file with given backend name.
                 *          After that, it opens the library file by calling dlopen function to find a entry point
@@ -66,7 +66,7 @@ namespace Common
 
                /**
                 * @brief Unload a backend engine library.
-                * @details This callback unload a backend engine library.
+                * @details This function unload a backend engine library.
                 *
                 * @since_tizen 6.0
                 */
@@ -75,7 +75,7 @@ namespace Common
                /**
                 * @brief Set target devices.
                 * @details See #inference_target_type_e
-                *          This callback passes given device types - CPU, GPU, CUSTOM or combinated one if a backend engine supports hybrid inferencea - to a backend engine.
+                *          This function passes given device types - CPU, GPU, CUSTOM or combinated one if a backend engine supports hybrid inferencea - to a backend engine.
                 *          Some backend engine can optimize a given NN model at graph level such as dropping operation or fusing operations targating
                 *          a given device or devices when the backend engine loads the NN model file.
                 *
@@ -86,7 +86,7 @@ namespace Common
 
                /**
                 * @brief Set CLTuner configuration.
-                * @details This callback passes a given CLTuner configuration value to inference engine if the inference engine supports for CLTuner feature.
+                * @details This function passes a given CLTuner configuration value to inference engine if the inference engine supports for CLTuner feature.
                 *
                 * @since_tizen 6.5
                 * @param[in] cltuner This contains CLTuner configuration value. See inference_engine_cltuner structure and inference_engine_cltuner_mode_e enumeration.
@@ -95,7 +95,7 @@ namespace Common
 
                /**
                 * @brief Request to load model data with user-given model file information.
-                * @details This callback requests a backend engine to load given model files for inference.
+                * @details This function requests a backend engine to load given model files for inference.
                 *          The backend engine should load the given model files according to a given model file format.
                 *
                 * @since_tizen 6.0
@@ -107,13 +107,13 @@ namespace Common
 
                /**
                 * @brief Get input tensor buffers from a given backend engine.
-                * @details This callback requests a backend engine input tensor buffers.
+                * @details This function requests a backend engine input tensor buffers.
                 *          If the backend engine is able to allocate the input tensor buffers internally, then
                 *          it has to add the input tensor buffers to buffers vector. By doing this, upper layer
                 *          will request a inference with the input tensor buffers.
                 *          Otherwise, the backend engine should just return INFERENCE_ENGINE_ERROR_NONE so that
                 *          upper layer can allocate input tensor buffers according to input layer property.
-                *          As for the input layer property, you can see GetInputLyaerProperty callback.
+                *          As for the input layer property, you can see GetInputLyaerProperty function.
                 *
                 * @since_tizen 6.0
                 * @param[out] buffers A backend engine should add input tensor buffers allocated itself to buffers vector.
@@ -123,13 +123,13 @@ namespace Common
 
                /**
                 * @brief Get output tensor buffers from a given backend engine.
-                * @details This callback requests a backend engine output tensor buffers.
+                * @details This function requests a backend engine output tensor buffers.
                 *          If the backend engine is able to allocate the output tensor buffers internally, then
                 *          it has to add the output tensor buffers to buffers vector. By doing this, upper layer
                 *          will request a inference with the output tensor buffers.
                 *          Otherwise, the backend engine should just return INFERENCE_ENGINE_ERROR_NONE so that
                 *          upper layer can allocate output tensor buffers according to output layer property.
-                *          As for the output layer property, you can see GetOutputLyaerProperty callback.
+                *          As for the output layer property, you can see GetOutputLyaerProperty function.
                 *
                 * @since_tizen 6.0
                 * @param[out] buffers A backend engine should add output tensor buffers allocated itself to buffers vector.
@@ -139,10 +139,10 @@ namespace Common
 
                /**
                 * @brief Get input layer property information from a given backend engine.
-                * @details This callback requests a backend engine information about given layers by
-                *          SetInputTensorProperty callback.
+                * @details This function requests a backend engine information about given layers by
+                *          SetInputTensorProperty function.
                 *          If user wants to specify input layer that the backend engine starts from
-                *          then user can call SetInputTensorProperty callback with desired layer information.
+                *          then user can call SetInputTensorProperty function with desired layer information.
                 *          If user dosn't specify the input layer then the backend engine should add tensor information
                 *          of the first layer in model graph in default.
                 *
@@ -153,10 +153,10 @@ namespace Common
 
                /**
                 * @brief Get output layer property information from a given backend engine.
-                * @details This callback requests a backend engine information about given layers by
-                *          SetOutputTensorProperty callback.
+                * @details This function requests a backend engine information about given layers by
+                *          SetOutputTensorProperty function.
                 *          If user wants to specify output layer that the backend engine stores the inference result
-                *          then user can call SetOutputTensorProperty callback with desired layer information.
+                *          then user can call SetOutputTensorProperty function with desired layer information.
                 *          If user dosn't specify the output layer then the backend engine should add tensor information
                 *          of the last layer in model graph in default.
                 *
@@ -167,7 +167,7 @@ namespace Common
 
                /**
                 * @brief Set input layer property information to a given backend engine.
-                * @details This callback passes a given input layer information to a backend engine.
+                * @details This function passes a given input layer information to a backend engine.
                 *          If user wants to start the inference from some given layer in model graph.
                 *          The backend engine should keep the input layer found with the given information
                 *          in model graph and then set the layer as input layer.
@@ -179,7 +179,7 @@ namespace Common
 
                /**
                 * @brief Set output layer property information to a given backend engine.
-                * @details This callback passes a given output layer information to a backend engine.
+                * @details This function passes a given output layer information to a backend engine.
                 *          If user wants to start the inference from some given layer in model graph.
                 *          The backend engine should keep the output layer found with the given information
                 *          in model graph and then set the layer as output layer.
@@ -191,8 +191,8 @@ namespace Common
 
                /**
                 * @brief Get capacity from a given backend engine.
-                * @details This callback requests what supported features and constraints the backend engine has.
-                *          Upper layer should call this callback just after the backend engine library is loaded.
+                * @details This function requests what supported features and constraints the backend engine has.
+                *          Upper layer should call this function just after the backend engine library is loaded.
                 *
                 * @since_tizen 6.0
                 * @param[out] capacity A backend engine should add the features and constraints it has.
@@ -201,7 +201,7 @@ namespace Common
 
                /**
                 * @brief Run an inference with user-given input and output buffers.
-                * @details This callback requests a backend engine to do inference with given input and output tensor buffers.
+                * @details This function requests a backend engine to do inference with given input and output tensor buffers.
                 *          input and output tensor buffers can be allocated by either a backend engine or upper layer according to
                 *          backend engine. So upper layer needs to make sure to clean up the buffers.
                 *
index d4d785175ccb95a9cdb02458af23e7c738fa5cbc..06a1df30a94cc33671c012683df33e05abaf6c97 100644 (file)
@@ -122,7 +122,7 @@ namespace Profiler
 
                /**
                 * @brief Set backend name.
-                * @details It will be set in BindBackend callback of InferenceEngineCommon object
+                * @details It will be set in BindBackend function of InferenceEngineCommon object
                 *                      to indicate which backend - armnn, opencv, tflite or dldt - inference will be performed by.
                 *
                 * @since_tizen 6.0
@@ -135,7 +135,7 @@ namespace Profiler
 
                /**
                 * @brief Set model name.
-                * @details It will be set in Load callback of InferenceEngineCommon object to indicate which pre-trained model
+                * @details It will be set in Load function of InferenceEngineCommon object to indicate which pre-trained model
                 *                      the inference will be performed on.
                 *
                 * @since_tizen 6.0
@@ -148,7 +148,7 @@ namespace Profiler
 
                /**
                 * @brief Set taget devices the inference runs on.
-                * @details It will be set in SetTargetDevices callback of InferenceEngineCommon object to indicate
+                * @details It will be set in SetTargetDevices function of InferenceEngineCommon object to indicate
                 *                      which Hardware - CPU or GPU - the inference will be performed on.
                 *
                 * @since_tizen 6.0
@@ -161,7 +161,7 @@ namespace Profiler
 
                /**
                 * @brief Add inference env. information to a vector member, v_mProfileEnv.
-                * @details It will be called in Load callback of InferenceEngineCommon object to add inference env. information
+                * @details It will be called in Load function of InferenceEngineCommon object to add inference env. information
                 *                      updated already to the vector member, which will be used to get inference env. information
                 *                      when dumping profile data.
                 *
@@ -175,7 +175,7 @@ namespace Profiler
 
                /**
                 * @brief Start profiling with a given profile type.
-                * @details It will be called at top of a callback function of InferenceEngineCommon object to collect profile data.
+                * @details It will be called at top of a function function of InferenceEngineCommon object to collect profile data.
                 *
                 * @since_tizen 6.0
                 * @param[in] type Profile type which can be IR_PROFILER_LATENCY or IR_PROFILER_MEMORY for now.
@@ -184,7 +184,7 @@ namespace Profiler
 
                /**
                 * @brief Stop profiling to a given profile type.
-                * @details It will be called at bottom of a callback function of InferenceEngineCommon object to collect profile data.
+                * @details It will be called at bottom of a function function of InferenceEngineCommon object to collect profile data.
                 *
                 * @since_tizen 6.0
                 * @param[in] type Profile type which can be IR_PROFILER_LATENCY or IR_PROFILER_MEMORY for now.
index 5035ff3b31ad33d1237ed409ac4ff251caf0ead3..1bb6142816a6de85efd2fed5e956a376e3f15cbc 100644 (file)
@@ -1,6 +1,6 @@
 Name:        inference-engine-interface
 Summary:     Interface of inference engines
-Version:     0.4.8
+Version:     0.4.9
 Release:     0
 Group:       Multimedia/Framework
 License:     Apache-2.0
index a51ae074f134818d85c071a4ac2142cad89dcdb3..0d6b63e81ea41eab48711a1f9f94bb75a9dc64b3 100644 (file)
@@ -374,7 +374,7 @@ namespace Common
                }
 
                if (mUseProfiler == true) {
-                       // Memory usage will be measured between BindBackend ~ UnbindBackend callbacks.
+                       // Memory usage will be measured between BindBackend ~ UnbindBackend functions.
                        mProfiler.Start(IE_PROFILER_MEMORY);
                }
 
@@ -448,7 +448,7 @@ namespace Common
                LOGW("ENTER");
 
                if (mUseProfiler == true) {
-                       // Memory usage will be measured between BindBackend ~ UnbindBackend callbacks.
+                       // Memory usage will be measured between BindBackend ~ UnbindBackend functions.
                        mProfiler.Stop(IE_PROFILER_MEMORY);
                }
 
@@ -548,7 +548,7 @@ namespace Common
                }
 
                // If backend engine doesn't provide tensor buffers then just return.
-               // In this case, InferenceEngineCommon framework will allocate the tensor buffers.
+               // In this case, upper-layer should handle the tensor buffers.
                if (buffers.empty()) {
                        return ret;
                }
@@ -567,7 +567,7 @@ namespace Common
                }
 
                // If backend engine doesn't provide tensor buffers then just return.
-               // In this case, InferenceEngineCommon framework will allocate the tensor buffers.
+               // In this case, upper-layer should handle the tensor buffers.
                if (buffers.empty()) {
                        return ret;
                }