@@ -36,9 +36,10 @@ class QuantizedTypeConverter : public TypeConverter {
3636 static Type convertQuantizedType (QuantizedType quantizedType) {
3737 return quantizedType.getStorageType ();
3838 }
39-
39+
4040 static Type convertTensorType (TensorType tensorType) {
41- if (auto quantizedType = dyn_cast<QuantizedType>(tensorType.getElementType ()))
41+ if (auto quantizedType =
42+ dyn_cast<QuantizedType>(tensorType.getElementType ()))
4243 return tensorType.clone (convertQuantizedType (quantizedType));
4344 return tensorType;
4445 }
@@ -50,7 +51,6 @@ class QuantizedTypeConverter : public TypeConverter {
5051 }
5152
5253public:
53-
5454 explicit QuantizedTypeConverter () {
5555 addConversion ([](Type type) { return type; });
5656 addConversion (convertQuantizedType);
@@ -63,7 +63,8 @@ class QuantizedTypeConverter : public TypeConverter {
6363};
6464
6565// Conversion pass
66- class StripFuncQuantTypes : public impl ::StripFuncQuantTypesBase<StripFuncQuantTypes> {
66+ class StripFuncQuantTypes
67+ : public impl::StripFuncQuantTypesBase<StripFuncQuantTypes> {
6768
6869 // Return whether a type is considered legal when occurring in the header of
6970 // a function or as an operand to a 'return' op.
@@ -74,11 +75,10 @@ class StripFuncQuantTypes : public impl::StripFuncQuantTypesBase<StripFuncQuantT
7475 }
7576
7677public:
77-
7878 void runOnOperation () override {
79-
79+
8080 auto moduleOp = cast<ModuleOp>(getOperation ());
81- auto * context = &getContext ();
81+ auto * context = &getContext ();
8282
8383 QuantizedTypeConverter typeConverter;
8484 ConversionTarget target (*context);
@@ -111,4 +111,3 @@ class StripFuncQuantTypes : public impl::StripFuncQuantTypesBase<StripFuncQuantT
111111
112112} // namespace quant
113113} // namespace mlir
114-
0 commit comments