Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/python/det_keypoint_unite_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def main():
FLAGS = parser.parse_args()
print_arguments(FLAGS)
FLAGS.device = FLAGS.device.upper()
assert FLAGS.device in ['CPU', 'GPU', 'XPU'
assert FLAGS.device in ['CPU', 'GPU', 'XPU','METAX_GPU'
], "device should be CPU, GPU or XPU"

main()
4 changes: 3 additions & 1 deletion deploy/python/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,8 @@ def load_predictor(model_dir,
config.enable_custom_device('npu')
elif device == 'MLU':
config.enable_custom_device('mlu')
elif device == 'METAX_GPU':
config.enable_custom_device('metax_gpu')
elif device == 'GCU':
assert paddle.device.is_compiled_with_custom_device("gcu"), (
"Device cannot be set as GCU while your paddle "
Expand Down Expand Up @@ -1267,7 +1269,7 @@ def main():
FLAGS = parser.parse_args()
print_arguments(FLAGS)
FLAGS.device = FLAGS.device.upper()
assert FLAGS.device in ['CPU', 'GPU', 'XPU', 'NPU', 'MLU', 'GCU'
assert FLAGS.device in ['CPU', 'GPU', 'XPU', 'NPU', 'MLU', 'GCU','METAX_GPU'
], "device should be CPU, GPU, XPU, MLU, NPU or GCU"
assert not FLAGS.use_gpu, "use_gpu has been deprecated, please use --device"

Expand Down