Skip to content

Fix NNAPI optional input handling checks and unblock Android CI pipeline test failures - #17358

Merged
YUNQIUGUO merged 17 commits into
mainfrom
yguo/fix-resize-input-checks
Aug 31, 2023
Merged

Fix NNAPI optional input handling checks and unblock Android CI pipeline test failures#17358
YUNQIUGUO merged 17 commits into
mainfrom
yguo/fix-resize-input-checks

Conversation

@YUNQIUGUO

@YUNQIUGUO YUNQIUGUO commented Aug 30, 2023

Copy link
Copy Markdown
Contributor

Description

  • Fix missing optional input checks originally coming from a github issue for no shape on Resize Op.
  • Exclude Antialias support for Opset 18 + Resize for NNAPI
  • Unblock Android CI pipeline tests failure.

Motivation and Context

Bug fixes.

Issue:
#17035

thanks @skottmckay for pointing out the cause.

@YUNQIUGUO
YUNQIUGUO marked this pull request as ready for review August 30, 2023 22:19
@YUNQIUGUO
YUNQIUGUO marked this pull request as draft August 30, 2023 22:20
@YUNQIUGUO

YUNQIUGUO commented Aug 30, 2023

Copy link
Copy Markdown
Contributor Author

Currently, Resize Op unit tests still have one ResizeOpTest.Antialias_Bilinear_No_ExcludeOutside failing - related to antialiasing.

I don't have much context. Not sure if we should just disable nnapi ep in this test case.

Details:

[ RUN      ] ResizeOpTest.Antialias_Bilinear_No_ExcludeOutside
/Users/rachguo/Repos/onnxruntime-android-build-2/onnxruntime/onnxruntime/test/providers/checkers.cc:265: Failure
The difference between cur_expected[i] and cur_actual[i] is 0.53030276298522949, which exceeds threshold, where
cur_expected[i] evaluates to 2.3636362552642822,
cur_actual[i] evaluates to 1.8333334922790527, and
threshold evaluates to 9.9999997473787516e-05.
i:0
Google Test trace:
/Users/rachguo/Repos/onnxruntime-android-build-2/onnxruntime/onnxruntime/test/providers/checkers.cc:484: provider type: NnapiExecutionProvider
/Users/rachguo/Repos/onnxruntime-android-build-2/onnxruntime/onnxruntime/test/providers/base_tester.cc:774: registered execution providers: NnapiExecutionProvider
[  FAILED  ] ResizeOpTest.Antialias_Bilinear_No_ExcludeOutside (20 ms)

It does not "fail" before, as the op is not actually assigned to NNAPI EP due to V onnxruntime: [V:onnxruntime:Verbose, base_op_builder.cc:99 operator()] Node [node1] type [Resize] Input [] has no shape V onnxruntime: [V:onnxruntime:Verbose, nnapi_execution_provider.cc:151 operator()] Node supported: [0] Operator type: [Resize] index: [0] name: [node1] as part of the NodeUnit type: [Resize] index: [0] name: [node1] this similar issue we don't notice before.

cc @wejoncy

@YUNQIUGUO YUNQIUGUO changed the title Fix NNAPI Resize op checks and adding additional check for optional input handling Fix NNAPI optional input handling checks Aug 30, 2023
Comment thread onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/base_op_builder.cc Outdated
Comment thread onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/resize_op_builder.cc Outdated
@YUNQIUGUO
YUNQIUGUO marked this pull request as ready for review August 31, 2023 02:09
@YUNQIUGUO YUNQIUGUO changed the title Fix NNAPI optional input handling checks Fix NNAPI optional input handling checks and Unblock Android CI pipeline tests Aug 31, 2023
@YUNQIUGUO YUNQIUGUO changed the title Fix NNAPI optional input handling checks and Unblock Android CI pipeline tests Fix NNAPI optional input handling checks and unblock Android CI pipeline test failures Aug 31, 2023
Comment thread onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/resize_op_builder.cc Outdated
Comment thread onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/resize_op_builder.cc Outdated
edgchen1
edgchen1 previously approved these changes Aug 31, 2023
Comment thread onnxruntime/core/providers/nnapi/nnapi_builtin/builders/impl/resize_op_builder.cc Outdated

@skottmckay skottmckay left a comment

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.

:shipit:

@YUNQIUGUO
YUNQIUGUO merged commit 16cfcd0 into main Aug 31, 2023
@YUNQIUGUO
YUNQIUGUO deleted the yguo/fix-resize-input-checks branch August 31, 2023 23:40
@natke natke added the triage:approved Approved for cherrypicks for release label Sep 1, 2023
Lafi7e pushed a commit that referenced this pull request Sep 1, 2023
…ine test failures (#17358)

### Description
<!-- Describe your changes. -->

- Fix missing optional input checks originally coming from a github
issue for no shape on Resize Op.
- Exclude Antialias support for Opset 18 + Resize for NNAPI
- Unblock Android CI pipeline tests failure. 

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Bug fixes.

Issue:
#17035

thanks @skottmckay for pointing out the cause.

---------

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
kleiti pushed a commit to kleiti/onnxruntime that referenced this pull request Mar 22, 2024
…ine test failures (microsoft#17358)

### Description
<!-- Describe your changes. -->

- Fix missing optional input checks originally coming from a github
issue for no shape on Resize Op.
- Exclude Antialias support for Opset 18 + Resize for NNAPI
- Unblock Android CI pipeline tests failure. 

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Bug fixes.

Issue:
microsoft#17035

thanks @skottmckay for pointing out the cause.

---------

Co-authored-by: rachguo <rachguo@rachguos-Mini.attlocal.net>
Co-authored-by: rachguo <rachguo@rachguos-Mac-mini.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:approved Approved for cherrypicks for release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants