diff options
author | Feng Liu <fengliuai@google.com> | 2019-08-29 10:08:46 -0700 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-08-29 10:09:22 -0700 |
commit | 6de6c2c13828742249377585fd1ef19d9cfd1773 (patch) | |
tree | dd0ef16c044bd319e82aa80edad5d9c4f62667fa /mlir/lib/Dialect/QuantOps | |
parent | 4bb6f8ecdb54f4ee096d8f92603d628d0cac4ed6 (diff) | |
download | bcm5719-llvm-6de6c2c13828742249377585fd1ef19d9cfd1773.tar.gz bcm5719-llvm-6de6c2c13828742249377585fd1ef19d9cfd1773.zip |
Add tests to verify 0.0 is quantized correctly
We should consider both signed and narrow_range cases.
PiperOrigin-RevId: 266167366
Diffstat (limited to 'mlir/lib/Dialect/QuantOps')
-rw-r--r-- | mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp b/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp index eeb69b77102..637f6a04988 100644 --- a/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp +++ b/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp @@ -76,7 +76,7 @@ mlir::quant::fakeQuantAttrsToType(Location loc, unsigned numBits, double rmin, // points and dequantized to 0.0. if (std::fabs(rmax - rmin) < std::numeric_limits<double>::epsilon()) { return UniformQuantizedType::getChecked(flags, storageType, expressedType, - 1.0, 0, qmin, qmax, loc); + 1.0, qmin, qmin, qmax, loc); } // Determine the scale. |