Skip to content

Commit

Permalink
plt update net instance, test=model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeref996 committed Aug 30, 2024
1 parent 3dddc7f commit 849b2a8
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions framework/e2e/PaddleLT_new/engine/paddle_infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from generator.builder_layer import BuildLayer
from generator.builder_data import BuildData

from tools.logger import Logger


class LayerInfer(object):
"""
Expand Down Expand Up @@ -41,7 +43,7 @@ def paddle_infer_gpu(self):
"""infer load (layer)"""
reset(self.seed)
if not os.path.exists(self.path + ".pdiparams"):
Logger("paddle_infer_gpu").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试")
Logger("paddle_infer_gpu").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试")
return {"res": {"logit": None}}

config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams")
Expand Down Expand Up @@ -70,7 +72,7 @@ def paddle_infer_cpu(self):
"""infer load (layer)"""
reset(self.seed)
if not os.path.exists(self.path + ".pdiparams"):
Logger("paddle_infer_cpu").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试")
Logger("paddle_infer_cpu").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试")
return {"res": {"logit": None}}

config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams")
Expand Down Expand Up @@ -100,7 +102,7 @@ def paddle_infer_mkldnn(self):
"""infer load (layer)"""
reset(self.seed)
if not os.path.exists(self.path + ".pdiparams"):
Logger("paddle_infer_mkldnn").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试")
Logger("paddle_infer_mkldnn").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试")
return {"res": {"logit": None}}

config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams")
Expand Down Expand Up @@ -132,7 +134,7 @@ def paddle_infer_ort(self):
"""infer load (layer)"""
reset(self.seed)
if not os.path.exists(self.path + ".pdiparams"):
Logger("paddle_infer_ort").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试")
Logger("paddle_infer_ort").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试")
return {"res": {"logit": None}}

config = paddle_infer.Config(self.path + ".pdmodel", self.path + ".pdiparams")
Expand Down Expand Up @@ -163,7 +165,7 @@ def paddle_infer_new_exc_pir(self):
"""infer load (layer)"""
reset(self.seed)
if not os.path.exists(self.path + ".pdiparams"):
Logger("paddle_infer_new_exc_pir").get_log().info(f"该子图export未产出pdiparams, 所以跳过infer测试")
Logger("paddle_infer_new_exc_pir").get_log().info("该子图export未产出pdiparams, 所以跳过infer测试")
return {"res": {"logit": None}}

config = paddle_infer.Config(self.path + ".json", self.path + ".pdiparams")
Expand Down

0 comments on commit 849b2a8

Please sign in to comment.