     if (sum_out_lods4 > 1) {
       int out_data_num = sum_out_lods4 - 1;
       int out_start = ins_start;
-
       if (out_start < out_data_num) {
         int out_end = ins_end >= out_data_num ? out_data_num : ins_end;
         for (int p = out_start; p < out_end; p++) {


  if (N < ins_end) ins_end = N;

  /*
    if (!x1_lods_filled) {
      for (int p = ins_start; p < ins_end; p++) {
        x1_lods_data[p] = p;
      }
      if (idx == 0) {
        x1_lods_data[N] = N;
      }
    }

    if (!x2_lods_filled) {
      for (int p = ins_start; p < ins_end; p++) {
        x2_lods_data[p] = p;
      }
      if (idx == 0) {
        x2_lods_data[N] = N;
      }
    }

    if (!x1_lods_filled || !x2_lods_filled) {
      b.sync();
    }
  */

  int flag_data[5];
  int prefix_sum_data[5];
  int prefix_sum_data2[5];

    LoDTensor* loss_weight = context.Output<LoDTensor>("LossWeight");

    int out_first = x1_lods.back();

    out->Resize(phi::make_ddim({(int64_t)out_first, (int64_t)x1_embed_size}));
    map->Resize(phi::make_ddim({(int64_t)x2_lods_size, 3}));
