Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Hackathon 6th Fundable Projects 3 No.227】 [fluid_ops] matmul #65939

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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