mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-24 00:53:22 +08:00
Rename CANN to Ascend
This commit is contained in:
@@ -283,10 +283,10 @@ class RuntimeOption:
|
||||
rknpu2_core=rknpu2.CoreMask.RKNN_NPU_CORE_0):
|
||||
return self._option.use_rknpu2(rknpu2_name, rknpu2_core)
|
||||
|
||||
def use_cann(self):
|
||||
def use_ascend(self):
|
||||
"""Inference with Huawei Ascend NPU
|
||||
"""
|
||||
return self._option.use_cann()
|
||||
return self._option.use_ascend()
|
||||
|
||||
def set_cpu_thread_num(self, thread_num=-1):
|
||||
"""Set number of threads if inference with CPU
|
||||
@@ -342,47 +342,44 @@ class RuntimeOption:
|
||||
"""
|
||||
return self.use_lite_backend()
|
||||
|
||||
def set_lite_nnadapter_device_names(self, device_names):
|
||||
def set_lite_device_names(self, device_names):
|
||||
"""Set nnadapter device name for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_device_names(device_names)
|
||||
return self._option.set_lite_device_names(device_names)
|
||||
|
||||
def set_lite_nnadapter_context_properties(self, context_properties):
|
||||
def set_lite_context_properties(self, context_properties):
|
||||
"""Set nnadapter context properties for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_context_properties(
|
||||
context_properties)
|
||||
return self._option.set_lite_context_properties(context_properties)
|
||||
|
||||
def set_lite_nnadapter_model_cache_dir(self, model_cache_dir):
|
||||
def set_lite_model_cache_dir(self, model_cache_dir):
|
||||
"""Set nnadapter model cache dir for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_model_cache_dir(model_cache_dir)
|
||||
return self._option.set_lite_model_cache_dir(model_cache_dir)
|
||||
|
||||
def set_lite_nnadapter_dynamic_shape_info(self, dynamic_shape_info):
|
||||
def set_lite_dynamic_shape_info(self, dynamic_shape_info):
|
||||
""" Set nnadapter dynamic shape info for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_dynamic_shape_info(
|
||||
dynamic_shape_info)
|
||||
return self._option.set_lite_dynamic_shape_info(dynamic_shape_info)
|
||||
|
||||
def set_lite_nnadapter_subgraph_partition_path(self,
|
||||
subgraph_partition_path):
|
||||
def set_lite_subgraph_partition_path(self, subgraph_partition_path):
|
||||
""" Set nnadapter subgraph partition path for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_subgraph_partition_path(
|
||||
return self._option.set_lite_subgraph_partition_path(
|
||||
subgraph_partition_path)
|
||||
|
||||
def set_lite_nnadapter_subgraph_partition_config_buffer(
|
||||
self, subgraph_partition_buffer):
|
||||
def set_lite_subgraph_partition_config_buffer(self,
|
||||
subgraph_partition_buffer):
|
||||
""" Set nnadapter subgraph partition buffer for Paddle Lite backend.
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_subgraph_partition_config_buffer(
|
||||
return self._option.set_lite_subgraph_partition_config_buffer(
|
||||
subgraph_partition_buffer)
|
||||
|
||||
def set_lite_nnadapter_mixed_precision_quantization_config_path(
|
||||
def set_lite_mixed_precision_quantization_config_path(
|
||||
self, mixed_precision_quantization_config_path):
|
||||
""" Set nnadapter mixed precision quantization config path for Paddle Lite backend..
|
||||
"""
|
||||
return self._option.set_lite_nnadapter_mixed_precision_quantization_config_path(
|
||||
return self._option.set_lite_mixed_precision_quantization_config_path(
|
||||
mixed_precision_quantization_config_path)
|
||||
|
||||
def set_paddle_mkldnn(self, use_mkldnn=True):
|
||||
|
||||
@@ -56,8 +56,7 @@ if os.getenv("BUILD_ON_CPU", "OFF") == "ON":
|
||||
setup_configs = dict()
|
||||
setup_configs["ENABLE_RKNPU2_BACKEND"] = os.getenv("ENABLE_RKNPU2_BACKEND",
|
||||
"OFF")
|
||||
setup_configs["WITH_CANN"] = os.getenv("WITH_CANN", "OFF")
|
||||
setup_configs["WITH_CANN_PY"] = os.getenv("WITH_CANN_PY", "OFF")
|
||||
setup_configs["WITH_ASCEND_PYTHON"] = os.getenv("WITH_ASCEND_PYTHON", "OFF")
|
||||
setup_configs["ENABLE_ORT_BACKEND"] = os.getenv("ENABLE_ORT_BACKEND", "OFF")
|
||||
setup_configs["ENABLE_OPENVINO_BACKEND"] = os.getenv("ENABLE_OPENVINO_BACKEND",
|
||||
"OFF")
|
||||
|
||||
Reference in New Issue
Block a user