[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

@@ -54,7 +54,9 @@ class RuntimeOption:
def __init__(self):
self._option = C.RuntimeOption()
def set_model_path(self, model_path, params_path="",
def set_model_path(self,
model_path,
params_path="",
model_format=C.ModelFormat.PADDLE):
return self._option.set_model_path(model_path, params_path,
model_format)
@@ -98,6 +100,9 @@ class RuntimeOption:
def set_paddle_mkldnn_cache_size(self, cache_size):
return self._option.set_paddle_mkldnn_cache_size(cache_size)
def set_lite_power_mode(self, mode):
return self._option.set_lite_power_mode(mode)
def set_trt_input_shape(self,
tensor_name,
min_shape,