Skip to content

Commit 5cd7de1

Browse files
authored
refactor: refactor paddle inference code (#622)
* refactor: refactor paddle inference code * fix(paddle): correct typo and improve device env setup
1 parent 09dbaf5 commit 5cd7de1

File tree

7 files changed

+288
-269
lines changed

7 files changed

+288
-269
lines changed

python/rapidocr/config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ EngineConfig:
5959
use_npu: false
6060
npu_ep_cfg:
6161
device_id: 0
62+
envs:
63+
FLAGS_npu_jit_compile: 0
64+
FLAGS_use_stride_kernel: 0
65+
FLAGS_allocator_strategy: "auto_growth"
66+
CUSTOM_DEVICE_BLACK_LIST: "pad3d,pad3d_grad,set_value,set_value_with_tensor"
67+
FLAGS_npu_scale_aclnn: "True"
68+
FLAGS_npu_split_aclnn: "True"
6269

6370
use_cuda: false
6471
cuda_ep_cfg:

python/rapidocr/inference_engine/paddle.py

Lines changed: 0 additions & 267 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# -*- encoding: utf-8 -*-
2+
# @Author: SWHL
3+
# @Contact: liekkaskono@163.com
4+
from .main import PaddleInferError, PaddleInferSession

0 commit comments

Comments
 (0)