diff --git a/paddle/phi/kernels/fused_softmax_mask_kernel.h b/paddle/phi/kernels/fused_softmax_mask_kernel.h new file mode 100644 index 00000000000000..76c9a0b7d667d5 --- /dev/null +++ b/paddle/phi/kernels/fused_softmax_mask_kernel.h @@ -0,0 +1,26 @@ +// Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#pragma once +#include "paddle/phi/core/dense_tensor.h" + +namespace phi { +namespace fusion { +template +void FusedSoftmaxMaskKernel(const Context& dev_ctx, + const DenseTensor& x, + const DenseTensor& mask, + DenseTensor* out); +} // namespace fusion +} // namespace phi diff --git a/paddle/phi/kernels/fusion/cpu/fused_softmax_mask_kernel.cc b/paddle/phi/kernels/fusion/cpu/fused_softmax_mask_kernel.cc index 571c3c2c20968b..76797a35b384f8 100644 --- a/paddle/phi/kernels/fusion/cpu/fused_softmax_mask_kernel.cc +++ b/paddle/phi/kernels/fusion/cpu/fused_softmax_mask_kernel.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/fused_softmax_mask_kernel.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/elementwise_add_kernel.h" #include "paddle/phi/kernels/softmax_kernel.h" diff --git a/paddle/phi/kernels/fusion/gpu/fused_softmax_mask_kernel.cu b/paddle/phi/kernels/fusion/gpu/fused_softmax_mask_kernel.cu index 45fd8f0a7da4a0..dcedf010bad4b6 100644 --- a/paddle/phi/kernels/fusion/gpu/fused_softmax_mask_kernel.cu +++ b/paddle/phi/kernels/fusion/gpu/fused_softmax_mask_kernel.cu @@ -16,6 +16,7 @@ #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/kernel_registry.h" +#include "paddle/phi/kernels/fused_softmax_mask_kernel.h" #include "paddle/phi/kernels/fusion/gpu/fused_softmax_mask_utils.h" namespace phi { diff --git a/paddle/phi/kernels/fusion/xpu/fused_softmax_mask_kernel.cc b/paddle/phi/kernels/fusion/xpu/fused_softmax_mask_kernel.cc index fbd7c444e1aa92..3548205e9cbcfa 100644 --- a/paddle/phi/kernels/fusion/xpu/fused_softmax_mask_kernel.cc +++ b/paddle/phi/kernels/fusion/xpu/fused_softmax_mask_kernel.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/fused_softmax_mask_kernel.h" #include "paddle/phi/backends/xpu/enforce_xpu.h" #include "paddle/phi/core/kernel_registry.h"