Skip to content

Commit 21ba46c

Browse files
authored
Fix bug of some quantize ops because of lack of float16 registration (#65721)
* fix_quant_op_grad_dtype_bug * fix dtype error
1 parent 997bfe6 commit 21ba46c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

paddle/phi/kernels/fake_quantize_grad_kernel.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,12 @@ PD_REGISTER_KERNEL(fake_quantize_dequantize_abs_max_grad,
9797
GPU,
9898
ALL_LAYOUT,
9999
phi::FakeQuantizeDequantizeAbsMaxGradKernel,
100-
float) {}
100+
float,
101+
phi::dtype::float16) {}
101102
PD_REGISTER_KERNEL(fake_quantize_dequantize_moving_average_abs_max_grad,
102103
GPU,
103104
ALL_LAYOUT,
104105
phi::FakeQuantizeDequantizeMovingAverageAbsMaxGradKernel,
105-
float) {}
106+
float,
107+
phi::dtype::float16) {}
106108
#endif

0 commit comments

Comments
 (0)