[mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp:528:22:
  error: comparison of integers of different signs: 'uint64_t' (aka
  'unsigned long') and 'int64_t' (aka 'long') [-Werror,-Wsign-compare]
This commit is contained in:
Kazu Hirata
2023-01-20 14:33:57 -08:00
parent 59c809cd9b
commit aef953154a

View File

@@ -525,7 +525,8 @@ Type StorageSpecifierType::getFieldType(StorageSpecifierKind kind,
//===----------------------------------------------------------------------===//
static LogicalResult isInBounds(uint64_t dim, Value tensor) {
return success(dim < tensor.getType().cast<RankedTensorType>().getRank());
return success(dim <
(uint64_t)tensor.getType().cast<RankedTensorType>().getRank());
}
static LogicalResult isMatchingWidth(Value result, unsigned width) {