Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QDQ] Hookup NNAPI GetCapability/Compile with shared QDQ selectors #10347

Merged
merged 13 commits into from
Jan 26, 2022

Conversation

guoyu-wang
Copy link
Contributor

@guoyu-wang guoyu-wang commented Jan 20, 2022

Description: [QDQ] Hookup NNAPI GetCapability/Compile with shared QDQ selectors

Motivation and Context

  • To avoid excessively large PR, the NNAPI QDQ integration is splitted into the following small tasks

  • 1. Add shared NodeUnit class ([QDQ] Add shared NodeUnit class #10052[merged])

  • 2. Move NNAPI EP to use NodeUnitIODef for non-QDQ ops ([QDQ] Move NNAPI EP to use NodeUnitIODef for non-QDQ ops #10237[merged])

  • 3. Add shared QDQ selectors ([QDQ] Add shared qdq selectors #10178[merged])

  • 4. Hookup NNAPI GetCapability/Compile with shared QDQ selectors (this PR)

  • 5. Enable QDQ for ops with QLinear version (QLinear[Conv/Matmul/Pool/...])

  • 6. Enable QDQ for ops without QLinear Version

  • Added share functions to get all the NodeUnits(QDQ and single node) in the graph

  • NNAPI GetCapability/Compile runs on a list of mixed SingleNode/QDQGroup NodeUnit

  • Disabled the support for all QDQ NodeUnit for now (can be individually enabled for each op, in task 5 and 6)

  • Modified the build settings for Extended Minimal build

  • Added a simple UT

  • Some minor update

@guoyu-wang guoyu-wang changed the title Hookup NNAPI GetCapability/Compile with shared QDQ selectors [QDQ] Hookup NNAPI GetCapability/Compile with shared QDQ selectors Jan 21, 2022
std::vector<std::unique_ptr<NodeUnit>> node_unit_holder;
std::unordered_map<const Node*, const NodeUnit*> node_unit_map;

std::tie(node_unit_holder, node_unit_map) = GetAllNodeUnits(graph_viewer);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::tie(node_unit_holder, node_unit_map)

fyi, could also use structured bindings:
const auto [node_unit_holder, node_unit_map] = GetAllNodeUnits(graph_viewer);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, node_unit_map need to be captured by lambda below, seems lambda cannot bind structurally bound reference unless we copy it

Copy link
Contributor

@skottmckay skottmckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@guoyu-wang guoyu-wang merged commit 4af1166 into master Jan 26, 2022
@guoyu-wang guoyu-wang deleted the gwang-msft/nnapi_qdq_selectors branch January 26, 2022 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants