onnxruntime
390f0fd8 - [QNN Quant tool] Fix validation of per-channel overrides for models with external data (#21656)

Commit
1 year ago
[QNN Quant tool] Fix validation of per-channel overrides for models with external data (#21656) ### Description Fixes validation of per-channel quantization overrides by not trying to unnecessary load the external weights. ### Motivation and Context The `get_qnn_qdq_config()` explicitly loads models without external data (i.e., `onnx.load_model(load_external_data=False)`). Afterwards, `get_qnn_qdq_config()` calls `tensor_proto_to_array()`, which expects that the external weights are stored in the current working directory. If the external weights are stored in a different directory, then we get a crash. Loading the actual weight values is unnecessary because we only need the weight shape. This PR removes the unnecessary call to `tensor_proto_to_array()` call.
Parents
Loading