Skip to main content

Module graph_builder

Module graph_builder 

Source
Expand description

Graph-level operations for quantized ONNX models.

Three responsibilities:

  1. QDQ transform — replace FP32 initializers with INT8 + DequantizeLinear
  2. Connectivity validation — walk the graph and verify every edge resolves
  3. Opset management — ensure the model declares opset ≥ 13

Structs§

ConnectivityReport
Result of a graph-connectivity check.
QdqWeightInput
One weight to convert: FP32 initializer → INT8 + DequantizeLinear block.

Functions§

apply_qdq_transform
Replace FP32 weight initializers with INT8 quantized equivalents + DequantizeLinear nodes.
ensure_opset_version
Ensure the default ONNX domain opset is at least min_version.
validate_graph_connectivity
Walk the graph and verify every node input resolves to something.