Skip to content

Commit

Permalink
[MTAI] feat(op): suppport Gaussian op on MUSA (PaddlePaddle#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
caizhi-mt authored and mt-robot committed Sep 22, 2023
1 parent 7840c4e commit 0936ee1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion paddle/phi/kernels/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ if(WITH_MUSA)
"gpu/fft_grad_kernel.cu"
"gpu/fft_kernel.cu"
"gpu/fused_softmax_mask_grad_kernel.cu"
"gpu/gaussian_kernel.cu"
"gpu/gelu_grad_kernel.cu"
"gpu/gelu_kernel.cu"
"gpu/histogram_kernel.cu"
Expand Down
10 changes: 10 additions & 0 deletions paddle/phi/kernels/gpu/gaussian_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ void GaussianKernel(const Context& dev_ctx,

} // namespace phi

#ifdef PADDLE_WITH_MUSA
PD_REGISTER_KERNEL(gaussian,
GPU,
ALL_LAYOUT,
phi::GaussianKernel,
phi::dtype::float16,
phi::dtype::bfloat16,
float) {}
#else
PD_REGISTER_KERNEL(gaussian,
GPU,
ALL_LAYOUT,
Expand All @@ -86,3 +95,4 @@ PD_REGISTER_KERNEL(gaussian,
phi::dtype::bfloat16,
float,
double) {}
#endif

0 comments on commit 0936ee1

Please sign in to comment.