From 63e6608d916685ff61ef7e133cdcc3c06f802db3 Mon Sep 17 00:00:00 2001 From: algorithm1832 <737634857@qq.com> Date: Thu, 2 Oct 2025 08:17:32 +0000 Subject: [PATCH] add and include .h file for c_scatter_kernel --- paddle/phi/kernels/gpu/c_scatter_kernel.cu | 1 + paddle/phi/kernels/gpu/c_scatter_kernel.h | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 paddle/phi/kernels/gpu/c_scatter_kernel.h diff --git a/paddle/phi/kernels/gpu/c_scatter_kernel.cu b/paddle/phi/kernels/gpu/c_scatter_kernel.cu index f2e1f65692749d..c7d5895f30c28e 100644 --- a/paddle/phi/kernels/gpu/c_scatter_kernel.cu +++ b/paddle/phi/kernels/gpu/c_scatter_kernel.cu @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/gpu/c_scatter_kernel.h" #include "glog/logging.h" #include "paddle/phi/core/distributed/comm_context_manager.h" diff --git a/paddle/phi/kernels/gpu/c_scatter_kernel.h b/paddle/phi/kernels/gpu/c_scatter_kernel.h new file mode 100644 index 00000000000000..8ec20b405bdd8d --- /dev/null +++ b/paddle/phi/kernels/gpu/c_scatter_kernel.h @@ -0,0 +1,29 @@ +// 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 { + +template +void CScatterOpCUDAKernel(const Context& dev_ctx, + const DenseTensor& input, + int ring_id, + int root, + int nranks, + bool use_calc_stream, + DenseTensor* out); +} // namespace phi