@@ -21,32 +21,28 @@ typedef enum _rknpu2_cpu_name {
21
21
UNDEFINED,
22
22
} CpuName;
23
23
24
- /* ! RKNPU2 core mask for mobile device. */
24
+ /* The specification of NPU core setting.It has the following choices :
25
+ * RKNN_NPU_CORE_AUTO : Referring to automatic mode, meaning that it will
26
+ * select the idle core inside the NPU.
27
+ * RKNN_NPU_CORE_0 : Running on the NPU0 core.
28
+ * RKNN_NPU_CORE_1: Runing on the NPU1 core.
29
+ * RKNN_NPU_CORE_2: Runing on the NPU2 core.
30
+ * RKNN_NPU_CORE_0_1: Running on both NPU0 and NPU1 core simultaneously.
31
+ * RKNN_NPU_CORE_0_1_2: Running on both NPU0, NPU1 and NPU2 simultaneously.
32
+ */
25
33
typedef enum _rknpu2_core_mask {
26
- RKNN_NPU_CORE_AUTO = 0 , // < default, run on NPU core randomly.
27
- RKNN_NPU_CORE_0 = 1 , // < run on NPU core 0.
28
- RKNN_NPU_CORE_1 = 2 , // < run on NPU core 1.
29
- RKNN_NPU_CORE_2 = 4 , // < run on NPU core 2.
30
- RKNN_NPU_CORE_0_1 =
31
- RKNN_NPU_CORE_0 | RKNN_NPU_CORE_1, // < run on NPU core 1 and core 2.
32
- RKNN_NPU_CORE_0_1_2 =
33
- RKNN_NPU_CORE_0_1 | RKNN_NPU_CORE_2, // < run on NPU core 1 and core 2.
34
+ RKNN_NPU_CORE_AUTO = 0 ,
35
+ RKNN_NPU_CORE_0 = 1 ,
36
+ RKNN_NPU_CORE_1 = 2 ,
37
+ RKNN_NPU_CORE_2 = 4 ,
38
+ RKNN_NPU_CORE_0_1 = RKNN_NPU_CORE_0 | RKNN_NPU_CORE_1,
39
+ RKNN_NPU_CORE_0_1_2 = RKNN_NPU_CORE_0_1 | RKNN_NPU_CORE_2,
34
40
RKNN_NPU_CORE_UNDEFINED,
35
41
} CoreMask;
36
42
} // namespace rknpu2
37
43
38
44
struct RKNPU2BackendOption {
39
45
rknpu2::CpuName cpu_name = rknpu2::CpuName::RK3588;
40
-
41
- // The specification of NPU core setting.It has the following choices :
42
- // RKNN_NPU_CORE_AUTO : Referring to automatic mode, meaning that it will
43
- // select the idle core inside the NPU.
44
- // RKNN_NPU_CORE_0 : Running on the NPU0 core
45
- // RKNN_NPU_CORE_1: Runing on the NPU1 core
46
- // RKNN_NPU_CORE_2: Runing on the NPU2 core
47
- // RKNN_NPU_CORE_0_1: Running on both NPU0 and NPU1 core simultaneously.
48
- // RKNN_NPU_CORE_0_1_2: Running on both NPU0, NPU1 and NPU2 simultaneously.
49
46
rknpu2::CoreMask core_mask = rknpu2::CoreMask::RKNN_NPU_CORE_AUTO;
50
47
};
51
-
52
48
} // namespace fastdeploy
0 commit comments