Skip to content

Commit 4d305ec

Browse files
authored
Merge branch 'main' into users/mtrofin/one
2 parents deab75b + 5cf35f1 commit 4d305ec

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

mlir/lib/Dialect/Linalg/Transforms/DecomposeGenericByUnfoldingPermutation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ LogicalResult DecomposeProjectedPermutation::matchAndRewrite(
208208

209209
// Does it require broadcast?
210210
if (!broadcastedDims.empty()) {
211-
assert(broadcastedDims.size() && "should have non size broadcast");
211+
assert(!broadcastedDims.empty() && "should have non size broadcast");
212212
Value emptyTensor = tensor::EmptyOp::create(rewriter, loc, outputShape,
213213
inputRTType.getElementType());
214214

mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3196,7 +3196,7 @@ void NewCliOp::getAsmResultNames(OpAsmSetValueNameFn setNameFn) {
31963196
}
31973197

31983198
SmallString<64> Name("canonloop");
3199-
for (std::string s : reverse(components)) {
3199+
for (const std::string &s : reverse(components)) {
32003200
Name += '_';
32013201
Name += s;
32023202
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ class NormalizedQuantTypesConverter : public TypeConverter {
8888
llvm::find_if(shape, [](int64_t dim) { return dim != 1; });
8989
auto scales = llvm::to_vector(llvm::map_range(
9090
subChannelType.getScales().getValues<APFloat>(),
91-
[](APFloat scale) { return scale.convertToDouble(); }));
91+
[](const APFloat &scale) { return scale.convertToDouble(); }));
9292
auto zeroPoints = llvm::to_vector(llvm::map_range(
9393
subChannelType.getZeroPoints().getValues<APInt>(),
94-
[](APInt zeroPoint) { return zeroPoint.getSExtValue(); }));
94+
[](const APInt &zeroPoint) { return zeroPoint.getSExtValue(); }));
9595
auto perAxisType = UniformQuantizedPerAxisType::get(
9696
subChannelType.getFlags(), subChannelType.getStorageType(),
9797
subChannelType.getExpressedType(), scales, zeroPoints,

mlir/lib/Dialect/Tosa/IR/TosaOps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,20 +512,20 @@ void ReduceMinOp::print(OpAsmPrinter &parser) {
512512
// Tosa utilities.
513513
//===----------------------------------------------------------------------===//
514514

515-
std::optional<int64_t> idivCheck(const int64_t lhs, const int64_t rhs) {
515+
static std::optional<int64_t> idivCheck(const int64_t lhs, const int64_t rhs) {
516516
if (lhs % rhs != 0)
517517
return std::nullopt;
518518
return lhs / rhs;
519519
}
520520

521-
Type getStorageElementTypeOrSelf(Type type) {
521+
static Type getStorageElementTypeOrSelf(Type type) {
522522
auto srcType = getElementTypeOrSelf(type);
523523
if (auto quantType = llvm::dyn_cast<mlir::quant::QuantizedType>(srcType))
524524
srcType = quantType.getStorageType();
525525
return srcType;
526526
}
527527

528-
Type getStorageElementTypeOrSelf(Value value) {
528+
static Type getStorageElementTypeOrSelf(Value value) {
529529
return getStorageElementTypeOrSelf(value.getType());
530530
}
531531

0 commit comments

Comments
 (0)