Fix sign-compare warnings in TosaLegalizeCommon.cpp (#1794)

pull/1785/head snapshot-20230113.717
Ramiro Leal-Cavazos 2023-01-12 11:23:30 -08:00 committed by GitHub
parent f74164161a
commit 7714bebfe3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ createOneDimTfIndices(PatternRewriter &rewriter, Operation *op,
// dim0: indicesMetaElementRepeatTimes = 1 x 4*2 = 8
// dim1: indicesMetaElementRepeatTimes = 1 *1 x 2 = 2
// dim2: indicesMetaElementRepeatTimes = 1 *1*4 = 4
for (int i = 0; i < indexRank; i++) {
for (int i = 0; i < static_cast<int>(indexRank); i++) {
if (i == dim) {
continue;
} else {
@ -61,7 +61,7 @@ createOneDimTfIndices(PatternRewriter &rewriter, Operation *op,
}
}
if (dim != indexShape.size() - 1) {
if (dim != static_cast<int>(indexShape.size()) - 1) {
// Create one dim indices for index except for last dim
// Create indices raw vector.
// torch.stack(torch.meshgrid)