Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/kernels/gpu/box_clip_kernel.cu" //NOLINT
#include "paddle/phi/kernels/gpu/box_clip_kernel.h"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iluvatar的编译列表中需要添加box_clip_kernel.cu

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iluvatar的CMakeLists中第300行已经包括box_clip_kernel.cu

${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/box_clip_kernel.cu

它和其它文件已写入CUDA_SRCS2,并包含在CUDA_SRCS中去重
对应位置的操作为

set(CUDA_SRCS ${CUDA_SRCS1} ${CUDA_SRCS2})
list(REMOVE_DUPLICATES CUDA_SRCS1)

那么我还需要在CMakeLists中的其它位置添加box_clip_kernel.cu吗?


PD_CUSTOM_KERNEL_REGISTER(
box_clip, iluvatar_gpu, ALL_LAYOUT, phi::GPUBoxClipKernel, float, double) {}
1 change: 1 addition & 0 deletions backends/metax_gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ file(
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/angle_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/adamax_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/bincount_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/box_clip_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/c_embedding_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/c_embedding_grad_kernel.cu
${PADDLE_SOURCE_DIR}/paddle/phi/kernels/gpu/cast_kernel.cu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include "paddle/phi/core/kernel_registry.h"
#include "paddle/phi/kernels/gpu/box_clip_kernel.cu" //NOLINT
#include "paddle/phi/kernels/gpu/box_clip_kernel.h"

PD_CUSTOM_KERNEL_REGISTER(
box_clip, metax_gpu, ALL_LAYOUT, phi::GPUBoxClipKernel, float, double) {}