From d447c67834af213c72df9db79ad39267a901d6a2 Mon Sep 17 00:00:00 2001 From: wuyefeilin <30919197+wuyefeilin@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:12:46 +0800 Subject: [PATCH] add fp16 kernel to clip_grad (#41675) --- paddle/phi/kernels/gpu/clip_grad_kernel.cu | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paddle/phi/kernels/gpu/clip_grad_kernel.cu b/paddle/phi/kernels/gpu/clip_grad_kernel.cu index b76086be648..4566e8468ec 100644 --- a/paddle/phi/kernels/gpu/clip_grad_kernel.cu +++ b/paddle/phi/kernels/gpu/clip_grad_kernel.cu @@ -15,6 +15,7 @@ #include "paddle/phi/kernels/clip_grad_kernel.h" #include "paddle/phi/backends/gpu/gpu_context.h" +#include "paddle/phi/common/float16.h" #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/impl/clip_grad_kernel_impl.h" @@ -25,4 +26,5 @@ PD_REGISTER_KERNEL(clip_grad, float, double, int, - int64_t) {} + int64_t, + phi::dtype::float16) {} -- GitLab