Skip to content

Commit 5cd0d3c

Browse files
committed
[MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectQuant.cpp (NFC)
1 parent b77f845 commit 5cd0d3c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mlir/lib/Bindings/Python/DialectQuant.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static void populateDialectQuantSubmodule(const nb::module_ &m) {
165165
quantizedType.get_class());
166166
anyQuantizedType.def_classmethod(
167167
"get",
168-
[](nb::object cls, unsigned flags, MlirType storageType,
168+
[](const nb::object &cls, unsigned flags, MlirType storageType,
169169
MlirType expressedType, int64_t storageTypeMin,
170170
int64_t storageTypeMax) {
171171
return cls(mlirAnyQuantizedTypeGet(flags, storageType, expressedType,
@@ -186,7 +186,7 @@ static void populateDialectQuantSubmodule(const nb::module_ &m) {
186186
quantizedType.get_class());
187187
uniformQuantizedType.def_classmethod(
188188
"get",
189-
[](nb::object cls, unsigned flags, MlirType storageType,
189+
[](const nb::object &cls, unsigned flags, MlirType storageType,
190190
MlirType expressedType, double scale, int64_t zeroPoint,
191191
int64_t storageTypeMin, int64_t storageTypeMax) {
192192
return cls(mlirUniformQuantizedTypeGet(flags, storageType,
@@ -221,7 +221,7 @@ static void populateDialectQuantSubmodule(const nb::module_ &m) {
221221
quantizedType.get_class());
222222
uniformQuantizedPerAxisType.def_classmethod(
223223
"get",
224-
[](nb::object cls, unsigned flags, MlirType storageType,
224+
[](const nb::object &cls, unsigned flags, MlirType storageType,
225225
MlirType expressedType, std::vector<double> scales,
226226
std::vector<int64_t> zeroPoints, int32_t quantizedDimension,
227227
int64_t storageTypeMin, int64_t storageTypeMax) {
@@ -293,7 +293,7 @@ static void populateDialectQuantSubmodule(const nb::module_ &m) {
293293
mlirTypeIsAUniformQuantizedSubChannelType, quantizedType.get_class());
294294
uniformQuantizedSubChannelType.def_classmethod(
295295
"get",
296-
[](nb::object cls, unsigned flags, MlirType storageType,
296+
[](const nb::object &cls, unsigned flags, MlirType storageType,
297297
MlirType expressedType, MlirAttribute scales, MlirAttribute zeroPoints,
298298
std::vector<int32_t> quantizedDimensions,
299299
std::vector<int64_t> blockSizes, int64_t storageTypeMin,
@@ -367,7 +367,8 @@ static void populateDialectQuantSubmodule(const nb::module_ &m) {
367367
quantizedType.get_class());
368368
calibratedQuantizedType.def_classmethod(
369369
"get",
370-
[](nb::object cls, MlirType expressedType, double min, double max) {
370+
[](const nb::object &cls, MlirType expressedType, double min,
371+
double max) {
371372
return cls(mlirCalibratedQuantizedTypeGet(expressedType, min, max));
372373
},
373374
"Gets an instance of CalibratedQuantizedType in the same context as the "

0 commit comments

Comments
 (0)