From c720dd1ab8267f2f53e713cd0e9448c961ed6149 Mon Sep 17 00:00:00 2001 From: Stella Laurenzo Date: Thu, 2 May 2019 17:26:00 -0700 Subject: [PATCH] Add missing SameValueType trait to a couple of quantization ops. -- PiperOrigin-RevId: 246422412 --- mlir/include/mlir/Quantization/QuantOps.td | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mlir/include/mlir/Quantization/QuantOps.td b/mlir/include/mlir/Quantization/QuantOps.td index 225f45b..00415fa 100644 --- a/mlir/include/mlir/Quantization/QuantOps.td +++ b/mlir/include/mlir/Quantization/QuantOps.td @@ -104,7 +104,7 @@ def quant_StorageCastOp : quant_Op<"scast", [NoSideEffect]> { //===----------------------------------------------------------------------===// def quant_ConstFakeQuant : quant_Op<"const_fake_quant", - [NoSideEffect]> { + [SameValueType, NoSideEffect]> { let summary = "Simulates the effect of uniform quantization with const range."; @@ -130,7 +130,7 @@ def quant_ConstFakeQuant : quant_Op<"const_fake_quant", ); } -def quant_StatisticsRefOp : quant_Op<"stats_ref", []> { +def quant_StatisticsRefOp : quant_Op<"stats_ref", [SameValueType]> { let summary = "Indicates that statistics are resolved by reference."; @@ -149,7 +149,7 @@ def quant_StatisticsRefOp : quant_Op<"stats_ref", []> { let results = (outs quant_RealValueType); } -def quant_StatisticsOp : quant_Op<"stats", []> { +def quant_StatisticsOp : quant_Op<"stats", [SameValueType]> { let summary = "Identity op which associates statistics with the value."; @@ -203,7 +203,7 @@ def quant_StatisticsOp : quant_Op<"stats", []> { }]; } -def quant_CoupledRefOp : quant_Op<"coupled_ref", []> { +def quant_CoupledRefOp : quant_Op<"coupled_ref", [SameValueType]> { let summary = "Indicates that one point of the computation is coupled to another."; -- 2.7.4