Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with inference of onnx models converted from paddlex #1484

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

0x3878f
Copy link
Contributor

@0x3878f 0x3878f commented Jan 22, 2025

  1. PicoDet类模型

    In Node, ("ReduceMin.0", ReduceMin, "", -1) : ("Concat.17": tensor(int64),"helper.constant.25": tensor(int64),) -> ("ReduceMin.1",) , Error Node (ReduceMin.0) has input size 2 not in range [min=1, max=1]. 

    multiclass_nms3中ReduceMin在opset version 14~17时输入不正确

  2. SOLOv2

    RuntimeError: Node (ConstantOfShape.11) Op (ConstantOfShape) [ShapeInferenceError] shape input must be 1D tensor

    linspace op中输入Num是0-D tensor的情况需要特殊处理

  3. SwinTransformer类模型

    In Node, ("If.0", If, "", -1) : ("Cast.15": tensor(bool),) -> ("p2o.pd_op.set_value_.0.0",) , Error No Op registered for SequenceMap with domain_version of 12 ==> Context: Bad node spec for node. Name: SequenceMap.0 OpType: SequenceMap
    

    opset version遗留问题:存在控制流OP时不能正确获取opset version的问题,导致算子转化失败

  4. set_value opset version升级
    因为使用了ONNX的SequenceMap,需要opset version >= 17

  5. 获取控制流中opset version时,部分算子的GetMinOpsetVersion中也需要获取TensorInfo信息,因此需要将获取控制流block中算子的输出名称提前到GetCfBlockMinOpsetVersion中

Copy link

paddle-bot bot commented Jan 22, 2025

Thanks for your contribution!

Copy link
Collaborator

@risemeup1 risemeup1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG TM

@risemeup1 risemeup1 merged commit 040c051 into PaddlePaddle:test_pir Jan 23, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants