Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc committed Aug 30, 2024
1 parent 1794f42 commit 62d1dc7
Show file tree
Hide file tree
Showing 22 changed files with 337 additions and 1,155 deletions.
45 changes: 0 additions & 45 deletions paddle/fluid/operators/matmul_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -946,51 +946,6 @@ REGISTER_OPERATOR(matmul_grad,
ops::MatMulOpDoubleGradMaker<paddle::framework::OpDesc>,
ops::MatMulOpDoubleGradMaker<paddle::imperative::OpBase>);
REGISTER_OPERATOR(matmul_grad_grad, ops::MatMulOpDoubleGrad);
REGISTER_OP_CPU_KERNEL(matmul,
ops::MatMulKernel<phi::CPUContext, float>,
ops::MatMulKernel<phi::CPUContext, double>);
REGISTER_OP_CPU_KERNEL(matmul_grad,
ops::MatMulGradKernel<phi::CPUContext, float>,
ops::MatMulGradKernel<phi::CPUContext, double>);

REGISTER_OP_CPU_KERNEL(matmul_grad_grad,
ops::MatMulDoubleGradKernel<phi::CPUContext, float>,
ops::MatMulDoubleGradKernel<phi::CPUContext, double>);

#if defined(PADDLE_WITH_HIP)
REGISTER_OP_CUDA_KERNEL(
matmul,
ops::MatMulKernel<phi::GPUContext, int8_t>,
ops::MatMulKernel<phi::GPUContext, float>,
ops::MatMulKernel<phi::GPUContext, double>,
ops::MatMulKernel<phi::GPUContext, phi::dtype::float16>);
#endif

#if defined(PADDLE_WITH_CUDA)
#if CUDA_VERSION >= 11060
REGISTER_OP_CUDA_KERNEL(
matmul,
ops::MatMulKernel<phi::GPUContext, int8_t>,
ops::MatMulKernel<phi::GPUContext, float>,
ops::MatMulKernel<phi::GPUContext, double>,
ops::MatMulKernel<phi::GPUContext, phi::dtype::float16>);
#else
REGISTER_OP_CUDA_KERNEL(
matmul,
ops::MatMulKernel<phi::GPUContext, float>,
ops::MatMulKernel<phi::GPUContext, double>,
ops::MatMulKernel<phi::GPUContext, phi::dtype::float16>);
#endif
#endif

REGISTER_OP_CUDA_KERNEL(
matmul_grad,
ops::MatMulGradKernel<phi::GPUContext, float>,
ops::MatMulGradKernel<phi::GPUContext, double>,
ops::MatMulGradKernel<phi::GPUContext, phi::dtype::float16>);
REGISTER_OP_CUDA_KERNEL(matmul_grad_grad,
ops::MatMulDoubleGradKernel<phi::GPUContext, float>,
ops::MatMulDoubleGradKernel<phi::GPUContext, double>);

REGISTER_OP_VERSION(matmul).AddCheckpoint(
R"ROC(Register matmul for adding the attribute of
Expand Down
162 changes: 0 additions & 162 deletions paddle/fluid/operators/matmul_op_xpu.cc

This file was deleted.

Loading

0 comments on commit 62d1dc7

Please sign in to comment.