Move ascend python demo

This commit is contained in:
yunyaoXYY
2022-12-20 12:14:16 +00:00
parent e0f91719f4
commit 4373450019
5 changed files with 9 additions and 77 deletions

View File

@@ -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