Skip to content
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

Cjian/1.13 cherry pick round 2 #13206

Merged
merged 13 commits into from Oct 4, 2022
Merged

Conversation

jchen351
Copy link
Contributor

@jchen351 jchen351 commented Oct 3, 2022

Description

This is the round 2 of cherry-pick into 1.13

Motivation and Context

edgchen1 and others added 11 commits October 3, 2022 09:09
…13091)

### Description
<!-- Describe your changes. -->
Update React Native documentation to reflect change to use full ORT. Fix
broken links.


### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
ORT v1.13 uses the full ORT package. Instructions for performing a
custom build did not cover this.

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
### Description
We fix iGPU Unit and Python tests with this PR
We add packaging pip pkg to build Many Linux DockerFile


### Motivation and Context
This change is required to make sure iGPU Unit Test/Python Tests with OV
are fixed
 - If it fixes an open issue, please link to the issue here. -->

Co-authored-by: shamaksx <shamax.kshirsagar@intel.com>
Co-authored-by: mayavijx <mayax.vijayan@intel.com>
Co-authored-by: pratiksha <pratikshax.bapusaheb.vanse@intel.com>
Co-authored-by: pratiksha <mohsinx.mohammad@intel.com>
Co-authored-by: Sahar Fatima <sfatima.3001@gmail.com>
Co-authored-by: Preetha Veeramalai <preetha.veeramalai@intel.com>
Co-authored-by: nmaajidk <n.maajid.khan@intel.com>
Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
### Description

fix XNNPACK on WebAssembly SIMD.

Flag "-msimd128" need to be applied to every source file when compiling
WASM SIMD. Currently only a part of the source files are compiled with
this flag so we get inconsistent result for
`sizeof(xnn_f32_minmax_params)` because the type definition include a
`#ifdef` for `__wasm_simd128__`. The inconsistency causes writing
garbage data to a stack variable and eventually cause the crash.

XNNPACK libraries are C libraries so need to apply the build flags not
only to `CMAKE_CXX_FLAGS` but also to `CMAKE_C_FLAGS`.
Refine the QuantConfig: 1. Remove the default EP config. 2. pass
QuantConfig to quantize API direclty.
### Description
<!-- Describe your changes. -->

A fix for parity issue in huggingface bart model with beam search
#12779

### 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. -->
Previously OnnxSequence would flatten out a list of tensors into a
single output array assuming they were all scalar values. This doesn't
accurately represent the semantics of an ONNX sequence, but was what the
semantics appeared to be years ago when I first wrote that class. This
PR changes it so that the `getValue` method on `OnnxSequence` unwraps
the sequence and returns `List<? extends OnnxValue>` allowing the user
to process the individual ONNX values separately. It's done this way
rather than returning a multidimensional array for a tensor and a Java
map for a map as multidimensional arrays are very inefficient in Java
and best practice when operating with a OnnxTensor in Java is to use a
`java.nio.ByteBuffer`. So allowing users to access each `OnnxTensor`s
individually allows them to control how the data is materialised on the
Java heap.
**Description**: This PR adds support for "XNNPACK EP" in ORTWeb and
changes the behavior of how ORTWeb deals with "backends", or "EPs" in
API.

**Background**: Term "backend" is introduced in ONNX.js to representing
a TypeScript type which implements a "backend" interface, which is a
similar but different concept to ORT's EP (execution provider). There
was 3 backends in ONNX.js: "cpu", "wasm" and "webgl".

When ORT Web is launched, the concept is derived to help users to
integrate smoothly. Technically, when "wasm" backend is used, users need
to also specify "EP" in the session options. Considering it may get
complicated and confused for users to figure out the difference between
"backend" and "EP", the JS API hide the "backend" concept and made a
mapping between names, backends and EPs:
"webgl" (Name) <==> "onnxjsBackend" (Backend)
"wasm" (Name) <==> "wasmBackend" (Backend) <==> "CPU" (EP)

**Details**:
The following changes are applied in this PR:
1. allow multi-registration for backends using the same name. This is
for use scenarios where both "onnxruntime-node" and "onnxruntime-web"
are consumed in a Node.js App ( so "cpu" will be registered twice in
this scenario. )
2. re-assign priority values to backends. I give 100 as base to "cpu"
for node and react_native, and 10 as base to "cpu" in web.
3. add "cpu", "xnnpack" as new names of backends.
4. update onnxruntime wasm exported functions to support EP
registration.
5. update implementations in ort web to handle execution providers in
session options.
6. add '--use_xnnpack' as default build flag for ort-web
@jchen351 jchen351 requested a review from a team as a code owner October 3, 2022 20:33
baijumeswani
baijumeswani previously approved these changes Oct 3, 2022
edgchen1
edgchen1 previously approved these changes Oct 3, 2022
Copy link
Contributor

@edgchen1 edgchen1 left a comment

Choose a reason for hiding this comment

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

signing off on changes from #13187

yufenglee
yufenglee previously approved these changes Oct 3, 2022
skottmckay
skottmckay previously approved these changes Oct 3, 2022
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.

Signing off on inclusion of #13091

### Description
<!-- Describe your changes. -->
Add handling for variadic inputs/outputs in a function.

### 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. -->

#13121
skottmckay
skottmckay previously approved these changes Oct 3, 2022
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.

Signing off for inclusion of #13140

snnn
snnn previously approved these changes Oct 4, 2022
(1) Hot fixes reshape fusion, which causes stable diffusion unet model invalid.
(2) Update remove_cascaded_cast_nodes to make it faster
@jchen351 jchen351 dismissed stale reviews from snnn and skottmckay via 2e55c57 October 4, 2022 17:27
@fs-eire
Copy link
Contributor

fs-eire commented Oct 4, 2022

signing off for:

  • fix XNNPACK on WebAssembly SIMD
  • Add "--parallel" to the build flags of WASM pipeline
  • [js/web] add 'xnnpack' to EP list

@lgtm-com
Copy link

lgtm-com bot commented Oct 4, 2022

This pull request fixes 1 alert when merging 2e55c57 into c0bb9d5 - view on LGTM.com

fixed alerts:

  • 1 for Unused import

@jywu-msft
Copy link
Member

signing off on cherry pick of #13122

@jchen351 jchen351 merged commit 832a9b2 into rel-1.13.0 Oct 4, 2022
@jchen351 jchen351 deleted the cjian/1.13_cherry_pick_round_2 branch October 4, 2022 20:29
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.

None yet