mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-20 07:24:42 +08:00
Move ascend python demo
This commit is contained in:
@@ -17,7 +17,8 @@ def parse_arguments():
|
||||
"--device",
|
||||
type=str,
|
||||
default='cpu',
|
||||
help="Type of inference device, support 'cpu' or 'gpu' or 'ipu'.")
|
||||
help="Type of inference device, support 'cpu' or 'gpu' or 'ipu' or 'xpu' or 'ascend' ."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--use_trt",
|
||||
type=ast.literal_eval,
|
||||
@@ -38,6 +39,9 @@ def build_option(args):
|
||||
if args.device.lower() == "xpu":
|
||||
option.use_xpu()
|
||||
|
||||
if args.device.lower() == "ascend":
|
||||
option.use_ascend()
|
||||
|
||||
if args.use_trt:
|
||||
option.use_trt_backend()
|
||||
return option
|
||||
|
Reference in New Issue
Block a user