From 137dc3e3d5a60dbf1e77bb20aa0cfc51388e1cf0 Mon Sep 17 00:00:00 2001 From: wuyefeilin <30919197+wuyefeilin@users.noreply.github.com> Date: Tue, 12 Apr 2022 11:20:22 +0800 Subject: [PATCH] add fp16 kernel to clip_grad (#41661) --- 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 b76086be64..4566e8468e 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