Skip to content

Initial PR for NNAPI execution provider - #1220

Merged
Ke Zhang (linkerzhang) merged 36 commits into
microsoft:masterfrom
daquexian:exe_provider
Jul 2, 2019
Merged

Ke Zhang (linkerzhang) merged 36 commits into
microsoft:masterfrom
daquexian:exe_provider

Conversation

@daquexian

Copy link
Copy Markdown
Contributor

Related issue: #919

It is an initial PR for Android NNAPI execution provider. Currently the GetSupportedNodes returns the whole model if the model is supported or an empty vector if the model is unsupported. It will be improved soon.

@daquexian
daquexian (daquexian) requested a review from a team as a code owner June 13, 2019 04:48
@snnn

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 19 pipeline(s), but failed to run 1 pipeline(s).

Comment thread onnxruntime/core/providers/nnapi/nnapi_execution_provider.cc Outdated
NnapiExecutionProvider::~NnapiExecutionProvider() {}

Status NnapiExecutionProvider::CopyTensor(const Tensor& src, Tensor& dst) const {
if (!(strcmp(src.Location().name, NNAPI) == 0 && strcmp(dst.Location().name, CPU) == 0) &&

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

a separate PR will also come to solve the problem of asking execution provider to provide copy tensor function implementation. :).

@linkerzhang

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 19 pipeline(s), but failed to run 1 pipeline(s).

@linkerzhang

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 22 pipeline(s).

@linkerzhang

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 22 pipeline(s).

Comment thread onnxruntime/core/providers/nnapi/nnapi_execution_provider.h Outdated
const std::vector<const KernelRegistry*>& /*kernel_registries*/) const {
// This method is based on that of TRT EP
// Construct modelproto from graph
onnxruntime::Model model(graph.Name(), true, ModelMetaData(), IOnnxRuntimeOpSchemaRegistryList(), graph.DomainToVersionMap());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's necessary to add a "ToProto()" interface in GraphViewer to avoid duplicating this kind of logic in every provider. Let me know if you want to do the refactoring or not, if no, I'll do it later (may after your check-in).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'd like to submit a sperate PR to refactor it :)

@linkerzhang

Copy link
Copy Markdown
Contributor

Thanks daquexian (@daquexian) ! The initial PR looks good to me. Please resolve the conflicts and let's monitor the CI a little bit to get all CI pass.

@linkerzhang

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 22 pipeline(s).

@daquexian

Copy link
Copy Markdown
Contributor Author

Ke Zhang (@linkerzhang) Win CPU x64 MKLML CI Pipeline is canceled due to timeout

@linkerzhang
Ke Zhang (linkerzhang) merged commit c65489a into microsoft:master Jul 2, 2019
Dmitri Smirnov (yuslepukhin) pushed a commit that referenced this pull request Mar 17, 2026
## Update OrtPerfTuning pass to accept data only using data_config

## Checklist before requesting a review
- [x] Add unit tests for this change.
- [x] Make sure all tests can pass.
- [x] Update documents if necessary.
- [x] Lint and apply fixes to your code by running `lintrunner -a`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
- [ ] Is this PR including examples changes? If yes, please remember to
update [example
documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md)
in a follow-up PR.

## (Optional) Issue link
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