Skip to content

Commit 4cd0d69

Browse files
authored
【CUDA Kernel No.92】partial_send算子Kernel修复-part (#75640)
* Add partial_send_kernel.h * Change name * chore: retry CI checks * Fix
1 parent c73a614 commit 4cd0d69

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

paddle/phi/kernels/cpu/partial_send_kernel.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <algorithm>
1616
#include <utility>
1717
#include <vector>
18-
1918
#include "paddle/phi/core/kernel_registry.h"
2019

2120
namespace phi {

paddle/phi/kernels/gpu/partial_send_kernel.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "glog/logging.h"
2020
#include "paddle/phi/core/distributed/utils.h"
2121
#include "paddle/phi/core/kernel_registry.h"
22-
22+
#include "paddle/phi/kernels/gpu/partial_send_kernel.h"
2323
#if defined(PADDLE_WITH_NCCL) || defined(PADDLE_WITH_RCCL)
2424
#include "paddle/phi/core/distributed/nccl_comm_context.h"
2525
#endif
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright (c) 2024 PaddlePaddle Authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#pragma once
16+
17+
#include "paddle/phi/core/dense_tensor.h"
18+
#include "paddle/phi/core/device_context.h"
19+
20+
namespace phi {
21+
22+
template <typename T, typename Context>
23+
void PartialSendKernel(
24+
const Context& dev_ctx, const DenseTensor& x, int peer, int num, int id);
25+
26+
} // namespace phi

0 commit comments

Comments
 (0)