Skip to content

Commit 4a73fc3

Browse files
[ILUVATAR_GPU] Fix compilation errors due to Paddle updates (#1849)
1 parent 08f0567 commit 4a73fc3

18 files changed

+342
-606
lines changed

backends/iluvatar_gpu/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,19 @@ file(
158158
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rms_norm_grad_kernel.cu
159159
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/rms_norm_kernel.cu
160160
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/scale_kernel.cu
161+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/scatter_grad_kernel.cu
162+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/scatter_kernel.cu
163+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/scatter_nd_add_grad_kernel.cu
164+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/scatter_nd_add_kernel.cu
161165
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/sign_kernel.cu.cc
162166
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/slice_grad_kernel.cu.cc
163167
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/slice_kernel.cu.cc
164168
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/split_kernel.cu
165169
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/squared_l2_norm_kernel.cu
166170
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/stack_kernel.cu
167171
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/strided_copy_kernel.cu
172+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/strided_elementwise_copy_kernel.cu
173+
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/strided_slice_kernel.cu
168174
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/swiglu_grad_kernel.cu
169175
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/swiglu_kernel.cu
170176
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/set_value_grad_kernel.cu
@@ -212,7 +218,6 @@ file(
212218
# ernie_core
213219
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/fusion/gpu/fused_bias_act_kernel.cu
214220
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/expand_modality_expert_id_kernel.cu
215-
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/int_bincount.cu
216221
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/moe_combine_grad_kernel.cu
217222
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/moe_combine_kernel.cu
218223
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/moe_gate_dispatch_kernel.cu

backends/iluvatar_gpu/kernels/cuda_kernels/c_embedding_grad_kernel.cu

Lines changed: 0 additions & 148 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) 2023 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+
#include "paddle/phi/core/kernel_registry.h"
16+
#include "paddle/phi/kernels/c_embedding_grad_kernel.h"
17+
18+
PD_CUSTOM_KERNEL_REGISTER(c_embedding_grad,
19+
iluvatar_gpu,
20+
ALL_LAYOUT,
21+
phi::CEmbeddingGradKernel,
22+
float,
23+
phi::dtype::bfloat16,
24+
phi::dtype::float16,
25+
phi::dtype::complex<float>) {}

backends/iluvatar_gpu/kernels/cuda_kernels/c_embedding_kernel.cu

Lines changed: 0 additions & 122 deletions
This file was deleted.

backends/iluvatar_gpu/kernels/ernie_core/int_bincount_kernel_register.cc renamed to backends/iluvatar_gpu/kernels/cuda_kernels/c_embedding_kernel_register.cc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2025 PaddlePaddle Authors. All Rights Reserved.
1+
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -11,8 +11,15 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
1415
#include "paddle/phi/core/kernel_registry.h"
15-
#include "paddle/phi/kernels/legacy/gpu/int_bincount.cu" // NOLINT
16+
#include "paddle/phi/kernels/c_embedding_kernel.h"
1617

17-
PD_CUSTOM_KERNEL_REGISTER(
18-
int_bincount, iluvatar_gpu, ALL_LAYOUT, phi::IntBincount, int64_t, int) {}
18+
PD_CUSTOM_KERNEL_REGISTER(c_embedding,
19+
iluvatar_gpu,
20+
ALL_LAYOUT,
21+
phi::CEmbeddingKernel,
22+
float,
23+
phi::dtype::bfloat16,
24+
phi::dtype::float16,
25+
phi::dtype::complex<float>) {}

0 commit comments

Comments
 (0)