   // 3. softmax
   phi::LogSoftmaxForwardFunctor<AccT> func(max, sum);
   if (input_offset == output_offset) {
-    VectorizedSoftmaxForwardImpl<T, AccT, LabelT, VecSize, IgnoreIndex>(
-        loss,
-        softmax,
-        logits,
-        label,
-        mid_dim,
-        input_offset,
-        func,
-        ignore_index);
+    VectorizedSoftmaxForwardImpl<T, AccT, LabelT, VecSize>(loss,
+                                                           softmax,
+                                                           logits,
+                                                           label,
+                                                           mid_dim,
+                                                           input_offset,
+                                                           func,
+                                                           ignore_index);
   } else {
-    ScalarSoftmaxForwardImpl<T, AccT, LabelT, VecSize, IgnoreIndex>(
+    ScalarSoftmaxForwardImpl<T, AccT, LabelT, VecSize>(
         loss, softmax, logits, label, mid_dim, func, 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);
      }
    }
  }
}

  - Compute: sum of - sum_{j}{ label_{i,j} * (src_{i,j} - maxvalue_{i} -
log(sum[i]))}
One warp (32 threads) is used to compute 1 or 2 batch (kBatchSize).
For reduction max (sum), firstly compute max (sum) to one warp, then use
shuffle api to compute max (sum) in one warp.
*/
template <typename T, typename VecT, typename AccT, int Log2Elements>
__global__ void WarpSoftmaxForwardSoftLabel(T* loss,
