diff --git a/paddle/phi/kernels/correlation_kernel.h b/paddle/phi/kernels/correlation_kernel.h new file mode 100644 index 00000000000000..21266a55729c90 --- /dev/null +++ b/paddle/phi/kernels/correlation_kernel.h @@ -0,0 +1,31 @@ +// 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" + +namespace phi { +template +void CorrelationCUDAKernel(const Context &dev_ctx, + const DenseTensor &input1, + const DenseTensor &input2, + int pad_size, + int kernel_size, + int max_displacement, + int stride1, + int stride2, + int corr_type_multiply, + DenseTensor *out); +} // namespace phi diff --git a/paddle/phi/kernels/cpu/correlation_kernel.cc b/paddle/phi/kernels/cpu/correlation_kernel.cc index 2abd8262cdf3e7..7210cf366d7261 100644 --- a/paddle/phi/kernels/cpu/correlation_kernel.cc +++ b/paddle/phi/kernels/cpu/correlation_kernel.cc @@ -18,6 +18,7 @@ #include #include "paddle/phi/core/kernel_registry.h" +#include "paddle/phi/kernels/correlation_kernel.h" #include "paddle/phi/kernels/funcs/correlation_funcs.h" namespace phi { diff --git a/paddle/phi/kernels/gpu/correlation_kernel.cu b/paddle/phi/kernels/gpu/correlation_kernel.cu index ab47d8bdc96c40..898d6c874537a8 100644 --- a/paddle/phi/kernels/gpu/correlation_kernel.cu +++ b/paddle/phi/kernels/gpu/correlation_kernel.cu @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/correlation_kernel.h" #include "paddle/phi/backends/context_pool.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/kernel_registry.h"