Skip to content

[NNAPI] Split OPBuilder IsOpSupported into a separated class#5746

Merged
guoyu-wang merged 4 commits intomasterfrom
gwang/nnapi_standalone_ep
Nov 10, 2020
Merged

[NNAPI] Split OPBuilder IsOpSupported into a separated class#5746
guoyu-wang merged 4 commits intomasterfrom
gwang/nnapi_standalone_ep

Conversation

@guoyu-wang
Copy link
Contributor

@guoyu-wang guoyu-wang commented Nov 10, 2020

Description: [NNAPI] Split OPBuilder IsOpSupported into a separated class

Motivation and Context

  • This is the 1st step to enable NNAPI EP GetCapability without actually running on Android
  • Split the OPBuilder into 2 classed
  1. OpSupportChecker checks if an operator is supported using NNAPI, this part has no dependency on Linux libraries, can be build for Windows and other platforms
  2. OpBuilder will add the NNAPI operation into the NNAPI model, this part will still only run on Android for now
  • Moved some common used helper functions to helper.h
  • Some minor code updates
  • Not included in the PR, the actual GetCapability and ModelBuilder changes, will have follow up PR for those changes

@guoyu-wang guoyu-wang requested a review from a team as a code owner November 10, 2020 07:05
bool IsOpSupportedImpl(const InitializerMap& initializers, const Node& node, const OPSupportCheckParams& params) override;
bool HasSupportedInputs(const Node& node) override;
int GetMinSupportedOpSet(const Node& node) override;
};
Copy link
Contributor

@skottmckay skottmckay Nov 10, 2020

Choose a reason for hiding this comment

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

Can these be const? #Resolved

uint32_t& index) ORT_MUST_USE_RESULT;

IOpBuilder* GetOpBuilder(const Node& node);
IOpSupportChecker* GetOPSupportChecker(const Node& node);
Copy link
Contributor

@skottmckay skottmckay Nov 10, 2020

Choose a reason for hiding this comment

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

GetOPSupportChecker [](start = 21, length = 19)

Missed one. :P GetOpSupportChecker. Can fix in a future PR. #Resolved

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 0423650 into master Nov 10, 2020
@guoyu-wang guoyu-wang deleted the gwang/nnapi_standalone_ep branch November 10, 2020 23:00
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.

2 participants