summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
diff options
context:
space:
mode:
authorFeng Liu <fengliuai@google.com>2019-09-09 15:29:30 -0700
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-09-09 15:29:59 -0700
commitd3a6dbc0b895bdfdae3627c00d35066c4f51b032 (patch)
treeae3805be3d37dddacda7f4900e04bf510838e083 /mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
parent27d776fa6d04e3ca47c42f5b9a90413c7243c35a (diff)
downloadbcm5719-llvm-d3a6dbc0b895bdfdae3627c00d35066c4f51b032.tar.gz
bcm5719-llvm-d3a6dbc0b895bdfdae3627c00d35066c4f51b032.zip
[NFC] Rename ExpressedToUniformQuantizedType to ExpressedToQuantizedType
PiperOrigin-RevId: 268090906
Diffstat (limited to 'mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp')
-rw-r--r--mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp b/mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
index db8a5848981..aec45d4076b 100644
--- a/mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
+++ b/mlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
@@ -25,32 +25,31 @@ static bool isQuantizablePrimitiveType(Type inputType) {
return inputType.isa<FloatType>();
}
-const ExpressedToUniformQuantizedConverter
-ExpressedToUniformQuantizedConverter::forInputType(Type inputType) {
+const ExpressedToQuantizedConverter
+ExpressedToQuantizedConverter::forInputType(Type inputType) {
switch (inputType.getKind()) {
default:
if (isQuantizablePrimitiveType(inputType)) {
// Supported primitive type (which just is the expressed type).
- return ExpressedToUniformQuantizedConverter{inputType, inputType};
+ return ExpressedToQuantizedConverter{inputType, inputType};
}
// Unsupported.
- return ExpressedToUniformQuantizedConverter{inputType, nullptr};
+ return ExpressedToQuantizedConverter{inputType, nullptr};
case StandardTypes::RankedTensor:
case StandardTypes::UnrankedTensor:
case StandardTypes::Vector: {
Type elementType = inputType.cast<ShapedType>().getElementType();
if (!isQuantizablePrimitiveType(elementType)) {
// Unsupported.
- return ExpressedToUniformQuantizedConverter{inputType, nullptr};
+ return ExpressedToQuantizedConverter{inputType, nullptr};
}
- return ExpressedToUniformQuantizedConverter{
+ return ExpressedToQuantizedConverter{
inputType, inputType.cast<ShapedType>().getElementType()};
}
}
}
-Type ExpressedToUniformQuantizedConverter::convert(
- UniformQuantizedType elementalType) const {
+Type ExpressedToQuantizedConverter::convert(QuantizedType elementalType) const {
assert(expressedType && "convert() on unsupported conversion");
switch (inputType.getKind()) {
OpenPOWER on IntegriCloud