diff --git a/paddle/phi/kernels/comm_init_all_kernel.h b/paddle/phi/kernels/comm_init_all_kernel.h new file mode 100644 index 00000000000000..4bc650857f969d --- /dev/null +++ b/paddle/phi/kernels/comm_init_all_kernel.h @@ -0,0 +1,24 @@ +// 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 CommInitAllKernel(const Context& dev_ctx, + const std::vector& devices_input, + int ring_id); +} // namespace phi diff --git a/paddle/phi/kernels/gpu/comm_init_all_kernel.cu b/paddle/phi/kernels/gpu/comm_init_all_kernel.cu index ade7b5a7b42f59..9f759fdc0f4ddf 100644 --- a/paddle/phi/kernels/gpu/comm_init_all_kernel.cu +++ b/paddle/phi/kernels/gpu/comm_init_all_kernel.cu @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/comm_init_all_kernel.h" #include #include "glog/logging.h" #include "paddle/phi/core/kernel_registry.h" diff --git a/paddle/phi/kernels/xpu/comm_init_all_kernel.cc b/paddle/phi/kernels/xpu/comm_init_all_kernel.cc index 61402ba2ade51e..c4a76e0d25e556 100644 --- a/paddle/phi/kernels/xpu/comm_init_all_kernel.cc +++ b/paddle/phi/kernels/xpu/comm_init_all_kernel.cc @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "paddle/phi/kernels/comm_init_all_kernel.h" #include #include "glog/logging.h" #include "paddle/phi/core/kernel_registry.h"