OAID / Tengine-Convert-Tools

Tengine Convert Tool supports converting multi framworks' models into tmfile that suitable for Tengine-Lite AI framework.
Apache License 2.0
94 stars 34 forks source link

[onnx] bug fix: 1. unexpected converting crash; 2. wrong value of param.end for op "slice"; 3. wrong tensor data type #84

Closed qinhj closed 3 years ago

qinhj commented 3 years ago

As title,

  1. the unexpected converting crash is caused by calling GetConstTensorBuffer() with StaticTensor ptr, which doesn't have member "mem_addr". https://github.com/OAID/Tengine-Convert-Tools/blob/51ddcda084035210acb1addfe3b1a0343475c9f5/tools/onnx/onnx_serializer.cpp#L541 https://github.com/OAID/Tengine-Convert-Tools/blob/51ddcda084035210acb1addfe3b1a0343475c9f5/tools/onnx/onnx_serializer.cpp#L570
  2. the dumplicated static const tensor type should be the same as the origin one: https://github.com/OAID/Tengine-Convert-Tools/blob/51ddcda084035210acb1addfe3b1a0343475c9f5/tools/onnx/onnx_serializer.cpp#L566
  3. fix wrong value(-1, which actually should be INT_MAX) of param.end for op "slice";
codecov[bot] commented 3 years ago

Codecov Report

Merging #84 (92b3873) into master (51ddcda) will decrease coverage by 0.01%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
- Coverage   31.96%   31.94%   -0.02%     
==========================================
  Files          39       39              
  Lines       11154    11159       +5     
==========================================
  Hits         3565     3565              
- Misses       7589     7594       +5     
Impacted Files Coverage Δ
tools/onnx/onnx_serializer.cpp 27.79% <0.00%> (-0.08%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 51ddcda...92b3873. Read the comment docs.