[lite] Add threads and power_mode option support (#298)

* [cmake] support Android arm64-v8a & armeabi-v7a native c++ sdk

* [cmake] fixed patchelf download on mac and android

* [lite] Add threads and power_mode option support

* [pybind] update runtime pybind for lite power mode

* [python] Add set_lite_power_mode api to runtime
This commit is contained in:
DefTruth
2022-09-28 18:09:35 +08:00
committed by GitHub
parent 5e9a5755fd
commit c5f85de356
6 changed files with 66 additions and 16 deletions

View File

@@ -25,6 +25,18 @@
namespace fastdeploy {
struct LiteBackendOption {
// cpu num threads
int threads = 1;
// lite power mode
// 0: LITE_POWER_HIGH
// 1: LITE_POWER_LOW
// 2: LITE_POWER_FULL
// 3: LITE_POWER_NO_BIND
// 4: LITE_POWER_RAND_HIGH
// 5: LITE_POWER_RAND_LOW
int power_mode = 0;
// TODO(qiuyanjun): support more options for lite backend.
// Such as fp16, different device target (kARM/kXPU/kNPU/...)
};
// Convert data type from paddle lite to fastdeploy