Skip to content

[NNAPI EP] Update NNAPI headers#11954

Merged
edgchen1 merged 6 commits intomasterfrom
edgchen1/update_nnapi
Jun 28, 2022
Merged

[NNAPI EP] Update NNAPI headers#11954
edgchen1 merged 6 commits intomasterfrom
edgchen1/update_nnapi

Conversation

@edgchen1
Copy link
Contributor

Description
Update the NNAPI headers to a more recent version (copied from TF Lite v2.9.1).

Motivation and Context
Enables use of newer NNAPI functionality such as the ANEURALNETWORKS_BATCH_MATMUL operation.

@edgchen1 edgchen1 requested review from YUNQIUGUO and skottmckay June 22, 2022 18:12
LOAD_FUNCTION(libneuralnetworks, ANeuralNetworksModel_setOperandValue);
LOAD_FUNCTION_OPTIONAL(libneuralnetworks, ANeuralNetworksModel_setOperandSymmPerChannelQuantParams);
LOAD_FUNCTION(libneuralnetworks, ANeuralNetworksModel_setOperandValueFromMemory);
LOAD_FUNCTION_OPTIONAL(
Copy link
Contributor Author

@edgchen1 edgchen1 Jun 22, 2022

Choose a reason for hiding this comment

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

some formatting changes were made to minimize the diff from the TF Lite version of this file

TENSOR_BOOL8 = ANEURALNETWORKS_TENSOR_BOOL8,
FLOAT16 = ANEURALNETWORKS_FLOAT16,
TENSOR_QUANT8_SYMM_PER_CHANNEL = ANEURALNETWORKS_TENSOR_QUANT8_SYMM_PER_CHANNEL,
TENSOR_QUANT16_ASYMM = ANEURALNETWORKS_TENSOR_QUANT16_ASYMM,
Copy link
Contributor

@YUNQIUGUO YUNQIUGUO Jun 22, 2022

Choose a reason for hiding this comment

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

why are we removing TENSOR_QUANT16_ASYMM/FLOAT16 types here?
is it to align with TF lite latest version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,245 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

move stubs into a separate file to minimize nnapi_implementation.cc diff with TF Lite

Copy link
Contributor

@YUNQIUGUO YUNQIUGUO left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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:

@edgchen1 edgchen1 merged commit f045994 into master Jun 28, 2022
@edgchen1 edgchen1 deleted the edgchen1/update_nnapi branch June 28, 2022 01:54
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