diff --git a/paddle/fluid/operators/assign_op.cc b/paddle/fluid/operators/assign_op.cc
index 433cabcfee0104a1112baa4aca6c18d072d8f696..09452b8f68baf22639b07372ad4777b55aa1527b 100644
--- a/paddle/fluid/operators/assign_op.cc
+++ b/paddle/fluid/operators/assign_op.cc
@@ -160,15 +160,15 @@ REGISTER_OPERATOR(assign, ops::AssignOp,
 
 REGISTER_OP_CPU_KERNEL_FUNCTOR(assign, float, ops::AssignKernel, double,
                                ops::AssignKernel, int, ops::AssignKernel,
-                               int64_t, ops::AssignKernel, bool,
-                               ops::AssignKernel, plat::float16,
-                               ops::AssignKernel, plat::bfloat16,
+                               int64_t, ops::AssignKernel, uint8_t,
+                               ops::AssignKernel, bool, ops::AssignKernel,
+                               plat::float16, ops::AssignKernel, plat::bfloat16,
                                ops::AssignKernel);
 
 #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
 REGISTER_OP_CUDA_KERNEL_FUNCTOR(assign, float, ops::AssignKernel, double,
                                 ops::AssignKernel, int, ops::AssignKernel,
-                                int64_t, ops::AssignKernel, bool,
-                                ops::AssignKernel, plat::float16,
-                                ops::AssignKernel);
+                                int64_t, ops::AssignKernel, uint8_t,
+                                ops::AssignKernel, bool, ops::AssignKernel,
+                                plat::float16, ops::AssignKernel);
 #endif