diff --git a/paddle/fluid/operators/share_buffer_op.cc b/paddle/fluid/operators/share_buffer_op.cc index 89d6b231d72347f57fa4bf8b90df7879ad21c84d..14f64990496097a70935119033601ac79adeaade 100644 --- a/paddle/fluid/operators/share_buffer_op.cc +++ b/paddle/fluid/operators/share_buffer_op.cc @@ -66,3 +66,11 @@ REGISTER_OPERATOR(share_buffer, ops::ShareBufferOp, ops::ShareBufferOpMaker); // dtype is not important REGISTER_OP_CPU_KERNEL(share_buffer, ops::ShareBufferOpKernel); + +#ifdef PADDLE_WITH_ASCEND_CL +REGISTER_OP_NPU_KERNEL(share_buffer, ops::ShareBufferOpKernel); +#endif + +#ifdef PADDLE_WITH_XPU +REGISTER_OP_XPU_KERNEL(share_buffer, ops::ShareBufferOpKernel); +#endif