Skip to content

Conversation

yihonglyu
Copy link
Contributor

@yihonglyu yihonglyu commented Nov 15, 2024

Description

  • Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
  • Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

Motivation and Context

By merging and eliminating redundant transpose , the Image Segmentation i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.

- Improved transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.
@yihonglyu yihonglyu requested a review from skottmckay November 15, 2024 06:38
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

You can commit the suggested changes from lintrunner.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@yihonglyu yihonglyu changed the title Optimize QLinearSoftmax Transpose Optimize Transpose around QLinearSoftmax Nov 17, 2024
@yihonglyu yihonglyu requested review from a team and adrianlizarraga November 17, 2024 00:30
@yihonglyu yihonglyu merged commit 02a0be3 into main Nov 18, 2024
93 checks passed
@yihonglyu yihonglyu deleted the yilyu/ort-transpose-opt-qlinearsoftmax branch November 18, 2024 14:58
@sophies927 sophies927 added the triage:approved Approved for cherrypicks for release label Nov 18, 2024
@yf711 yf711 removed triage:approved Approved for cherrypicks for release release:1.20.1 labels Nov 18, 2024
mszhanyi pushed a commit that referenced this pull request Nov 22, 2024
### Description
<!-- Describe your changes. -->

- Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

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

By merging and eliminating redundant transpose , the Image Segmentation
i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.
guschmue pushed a commit that referenced this pull request Dec 2, 2024
### Description
<!-- Describe your changes. -->

- Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

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

By merging and eliminating redundant transpose , the Image Segmentation
i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
### Description
<!-- Describe your changes. -->

- Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

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

By merging and eliminating redundant transpose , the Image Segmentation
i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
### Description
<!-- Describe your changes. -->

- Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

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

By merging and eliminating redundant transpose , the Image Segmentation
i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.
alex-spacemit pushed a commit to spacemit-com/onnxruntime that referenced this pull request Jun 22, 2025
[ARM] MatMulNBits Fp16 support - API change only (microsoft#22826)

A break-down PR of microsoft#22651
Op API change only.
- add template to functions and classes that support fp32 and fp16
- rename functions, classes and files that support fp32 and fp16 from
SQNBxxx to QNBxxx

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

Change-Id: Ib489e7858d42abcbe0514ac44e4d2172e32384a3

Re-enable test symbolic shape infer (microsoft#22737)

<!-- Describe your changes. -->
It seems after CI updated to py310, numpy got updated to 2.0 and sympy
1.2 failed to cast float numpy array.
Pointing sympy to 1.13 when py>=3.9 and re-enable unit test

<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
Error: Linux CPU
CI

[Quant tool] Handle input models with pre-quantized weights (microsoft#22633)

Allows the QDQ quantizer to handle input models that already have some
pre-quantized weights. In this case, the qdq quantizer will properly
skip/handle the pre-quantized weights.

Also handles an operator (e.g., Conv) with a pre-quantized weight and a
float bias. The tool will read the pre-quantized weight's quantization
scale to compute the bias's scale (`bias_scale = input_scale *
weight_scale`).

Input model (pre-quantized Conv weight):

![image](https://github.com/user-attachments/assets/7d2626e4-49ad-47ae-bd0e-6339ac590435)

Output QDQ model (everything is quantized):

![image](https://github.com/user-attachments/assets/393804d3-f042-47bd-895f-3d667fb2ae94)

Customers may use external tools to quantize some weights (e.g., int4
for Conv/MatMul). The qdq quantizer should still be able to quantize the
rest of the model (float weights and activations) in this case.

Update Gradle version 8.7 and java version 17 within onnxruntime/java (microsoft#22771)

This change is to update the Gradle version within java project to 8.7,
it also upgrades the JAVA to 17. Gradle version from react-native was
also updated to 7.5 to make it compatible with changes from the Java
directory. However, the target java version remains the same. Java
version from these will be upgraded in a separated PR.

This is spited from microsoft#22206

This is the first step to upgrade the react native version.

Ovep develop 1.21 (microsoft#22824)

OVEP development changes for ORT 1.21 Release

Has critical bug fixes
Support for concurrency execution of models is enabled
Support for OV 2024.5
Memory optimizations for NPU platform

---------

Co-authored-by: jatinwadhwa921 <[email protected]>
Co-authored-by: Ankit Maheshkar <[email protected]>
Co-authored-by: sfatimar <[email protected]>
Co-authored-by: saurabhkale17 <[email protected]>
Co-authored-by: TejalKhade28 <[email protected]>
Co-authored-by: Javier E. Martinez <[email protected]>

Fix 1.20 cuda minimal build failure (microsoft#22751)

Fixes build failure for the cuda minimal build

<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
[This change](microsoft#19470) in
1.20 is causing build failures for the cuda minimal build.
Essentially, some cudnn logic was not guarded by the `USE_CUDA_MINIMAL`.
Also the build is looking for cudnn while in the cuda minimal build it
shouldn't depend on it, resulting in linking error.

cc @gedoensmax @chilo-ms

[ARM] MatMulNBits fp16 support - connect kernels (microsoft#22856)

A breakdown PR of microsoft#22651

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

Change-Id: I3014c1002ff375a507bc04de7756baacf9a2b77a

[WebNN EP] Support Einsum op (microsoft#19558)

Adds support for einsum via WebNN matmul, transpose, reshape, reducesum,
identity and element-wise binary ops.

Refactor SkipLayerNorm and handle beta properly (microsoft#22862)

Signed-off-by: Liqun Fu <[email protected]>
Signed-off-by: Liqun Fu <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Change-Id: Ic5b8a6eb775542a57f07f5e593cc399dd7eeaa8f

Fix CUDA/DML package exception caused by ENABLE_CUDA_NHWC_OPS (microsoft#22851)

Now,  ENABLE_CUDA_NHWC_OPS is enabled by default.
It adds a new chance to create cuda provider while both cuda/dml are
enabled

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

Optimize Transpose around QLinearSoftmax (microsoft#22849)

<!-- Describe your changes. -->

- Improved Transpose around QLinearSoftmax in Level 3 NHWC Transformer.
- Removed redundant code HandleQLinearConcat, HandleQLinearBinaryOp.

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

By merging and eliminating redundant transpose , the Image Segmentation
i8 model (MobileNetv2 + DeepLabv3) achieves a 2.34X speedup.

Replace INFINITY by std::numeric_limits<float>::infinity() (microsoft#22868)

Replace INFINITY by `std::numeric_limits<float>::infinity()` to avoid
build errors with Visual Studio 2022 v17.12 Preview 5

microsoft#22728

[js/webgpu] Optimize transpose as reshape when suitable (microsoft#22870)

BUG microsoft#22031

Change-Id: I6c70d84228f1563792218c6c3c18b023852d4147

clang format code

Change-Id: I422a9474da9e9cfc9ac8819569a13520c5d2641f
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.

4 participants