microsoft / nnfusion

A flexible and efficient deep neural network (DNN) compiler that generates high-performance executable from a DNN model description.
MIT License
948 stars 158 forks source link

Refactor onnx tensor loading #472

Closed mzmssg closed 1 year ago

mzmssg commented 1 year ago

Refactor loading onnx constant/initializers:

  1. Supported type:
    • Integer type: bool/int8/uint8/int16/uint16/int32/uint32/int64/uint64
    • Floating type: float16/float32/float64
  2. Known unsupported type: complex/string/bf16
  3. Forbid numeric type conversion, e.g. onnx store in int but nnfusion requires as float
  4. Forbid narrowing loading, e.g. int64->int32

Update antares type mapping, antares supports only int8/16/32/64 and float16/32/64

xysmlx commented 1 year ago

need to run the apply_code_style.sh script to format the code