-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change definition of dequantizelinear to match MIGraphX, ONNX (#1567)
While debugging accuracy issues related to an MIGraphX change that caused the emission of ops like migraphx.dequantizelinear %x, %bias, %scale : <...xi8>, <...xi8>, <...xf32> we discovered that our understanding of MIGraphX's semantics for dequnatizelinear were incorrect or out of date. The intended semantics, as seen in MIGraphX's quantiziation simplifier and, more importantly, in the ONNX reference at https://github.com/onnx/onnx/blob/c7717bb39c684a6d86c82a5bb1d4c0e5d90353fe/onnx/reference/ops/op_dequantize_linear.py#L42 are that the input and bias have to be cast to the scale/output (they're required to match) element type before computation. We didn't do this, causing validitaion errors due to 8-bit integer over/unferflow This commit fixes is the issue. It isn't known if it needs a backport.
- Loading branch information
Showing
2 changed files
with
22 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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