You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update replace_gemm_with_matmul to support quantization of GEMM nodes whose transB equals 1.
Motivation and Context
Currently, the onnxruntime quantization script can convert a GEMM node to MatMulInteger if the transB attribute of the node equals 0. However, in many onnx models (e.g. https://github.com/onnx/models/tree/master/vision/classification/vgg), the transB attribute of the GEMM nodes is 1. Thus, these nodes are not able to be quantized by the current script.
/azp run Linux CPU CI Pipeline, Linux CPU x64 NoContribops CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline
/azp run Linux CPU CI Pipeline, Linux CPU x64 NoContribops CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline,Linux CPU Minimal Build E2E CI Pipeline
/azp run orttraining-linux-ci-pipeline,orttraining-mac-ci-pipeline,Linux OpenVINO CI Pipeline,Windows GPU TensorRT CI Pipeline, centos7_cpu, orttraining-linux-gpu-ci-pipeline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
replace_gemm_with_matmulto support quantization of GEMM nodes whosetransBequals 1.Motivation and Context
transBattribute of the node equals 0. However, in many onnx models (e.g. https://github.com/onnx/models/tree/master/vision/classification/vgg), thetransBattribute of the GEMM nodes is 1. Thus, these nodes are not able to be quantized by the current script.