   block_size = std::max(block_size, kps::details::kWarpSize);
   dim3 grids(high_dim);
   dim3 blocks(block_size);
-  VectorizedSoftmaxForward<T, AccT, LabelT, vec_size, IgnoreIndex>
+  VectorizedSoftmaxForward<T, AccT, LabelT, vec_size>
       <<<grids, blocks, 0, stream>>>(
           loss, softmax, logits, label, high_dim, mid_dim, ignore_index);
 }

    } else {
      auto* logits_data = logits.data<T>();
      auto* labels_data = label.data<LabelT>();
      if (ignore_index >= 0 && ignore_index < axis_dim) {
        SoftmaxWithCrossEntropyHardLabel<T, LabelT, true>(dev_ctx,
                                                          rank,
                                                          axis_v,
                                                          logits_data,
                                                          labels_data,
                                                          loss_data,
                                                          softmax_data,
                                                          n,
                                                          axis_dim,
                                                          d / axis_dim,
                                                          ignore_index);
      } else {
        SoftmaxWithCrossEntropyHardLabel<T, LabelT, false>(dev_ctx,
                                                           rank,
                                                           axis_v,
                                                           logits_data,
                                                           labels_data,
                                                           loss_data,
                                                           softmax_data,
                                                           n,
                                                           axis_dim,
                                                           d / axis_dim,
                                                           ignore_index);
      }
    }
  }
}

            // label
            int loss_idx = (threadIdx.x + it * kWarpSize) * kVSize + s;
            auto lbl = static_cast<int64_t>(label[first_batch + i]);
            if (lbl == ignore_index) {
              loss[first_batch + i] = static_cast<T>(0.0);
            } else {
              if (lbl >= 0 && lbl < element_count) {
                if (lbl == loss_idx) {
                  loss[first_batch + i] = -logsoftmax;
                }
              } else {
                PADDLE_ENFORCE(
                    false,
                    "The value of label expected >= 0 and < %d, or == %d, "
                    "but got %ld. Please check label value.",
                    element_count,
                    ignore_index,
                    lbl);
              }
            }
          } else {  // softmax
