add custom device capacity for SNPE engine 20/269220/2
authorInki Dae <inki.dae@samsung.com>
Tue, 11 Jan 2022 11:29:44 +0000 (20:29 +0900)
committerInki Dae <inki.dae@samsung.com>
Tue, 11 Jan 2022 11:36:02 +0000 (20:36 +0900)
[Version] : 0.4.1-0
[Issue type] : bug fix

Added custom device capacity for SNPE engine. SNPE engine supports
inference on DSP device.

Change-Id: I6561916a7debbb874fb40455437ba7eb6c074a90
Signed-off-by: Inki Dae <inki.dae@samsung.com>
packaging/inference-engine-mlapi.spec
src/inference_engine_mlapi.cpp

index 8f06c9c..576c91e 100644 (file)
@@ -1,7 +1,7 @@
 Name:       inference-engine-mlapi
 Summary:    ML Single API backend of NNStreamer for MediaVision
-Version:    0.4.0
-Release:    1
+Version:    0.4.1
+Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
 ExclusiveArch: %{arm} aarch64
index c5ef761..9cba2da 100644 (file)
@@ -697,12 +697,19 @@ namespace MLAPIImpl
                        return INFERENCE_ENGINE_ERROR_INVALID_PARAMETER;
                }
 
-               // TODO. flag supported accel device types according to a given ML Single API of nnstreamer backend.
-               if (mPluginType == INFERENCE_BACKEND_NPU_VIVANTE) {
+               switch (mPluginType) {
+               case INFERENCE_BACKEND_NPU_VIVANTE:
                        capacity->supported_accel_devices = INFERENCE_TARGET_CUSTOM;
-               } else {
+                       break;
+               case INFERENCE_BACKEND_SNPE:
+                       capacity->supported_accel_devices = INFERENCE_TARGET_GPU |
+                                                                                               INFERENCE_TARGET_CPU |
+                                                                                               INFERENCE_TARGET_CUSTOM;
+                       break;
+               default:
                        capacity->supported_accel_devices = INFERENCE_TARGET_GPU |
                                                                                                INFERENCE_TARGET_CPU;
+                       break;
                }
 
                LOGI("LEAVE");