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,
525525 if (slice_tensor.dtype () == phi::DataType::BOOL) {
526526 // bool tensor consumes (rank of index tensor) dimensions of input
527527 // tensor
528- for (int i = 0 ; i < slice_tensor.shape ().size (); i++) {
528+ for (size_t i = 0 ; i < slice_tensor.shape ().size (); i++) {
529529 PADDLE_ENFORCE_EQ (slice_tensor.shape ()[i],
530530 dim_len,
531531 common::errors::OutOfRange (
@@ -684,7 +684,7 @@ static paddle::Tensor dealWithAdvancedIndex(
684684 if (index.dtype () == phi::DataType::BOOL) {
685685 *rank_of_new_dim = std::max (*rank_of_new_dim, 1 );
686686 i--;
687- for (int j = 0 ; j < index.shape ().size (); j++) {
687+ for (size_t j = 0 ; j < index.shape ().size (); j++) {
688688 i++;
689689 index_dim = (*advanced_index_dim)[i];
690690 trans_dim->push_back (index_dim);
You can’t perform that action at this time.
0 commit comments