[Mlir-commits] [mlir] 7600632 - Fix CalibratedQuantizedType's print function to match parser
Feng Liu
llvmlistbot at llvm.org
Tue Nov 24 09:36:27 PST 2020
Author: Tei Jeong
Date: 2020-11-24T09:35:35-08:00
New Revision: 760063267c462c21cfdeafb0d5fe63ecfa2f2c30
URL: https://github.com/llvm/llvm-project/commit/760063267c462c21cfdeafb0d5fe63ecfa2f2c30
DIFF: https://github.com/llvm/llvm-project/commit/760063267c462c21cfdeafb0d5fe63ecfa2f2c30.diff
LOG: Fix CalibratedQuantizedType's print function to match parser
Reviewed By: liufengdb
Differential Revision: https://reviews.llvm.org/D92034
Added:
Modified:
mlir/lib/Dialect/Quant/IR/TypeParser.cpp
mlir/test/Dialect/Quant/parse-calibrated.mlir
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Quant/IR/TypeParser.cpp b/mlir/lib/Dialect/Quant/IR/TypeParser.cpp
index 6894463427fd..70539183b6f4 100644
--- a/mlir/lib/Dialect/Quant/IR/TypeParser.cpp
+++ b/mlir/lib/Dialect/Quant/IR/TypeParser.cpp
@@ -416,7 +416,7 @@ static void printUniformQuantizedPerAxisType(UniformQuantizedPerAxisType type,
static void printCalibratedQuantizedType(CalibratedQuantizedType type,
DialectAsmPrinter &out) {
out << "calibrated<" << type.getExpressedType();
- out << "<" << type.getMin() << ", " << type.getMax() << ">";
+ out << "<" << type.getMin() << ":" << type.getMax() << ">";
out << ">";
}
diff --git a/mlir/test/Dialect/Quant/parse-calibrated.mlir b/mlir/test/Dialect/Quant/parse-calibrated.mlir
index 648715fd4c49..87f5b7ade21a 100644
--- a/mlir/test/Dialect/Quant/parse-calibrated.mlir
+++ b/mlir/test/Dialect/Quant/parse-calibrated.mlir
@@ -2,7 +2,7 @@
// -----
// CHECK-LABEL: parseCalibrated
-// CHECK: !quant.calibrated<f32<-0.998, 1.232100e+00>
+// CHECK: !quant.calibrated<f32<-0.998:1.232100e+00>
!qalias = type !quant.calibrated<f32<-0.998:1.2321>>
func @parseCalibrated() -> !qalias {
%0 = "foo"() : () -> !qalias
More information about the Mlir-commits
mailing list