microsoft / onnxconverter-common

Common utilities for ONNX converters
MIT License
251 stars 66 forks source link

Fix bug of fp16 converter about the cast node and topology in sub-graph #291

Closed xiaowuhu closed 5 months ago

xiaowuhu commented 6 months ago

There have a lot of bugs in the float16 converter after ORT 1.17 released, because the optimization rule changed in ORT. And customers also raised a lot of fp16 converter issue, which to be considered as corner case, but also need to fix. The original implementation is hard to understand, less maintainable. So I rewrite the function convert_float_to_float16, the logic is simple to understand, and easy to modify each components. Also added 3 new features:

fatcat-z commented 5 months ago

Please add some descriptions so we know what kind of issue this PR aims to address.