summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
diff options
context:
space:
mode:
authorFeng Liu <fengliuai@google.com>2019-09-10 10:50:16 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-09-10 10:50:57 -0700
commitc68d5467d604d2b1e06a704133370f51a99df11d (patch)
tree4082d544febf58405f56fc89c694beee303d905e /mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
parent277b6136ee78e621a1737e35956d1a9317ff096d (diff)
downloadbcm5719-llvm-c68d5467d604d2b1e06a704133370f51a99df11d.tar.gz
bcm5719-llvm-c68d5467d604d2b1e06a704133370f51a99df11d.zip
Convert ConstFakeQuantPerAxis to qcast and dcast pair
This is also to add the test to the fakeQuantAttrsToType for per-channel fake quant. PiperOrigin-RevId: 268260032
Diffstat (limited to 'mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp')
-rw-r--r--mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp b/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
index 02f803ac839..5d4561be81b 100644
--- a/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
+++ b/mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
@@ -136,7 +136,6 @@ UniformQuantizedType fakeQuantAttrsToType(Location loc, unsigned numBits,
loc);
}
-// TODO(fengliuai): test this method once the quantizeAttr method is fixed.
UniformQuantizedPerAxisType
fakeQuantAttrsToType(Location loc, unsigned numBits, int32_t quantizedDimension,
ArrayRef<double> rmins, ArrayRef<double> rmaxs,
@@ -180,8 +179,8 @@ fakeQuantAttrsToType(Location loc, unsigned numBits, int32_t quantizedDimension,
unsigned flags = isSigned ? QuantizationFlags::Signed : 0;
return UniformQuantizedPerAxisType::getChecked(
- flags, storageType, expressedType, scales, zeroPoints, qmin, qmax,
- quantizedDimension, loc);
+ flags, storageType, expressedType, scales, zeroPoints, quantizedDimension,
+ qmin, qmax, loc);
}
} // namespace quant
OpenPOWER on IntegriCloud