inisis / OnnxSlim

A Toolkit to Help Optimize Onnx Model
MIT License
71 stars 8 forks source link

[BUG] Fix pad-conv fusion bug when pad has multiple consumers #21

Closed Lqlsoftware closed 1 month ago

Lqlsoftware commented 1 month ago

When a Pad op has multiple consumers, the fusion process will remove the Pad op without notifying the other consumers, which cause the other consumers to have inexistent input. To avoid this issue, need to check the consumers of the Pad op before removing it.

Referer to: https://github.com/tsingmicro-toolchain/OnnxSlim/pull/29

inisis commented 1 month ago

Thanks for your contribution!