Skip to content

Normalize to positive axis for comparison on GEMM#26152

Merged
edgchen1 merged 6 commits into
microsoft:mainfrom
CodeLinaro:dev/yuduo/gemm-axis-fix
Sep 30, 2025
Merged

Normalize to positive axis for comparison on GEMM#26152
edgchen1 merged 6 commits into
microsoft:mainfrom
CodeLinaro:dev/yuduo/gemm-axis-fix

Conversation

@qti-yuduo

Copy link
Copy Markdown
Contributor

GEMM has 2D input, when given axis=-1 in DequantizeLinear node attributes. The check axis == expected_axis would fail. However, it sematically the same (-1 and 1 for 2D GEMM's input). Normalize the check so we can still perform the quantization for this case.

Comment thread onnxruntime/core/optimizer/qdq_transformer/weight_bias_quantization.cc Outdated
@qti-yuduo qti-yuduo requested a review from edgchen1 September 25, 2025 17:47
Comment thread onnxruntime/core/optimizer/qdq_transformer/weight_bias_quantization.cc Outdated
qti-yuduo and others added 3 commits September 25, 2025 11:27
…ation.cc

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
@qti-yuduo qti-yuduo requested a review from edgchen1 September 25, 2025 21:47
Comment thread onnxruntime/core/optimizer/qdq_transformer/weight_bias_quantization.cc Outdated
@qti-yuduo qti-yuduo requested a review from edgchen1 September 26, 2025 00:50
@edgchen1

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@qti-yuduo

Copy link
Copy Markdown
Contributor Author

@edgchen1 could you help to check the CI runner status here? Thanks!

@edgchen1

Copy link
Copy Markdown
Contributor

@qti-yuduo Have you agreed to the CLA? It looks like the "license/cla" check is pending.

@qti-yuduo

Copy link
Copy Markdown
Contributor Author

@qti-yuduo Have you agreed to the CLA? It looks like the "license/cla" check is pending.

I think so? Unless it's changed and I need to do it again. I've commited changes in the past: https://github.com/microsoft/onnxruntime/pulls?q=is%3Apr+author%3Aqti-yuduo+is%3Aclosed

@edgchen1

Copy link
Copy Markdown
Contributor

@qti-yuduo Have you agreed to the CLA? It looks like the "license/cla" check is pending.

I think so? Unless it's changed and I need to do it again. I've commited changes in the past: https://github.com/microsoft/onnxruntime/pulls?q=is%3Apr+author%3Aqti-yuduo+is%3Aclosed

Ok, let me try to close and re-open the PR.

@edgchen1 edgchen1 closed this Sep 29, 2025
@edgchen1 edgchen1 reopened this Sep 29, 2025
@edgchen1

Copy link
Copy Markdown
Contributor

/azp run Linux QNN CI Pipeline,Win_TRT_Minimal_CUDA_Test_CI,Windows ARM64 QNN CI Pipeline,Windows GPU Doc Gen CI Pipeline

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 4 pipeline(s).

@edgchen1 edgchen1 merged commit 3ec8829 into microsoft:main Sep 30, 2025
168 checks passed
fs-eire pushed a commit that referenced this pull request Oct 24, 2025
GEMM has 2D input, when given `axis=-1` in DequantizeLinear node
attributes. The check `axis == expected_axis` would fail. However, it
sematically the same (-1 and 1 for 2D GEMM's input). Normalize the check
so we can still perform the quantization for this case.

---------

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
naomiOvad pushed a commit to naomiOvad/onnxruntime that referenced this pull request Nov 2, 2025
GEMM has 2D input, when given `axis=-1` in DequantizeLinear node
attributes. The check `axis == expected_axis` would fail. However, it
sematically the same (-1 and 1 for 2D GEMM's input). Normalize the check
so we can still perform the quantization for this case.

---------

Co-authored-by: Edward Chen <18449977+edgchen1@users.noreply.github.com>
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.

2 participants