neural_compressor.utils.export.qlinear2qdq

Helper functions to export onnx model from QLinear ops to QDQ.

Functions

check_model(model)

Check optype for input model.

onnx_qlinear_to_qdq(model, input_name_to_nodes)

Export ONNX QLinearops model into QDQ model.

Module Contents

neural_compressor.utils.export.qlinear2qdq.check_model(model)[source]

Check optype for input model.

Parameters:

model (ModelProto) – onnx model.

neural_compressor.utils.export.qlinear2qdq.onnx_qlinear_to_qdq(model, input_name_to_nodes)[source]

Export ONNX QLinearops model into QDQ model.

Parameters:
  • model (ModelProto) – int8 onnx model.

  • input_name_to_nodes (dict) – the mapping of tensor name and its destination nodes.