diff --git a/paddle/phi/kernels/cpu/sequence_expand_kernel.cc b/paddle/phi/kernels/cpu/sequence_expand_kernel.cc index 1f9989820e3392..5a43af7a9037b0 100644 --- a/paddle/phi/kernels/cpu/sequence_expand_kernel.cc +++ b/paddle/phi/kernels/cpu/sequence_expand_kernel.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/sequence_expand_kernel.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/impl/sequence_expand_kernel_impl.h" - namespace phi { template diff --git a/paddle/phi/kernels/gpu/sequence_expand_kernel.cu b/paddle/phi/kernels/gpu/sequence_expand_kernel.cu index 77f2726cdfcadf..dc0a13404c4d56 100644 --- a/paddle/phi/kernels/gpu/sequence_expand_kernel.cu +++ b/paddle/phi/kernels/gpu/sequence_expand_kernel.cu @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/sequence_expand_kernel.h" #include "paddle/phi/backends/gpu/gpu_primitives.h" #include "paddle/phi/kernels/impl/sequence_expand_kernel_impl.h" - namespace phi { template diff --git a/paddle/phi/kernels/sequence_expand_kernel.h b/paddle/phi/kernels/sequence_expand_kernel.h new file mode 100644 index 00000000000000..c23892ae76db92 --- /dev/null +++ b/paddle/phi/kernels/sequence_expand_kernel.h @@ -0,0 +1,30 @@ +// Copyright (c) 2024 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" +#include "paddle/phi/core/device_context.h" +#include "paddle/phi/core/kernel_registry.h" + +namespace phi { + +template +void SequenceExpandKernel(const Context& dev_ctx, + const DenseTensor& x, + const DenseTensor& y, + int ref_level, + DenseTensor* out); + +} // namespace phi