File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ static void ParseIndex(const paddle::Tensor& tensor,
525
525
if (slice_tensor.dtype () == phi::DataType::BOOL) {
526
526
// bool tensor consumes (rank of index tensor) dimensions of input
527
527
// tensor
528
- for (int i = 0 ; i < slice_tensor.shape ().size (); i++) {
528
+ for (size_t i = 0 ; i < slice_tensor.shape ().size (); i++) {
529
529
PADDLE_ENFORCE_EQ (slice_tensor.shape ()[i],
530
530
dim_len,
531
531
common::errors::OutOfRange (
@@ -684,7 +684,7 @@ static paddle::Tensor dealWithAdvancedIndex(
684
684
if (index.dtype () == phi::DataType::BOOL) {
685
685
*rank_of_new_dim = std::max (*rank_of_new_dim, 1 );
686
686
i--;
687
- for (int j = 0 ; j < index.shape ().size (); j++) {
687
+ for (size_t j = 0 ; j < index.shape ().size (); j++) {
688
688
i++;
689
689
index_dim = (*advanced_index_dim)[i];
690
690
trans_dim->push_back (index_dim);
You can’t perform that action at this time.
0 commit comments