Skip to content

Commit f0b8025

Browse files
[mlir][Quant][NFC] Apply clang-format to StripFuncQuantTypes.cpp (#116535)
1 parent 49b2936 commit f0b8025

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

mlir/lib/Dialect/Quant/Transforms/StripFuncQuantTypes.cpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5253
public:
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

7677
public:
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

Comments
 (0)