onnxruntime/tools/python
Edward Chen 9f942e1a3e
Graph transformer to ensure unique DQ nodes for QDQ node units (#15145)
### Description
<!-- Describe your changes. -->

Add required graph transformer to duplicate DQ nodes to ensure that QDQ
node units have unique DQ nodes. This condition is necessary for QDQ
node unit processing.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->

There is an existing Python utility that does this: 

c7ced7a5e9/tools/python/util/qdq_helpers/qdq_model_utils.py (L77)

This PR implements it as a graph transformer so it is integrated into
ORT and does not require a separate step to update the model. There are
also tests to ensure that its effects are not undone by basic level
graph optimizations.
2023-03-31 08:39:43 +10:00
..
util Graph transformer to ensure unique DQ nodes for QDQ node units (#15145) 2023-03-31 08:39:43 +10:00
__init__.py
check_onnx_model_mobile_usability.py
convert_onnx_models_to_ort.py
create_reduced_build_config.py
dump_ort_model.py
dump_subgraphs.py
example_operator_perf_test.py
find_optimizer_opset_version_updates_required.py
gen_contrib_doc.py
gen_opkernel_doc.py
gen_ort_mobile_pkg_doc.py
get_submodules.py
onnx2tfevents.py
onnx_test_data_utils.py
ort_test_dir_utils.py
PythonTools.md
remove_initializer_from_input.py
run_adb.py
run_android_emulator.py
run_CIs_for_external_pr.py
sparsify_initializers.py
update_version.py