Skip to content

Commit 4351ce8

Browse files
authored
Rename PaddleBackend to PaddleInferBackend (PaddlePaddle#728)
1 parent eea4320 commit 4351ce8

File tree

25 files changed

+34
-34
lines changed

25 files changed

+34
-34
lines changed

examples/multimodal/stable_diffusion/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ def create_paddle_inference_runtime(model_dir,
120120
use_fp16=False,
121121
device_id=0):
122122
option = fd.RuntimeOption()
123-
option.use_paddle_backend()
123+
option.use_paddle_infer_backend()
124124
if device_id == -1:
125125
option.use_cpu()
126126
else:

examples/runtime/cpp/infer_paddle_paddle_inference.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int main(int argc, char* argv[]) {
2424
fd::RuntimeOption runtime_option;
2525
runtime_option.SetModelPath(model_file, params_file, fd::ModelFormat::PADDLE);
2626
// CPU
27-
runtime_option.UsePaddleBackend();
27+
runtime_option.UsePaddleInferBackend();
2828
runtime_option.SetCpuThreadNum(12);
2929
// GPU
3030
// runtime_option.UseGpu(0);

examples/runtime/python/infer_paddle_paddle_inference.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# **** CPU 配置 ****
2828
option.use_cpu()
29-
option.use_paddle_backend()
29+
option.use_paddle_infer_backend()
3030
option.set_cpu_thread_num(12)
3131

3232
# **** GPU 配置 ***

examples/text/ernie-3.0/cpp/seq_cls_infer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
6969
if (FLAGS_backend == "onnx_runtime") {
7070
option->UseOrtBackend();
7171
} else if (FLAGS_backend == "paddle") {
72-
option->UsePaddleBackend();
72+
option->UsePaddleInferBackend();
7373
} else if (FLAGS_backend == "openvino") {
7474
option->UseOpenVINOBackend();
7575
} else if (FLAGS_backend == "tensorrt" ||

examples/text/ernie-3.0/python/seq_cls_infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def create_fd_runtime(self, args):
9999
else:
100100
option.use_gpu()
101101
if args.backend == 'paddle':
102-
option.use_paddle_backend()
102+
option.use_paddle_infer_backend()
103103
elif args.backend == 'onnx_runtime':
104104
option.use_ort_backend()
105105
elif args.backend == 'openvino':

examples/text/uie/cpp/infer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ int main(int argc, char* argv[]) {
5050
}
5151
switch (backend_type) {
5252
case 0:
53-
option.UsePaddleBackend();
53+
option.UsePaddleInferBackend();
5454
break;
5555
case 1:
5656
option.UseOrtBackend();

examples/text/uie/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def build_option(args):
5757
if args.backend == 'onnx_runtime':
5858
runtime_option.use_ort_backend()
5959
elif args.backend == 'paddle_inference':
60-
runtime_option.use_paddle_backend()
60+
runtime_option.use_paddle_infer_backend()
6161
elif args.backend == 'openvino':
6262
runtime_option.use_openvino_backend()
6363
runtime_option.set_cpu_thread_num(args.cpu_num_threads)

examples/text/uie/serving/models/uie/1/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def initialize(self, args):
7878

7979
for option in options:
8080
if option['name'] == 'paddle':
81-
runtime_option.use_paddle_backend()
81+
runtime_option.use_paddle_infer_backend()
8282
elif option['name'] == 'onnxruntime':
8383
runtime_option.use_ort_backend()
8484
elif option['name'] == 'openvino':

examples/vision/classification/paddleclas/quantize/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def build_option(args):
5656
elif args.backend.lower() == "ort":
5757
option.use_ort_backend()
5858
elif args.backend.lower() == "paddle":
59-
option.use_paddle_backend()
59+
option.use_paddle_infer_backend()
6060
elif args.backend.lower() == "openvino":
6161
assert args.device.lower(
6262
) == "cpu", "OpenVINO backend require inference on device CPU."

examples/vision/detection/paddledetection/quantize/cpp/infer_ppyoloe.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ int main(int argc, char* argv[]) {
7878
}
7979
else if (flag == 3) {
8080
option.UseCpu();
81-
option.UsePaddleBackend();
81+
option.UsePaddleInferBackend();
8282
}
8383

8484
std::string model_dir = argv[1];

examples/vision/detection/paddledetection/quantize/python/infer_ppyoloe.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def build_option(args):
5757
elif args.backend.lower() == "ort":
5858
option.use_ort_backend()
5959
elif args.backend.lower() == "paddle":
60-
option.use_paddle_backend()
60+
option.use_paddle_infer_backend()
6161
elif args.backend.lower() == "openvino":
6262
assert args.device.lower(
6363
) == "cpu", "OpenVINO backend require inference on device CPU."

examples/vision/facealign/face_landmark_1000/cpp/infer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
4040
if (FLAGS_backend == "ort") {
4141
option->UseOrtBackend();
4242
} else if (FLAGS_backend == "paddle") {
43-
option->UsePaddleBackend();
43+
option->UsePaddleInferBackend();
4444
} else if (FLAGS_backend == "trt" ||
4545
FLAGS_backend == "paddle_trt") {
4646
option->UseTrtBackend();
@@ -63,7 +63,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
6363
} else if (FLAGS_backend == "ov") {
6464
option->UseOpenVINOBackend();
6565
} else if (FLAGS_backend == "paddle") {
66-
option->UsePaddleBackend();
66+
option->UsePaddleInferBackend();
6767
} else if (FLAGS_backend == "default") {
6868
return true;
6969
} else {

examples/vision/facealign/face_landmark_1000/python/infer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def build_option(args):
3838
if backend == "ort":
3939
option.use_ort_backend()
4040
elif backend == "paddle":
41-
option.use_paddle_backend()
41+
option.use_paddle_infer_backend()
4242
elif backend in ["trt", "paddle_trt"]:
4343
option.use_trt_backend()
4444
option.set_trt_input_shape("input", [1, 3, 112, 112])
@@ -58,7 +58,7 @@ def build_option(args):
5858
elif backend == "ov":
5959
option.use_openvino_backend()
6060
elif backend == "paddle":
61-
option.use_paddle_backend()
61+
option.use_paddle_infer_backend()
6262
elif backend == "default":
6363
return option
6464
else:

examples/vision/facealign/pfld/cpp/infer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
4040
if (FLAGS_backend == "ort") {
4141
option->UseOrtBackend();
4242
} else if (FLAGS_backend == "paddle") {
43-
option->UsePaddleBackend();
43+
option->UsePaddleInferBackend();
4444
} else if (FLAGS_backend == "trt" ||
4545
FLAGS_backend == "paddle_trt") {
4646
option->UseTrtBackend();
@@ -63,7 +63,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
6363
} else if (FLAGS_backend == "ov") {
6464
option->UseOpenVINOBackend();
6565
} else if (FLAGS_backend == "paddle") {
66-
option->UsePaddleBackend();
66+
option->UsePaddleInferBackend();
6767
} else if (FLAGS_backend == "default") {
6868
return true;
6969
} else {

examples/vision/facealign/pfld/python/infer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def build_option(args):
3737
if backend == "ort":
3838
option.use_ort_backend()
3939
elif backend == "paddle":
40-
option.use_paddle_backend()
40+
option.use_paddle_infer_backend()
4141
elif backend in ["trt", "paddle_trt"]:
4242
option.use_trt_backend()
4343
option.set_trt_input_shape("input", [1, 3, 112, 112])
@@ -57,7 +57,7 @@ def build_option(args):
5757
elif backend == "ov":
5858
option.use_openvino_backend()
5959
elif backend == "paddle":
60-
option.use_paddle_backend()
60+
option.use_paddle_infer_backend()
6161
elif backend == "default":
6262
return option
6363
else:

examples/vision/facealign/pipnet/cpp/infer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
4141
if (FLAGS_backend == "ort") {
4242
option->UseOrtBackend();
4343
} else if (FLAGS_backend == "paddle") {
44-
option->UsePaddleBackend();
44+
option->UsePaddleInferBackend();
4545
} else if (FLAGS_backend == "trt" ||
4646
FLAGS_backend == "paddle_trt") {
4747
option->UseTrtBackend();
@@ -64,7 +64,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
6464
} else if (FLAGS_backend == "ov") {
6565
option->UseOpenVINOBackend();
6666
} else if (FLAGS_backend == "paddle") {
67-
option->UsePaddleBackend();
67+
option->UsePaddleInferBackend();
6868
} else if (FLAGS_backend == "default") {
6969
return true;
7070
} else {

examples/vision/facealign/pipnet/python/infer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def build_option(args):
4242
if backend == "ort":
4343
option.use_ort_backend()
4444
elif backend == "paddle":
45-
option.use_paddle_backend()
45+
option.use_paddle_infer_backend()
4646
elif backend in ["trt", "paddle_trt"]:
4747
option.use_trt_backend()
4848
option.set_trt_input_shape("input", [1, 3, 112, 112])
@@ -62,7 +62,7 @@ def build_option(args):
6262
elif backend == "ov":
6363
option.use_openvino_backend()
6464
elif backend == "paddle":
65-
option.use_paddle_backend()
65+
option.use_paddle_infer_backend()
6666
elif backend == "default":
6767
return option
6868
else:

examples/vision/headpose/fsanet/cpp/infer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
4040
if (FLAGS_backend == "ort") {
4141
option->UseOrtBackend();
4242
} else if (FLAGS_backend == "paddle") {
43-
option->UsePaddleBackend();
43+
option->UsePaddleInferBackend();
4444
} else if (FLAGS_backend == "trt" ||
4545
FLAGS_backend == "paddle_trt") {
4646
option->UseTrtBackend();
@@ -63,7 +63,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
6363
} else if (FLAGS_backend == "ov") {
6464
option->UseOpenVINOBackend();
6565
} else if (FLAGS_backend == "paddle") {
66-
option->UsePaddleBackend();
66+
option->UsePaddleInferBackend();
6767
} else if (FLAGS_backend == "default") {
6868
return true;
6969
} else {

examples/vision/headpose/fsanet/python/infer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def build_option(args):
3737
if backend == "ort":
3838
option.use_ort_backend()
3939
elif backend == "paddle":
40-
option.use_paddle_backend()
40+
option.use_paddle_infer_backend()
4141
elif backend in ["trt", "paddle_trt"]:
4242
option.use_trt_backend()
4343
option.set_trt_input_shape("input", [1, 3, 64, 64])
@@ -57,7 +57,7 @@ def build_option(args):
5757
elif backend == "ov":
5858
option.use_openvino_backend()
5959
elif backend == "paddle":
60-
option.use_paddle_backend()
60+
option.use_paddle_infer_backend()
6161
elif backend == "default":
6262
return option
6363
else:

examples/vision/matting/ppmatting/cpp/infer.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ void GpuInfer(const std::string& model_dir, const std::string& image_file,
6060

6161
auto option = fastdeploy::RuntimeOption();
6262
option.UseGpu();
63-
option.UsePaddleBackend();
63+
option.UsePaddleInferBackend();
6464
auto model = fastdeploy::vision::matting::PPMatting(model_file, params_file,
6565
config_file, option);
6666
if (!model.Initialized()) {

examples/vision/matting/ppmatting/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def build_option(args):
3434
option = fd.RuntimeOption()
3535
if args.device.lower() == "gpu":
3636
option.use_gpu()
37-
option.use_paddle_backend()
37+
option.use_paddle_infer_backend()
3838

3939
if args.use_trt:
4040
option.use_trt_backend()

examples/vision/ocr/PP-OCRv2/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def build_option(args):
8181
elif args.backend.lower() == "ort":
8282
option.use_ort_backend()
8383
elif args.backend.lower() == "paddle":
84-
option.use_paddle_backend()
84+
option.use_paddle_infer_backend()
8585
elif args.backend.lower() == "openvino":
8686
assert args.device.lower(
8787
) == "cpu", "OpenVINO backend require inference on device CPU."

examples/vision/ocr/PP-OCRv3/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def build_option(args):
8181
elif args.backend.lower() == "ort":
8282
option.use_ort_backend()
8383
elif args.backend.lower() == "paddle":
84-
option.use_paddle_backend()
84+
option.use_paddle_infer_backend()
8585
elif args.backend.lower() == "openvino":
8686
assert args.device.lower(
8787
) == "cpu", "OpenVINO backend require inference on device CPU."

examples/vision/segmentation/paddleseg/quantize/cpp/infer.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void InitAndInfer(const std::string& model_dir, const std::string& image_file,
5757

5858
// fastdeploy::RuntimeOption option;
5959
// option.UseCpu();
60-
// option.UsePaddleBackend();
60+
// option.UsePaddleInferBackend();
6161
// std::cout<<"Xyy-debug, enable Paddle Backend==!";
6262

6363
// std::string model_dir = argv[1];
@@ -89,7 +89,7 @@ int main(int argc, char* argv[]) {
8989
std::cout<<"Use ORT!"<<std::endl;
9090
} else if (flag == 1) {
9191
option.UseCpu();
92-
option.UsePaddleBackend();
92+
option.UsePaddleInferBackend();
9393
std::cout<<"Use PP!"<<std::endl;
9494
}
9595

examples/vision/segmentation/paddleseg/quantize/python/infer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def build_option(args):
5252
elif args.backend.lower() == "ort":
5353
option.use_ort_backend()
5454
elif args.backend.lower() == "paddle":
55-
option.use_paddle_backend()
55+
option.use_paddle_infer_backend()
5656
elif args.backend.lower() == "openvino":
5757
assert args.device.lower(
5858
) == "cpu", "OpenVINO backend require inference on device CPU."

0 commit comments

Comments
 (0)