From c68d5467d604d2b1e06a704133370f51a99df11d Mon Sep 17 00:00:00 2001 From: Feng Liu Date: Tue, 10 Sep 2019 10:50:16 -0700 Subject: 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 --- mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp') 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 rmins, ArrayRef 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 -- cgit v1.2.3