From b081998a51436fcc42dcbf37f1eca1f6116a3d3b Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Wed, 24 Jul 2024 18:15:59 +1000 Subject: [PATCH] Drop QDQ nodes around Expland, Flatten and Tile. CPU EP supports 8-bit data and the ops are data movement only. Makes handling of ops in https://github.com/microsoft/onnxruntime/blob/2580d935cbecd756cef435fb173a2f10237e9d2a/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/shared/utils.cc#L34-L44 consistent. #21375 --- .../selectors_actions/qdq_selector_action_transformer.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selector_action_transformer.cc b/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selector_action_transformer.cc index 17e66a3953b97..a30e1509b0713 100644 --- a/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selector_action_transformer.cc +++ b/onnxruntime/core/optimizer/qdq_transformer/selectors_actions/qdq_selector_action_transformer.cc @@ -61,8 +61,11 @@ void DropQDQNodesRules(SelectorActionRegistry& qdq_selector_action_registry) { std::unique_ptr selector = std::make_unique(true); qdq_selector_action_registry.RegisterSelectorAndAction(drop_action_name, - {{"Gather", {}}, + {{"Expand", {}}, + {"Flatten", {}}, + {"Gather", {}}, {"Reshape", {}}, + {"Tile", {}}, {"Transpose", {}}, {"Squeeze", {}}, {"Unsqueeze", {}}},