Skip to content

Commit 20ba5f7

Browse files
committed
change predictor
1 parent 7188afb commit 20ba5f7

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

examples/cylinder/2d_unsteady/transformer_physx/train_transformer.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,22 @@ def export(cfg: DictConfig):
292292

293293

294294
def inference(cfg: DictConfig):
295-
from deploy.python_infer import pinn_predictor
296-
297-
predictor = pinn_predictor.PINNPredictor(cfg)
295+
from deploy.python_infer import base
296+
297+
predictor = base.Predictor(
298+
cfg.INFER.pdmodel_path,
299+
cfg.INFER.pdiparams_path,
300+
device=cfg.INFER.device,
301+
engine=cfg.INFER.engine,
302+
precision=cfg.INFER.precision,
303+
onnx_path=cfg.INFER.onnx_path,
304+
ir_optim=cfg.INFER.ir_optim,
305+
min_subgraph_size=cfg.INFER.min_subgraph_size,
306+
gpu_mem=cfg.INFER.gpu_mem,
307+
gpu_id=cfg.INFER.gpu_id,
308+
max_batch_size=cfg.INFER.max_batch_size,
309+
num_cpu_threads=cfg.INFER.num_cpu_threads,
310+
)
298311

299312
dataset_cfg = {
300313
"name": "CylinderDataset",

0 commit comments

Comments
 (0)