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':
import paddle_custom_device.gcu.passes as gcu_passes
config.enable_custom_device('gcu')
Expand Down Expand Up @@ -1263,7 +1265,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
1 change: 0 additions & 1 deletion deploy/python/keypoint_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def predict_image(self,
self.det_times.inference_time_s.start()
result = self.predict(repeats=repeats)
self.det_times.inference_time_s.end(repeats=repeats)

# postprocess
result_warmup = self.postprocess(inputs, result) # warmup
self.det_times.postprocess_time_s.start()
Expand Down