[Mlir-commits] [mlir] 942afe0 - [mlir/quant] fix a small typo in the quant utility
Feng Liu
llvmlistbot at llvm.org
Fri Mar 20 10:14:02 PDT 2020
Author: Feng Liu
Date: 2020-03-20T10:12:53-07:00
New Revision: 942afe0cb2ac0f3fe4a5ffc52400e1819b4fd570
URL: https://github.com/llvm/llvm-project/commit/942afe0cb2ac0f3fe4a5ffc52400e1819b4fd570
DIFF: https://github.com/llvm/llvm-project/commit/942afe0cb2ac0f3fe4a5ffc52400e1819b4fd570.diff
LOG: [mlir/quant] fix a small typo in the quant utility
This is an edge case where the input type is a primitive type.
Differential Revision: https://reviews.llvm.org/D76442
Added:
Modified:
mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp b/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp
index 4d5db81e326d..991d7c179f90 100644
--- a/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp
+++ b/mlir/lib/Dialect/Quant/Utils/UniformSupport.cpp
@@ -46,8 +46,8 @@ Type ExpressedToQuantizedConverter::convert(QuantizedType elementalType) const {
switch (inputType.getKind()) {
default:
- if (isQuantizablePrimitiveType(elementalType)) {
- // For primitives, just use the new elemental type.
+ if (elementalType.getExpressedType() == expressedType) {
+ // If the expressed types match, just use the new elemental type.
return elementalType;
}
// Unsupported.
More information about the Mlir-commits
mailing list