-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Add logic to NNAPI EP to exclude pre-processing involving dynamic shapes when partitioning #10452
Conversation
ASSERT_STATUS_OK(session_object.RegisterExecutionProvider(std::make_unique<NnapiExecutionProvider>(0))); | ||
ASSERT_STATUS_OK(session_object.Load(model_file_name)); | ||
ASSERT_STATUS_OK(session_object.Initialize()); | ||
ASSERT_GT(CountAssignedNodes(session_object.GetGraph(), kNnapiExecutionProvider), 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this particular graph, the number of assigned nodes (Add only) should be 1, can use ASSERT_EQ instead of ASSERT_GT
|
||
|
||
if __name__ == "__main__": | ||
GenerateModel('nnapi_dynamic_graph_input_test.onnx') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This model can be applied to CoreML as well, can change the name to something like dynamic_graph_input_test.onnx
or `ep_dynamic_graph_input_test.onnx'?
Description: Describe your changes.
Add logic to EPs to exclude pre-processing involving dynamic shapes when partitioning
Motivation and Context
check if it's just the initial part of the graph using dynamic input that becomes fixed after a Resize so that the new insertion of pre-processing logic does not prevent NNAPI being used.