From 063b11abd510fee8f54c93db0408cf7956e55939 Mon Sep 17 00:00:00 2001 From: iLeGend Date: Fri, 27 Dec 2024 14:33:39 +0800 Subject: [PATCH] [CodeStyle][Typos][C-2] Fix typo (`Caculate`) (#70490) --- ...h_multi_label_cross_entropy_grad_kernel.cu | 22 +++++++++---------- ...x_with_multi_label_cross_entropy_kernel.cu | 22 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_grad_kernel.cu b/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_grad_kernel.cu index d8fef64e1fe778..e8397a535f463b 100644 --- a/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_grad_kernel.cu @@ -35,15 +35,15 @@ static inline int64_t NumBlocks(const int64_t N) { } template -__global__ void CaculateSoftLogitsGrad(T* logits_grad, - const IndexT* labels, - const T* smooth_weight, - const IndexT ignore_index, - const int64_t start_index, - const int64_t end_index, - const int64_t N, - const int64_t D, - const int64_t C) { +__global__ void CalculateSoftLogitsGrad(T* logits_grad, + const IndexT* labels, + const T* smooth_weight, + const IndexT ignore_index, + const int64_t start_index, + const int64_t end_index, + const int64_t N, + const int64_t D, + const int64_t C) { CUDA_KERNEL_LOOP_TYPE(i, N, int64_t) { for (int j = 0; j < C; ++j) { auto real_label = labels[i * C + j]; @@ -111,7 +111,7 @@ void CSoftmaxWithMultiLabelCrossEntropyGradKernel( const int64_t end_index = start_index + D; if (label_type == phi::DataType::INT32) { - CaculateSoftLogitsGrad + CalculateSoftLogitsGrad <<>>(logit_grad_2d.data(), labels->data(), smooth_weight->data(), @@ -130,7 +130,7 @@ void CSoftmaxWithMultiLabelCrossEntropyGradKernel( C, sum_multi_label_loss); } else if (label_type == phi::DataType::INT64) { - CaculateSoftLogitsGrad + CalculateSoftLogitsGrad <<>>(logit_grad_2d.data(), labels->data(), smooth_weight->data(), diff --git a/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_kernel.cu b/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_kernel.cu index 22bef6d54fe0be..39f726760c448a 100644 --- a/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_kernel.cu +++ b/paddle/phi/kernels/gpu/c_softmax_with_multi_label_cross_entropy_kernel.cu @@ -85,15 +85,15 @@ __global__ void SoftMaskLabelByIndex(T* predicted_logits, } template -__global__ void CaculateSoftLoss(T* loss, - const T* predict_logits, - const T* sum_exp_logits, - const IndexT* label, - const T* smooth_weight, - const int64_t ignore_index, - const int64_t N, - const int64_t C, - const bool sum_multi_label_loss) { +__global__ void CalculateSoftLoss(T* loss, + const T* predict_logits, + const T* sum_exp_logits, + const IndexT* label, + const T* smooth_weight, + const int64_t ignore_index, + const int64_t N, + const int64_t C, + const bool sum_multi_label_loss) { CUDA_KERNEL_LOOP_TYPE(i, N, int64_t) { T tmp_loss = static_cast(0); loss[i] = static_cast(0); @@ -272,7 +272,7 @@ struct CSoftmaxWithMultiLabelCrossEntropyFunctor { comm_ctx->AllReduce(&sum_exp_logits, sum_exp_logits, ncclSum, stream); if (label_type == phi::DataType::INT32) { - CaculateSoftLoss + CalculateSoftLoss <<>>(loss_2d.data(), predicted_logits.data(), sum_exp_logits.data(), @@ -284,7 +284,7 @@ struct CSoftmaxWithMultiLabelCrossEntropyFunctor { sum_multi_label_loss); } else { - CaculateSoftLoss + CalculateSoftLoss <<>>(loss_2d.data(), predicted_logits.data(), sum_exp_logits.data(),