From 4744cbc758cf01417ba61aec92f029f1ca1fa586 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Fri, 30 Sep 2022 10:24:57 +0800 Subject: [PATCH] change mkldnn kernel layout, ALL_LAYOUT->ONEDNN (#46628) --- paddle/phi/kernels/onednn/clip_grad_kernel.cc | 2 +- paddle/phi/kernels/onednn/clip_kernel.cc | 2 +- paddle/phi/kernels/onednn/concat_grad_kernel.cc | 2 +- paddle/phi/kernels/onednn/expand_grad_kernel.cc | 2 +- paddle/phi/kernels/onednn/expand_kernel.cc | 8 ++------ paddle/phi/kernels/onednn/log_softmax_kernel.cc | 2 +- paddle/phi/kernels/onednn/pad3d_kernel.cc | 2 +- paddle/phi/kernels/onednn/pad_kernel.cc | 2 +- paddle/phi/kernels/onednn/slice_grad_kernel.cc | 2 +- paddle/phi/kernels/onednn/slice_kernel.cc | 2 +- paddle/phi/kernels/onednn/softmax_grad_kernel.cc | 2 +- 11 files changed, 12 insertions(+), 16 deletions(-) diff --git a/paddle/phi/kernels/onednn/clip_grad_kernel.cc b/paddle/phi/kernels/onednn/clip_grad_kernel.cc index aded64616b1..03da47cfa65 100644 --- a/paddle/phi/kernels/onednn/clip_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/clip_grad_kernel.cc @@ -48,7 +48,7 @@ void ClipGradKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(clip_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::ClipGradKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/clip_kernel.cc b/paddle/phi/kernels/onednn/clip_kernel.cc index 7538dd9708a..0accedb1724 100644 --- a/paddle/phi/kernels/onednn/clip_kernel.cc +++ b/paddle/phi/kernels/onednn/clip_kernel.cc @@ -43,4 +43,4 @@ void ClipKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - clip, OneDNN, ALL_LAYOUT, phi::ClipKernel, float, phi::dtype::bfloat16) {} + clip, OneDNN, ONEDNN, phi::ClipKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/concat_grad_kernel.cc b/paddle/phi/kernels/onednn/concat_grad_kernel.cc index be962a96aca..c36331c66f6 100644 --- a/paddle/phi/kernels/onednn/concat_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/concat_grad_kernel.cc @@ -78,7 +78,7 @@ void ConcatGradKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(concat_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::ConcatGradKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/expand_grad_kernel.cc b/paddle/phi/kernels/onednn/expand_grad_kernel.cc index dd8afdd8467..243505f990d 100644 --- a/paddle/phi/kernels/onednn/expand_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/expand_grad_kernel.cc @@ -86,7 +86,7 @@ void ExpandGradKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(expand_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::ExpandGradKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/expand_kernel.cc b/paddle/phi/kernels/onednn/expand_kernel.cc index 52d12bb100d..24aa0c401f5 100644 --- a/paddle/phi/kernels/onednn/expand_kernel.cc +++ b/paddle/phi/kernels/onednn/expand_kernel.cc @@ -75,9 +75,5 @@ void ExpandKernel(const Context& dev_ctx, } } // namespace phi -PD_REGISTER_KERNEL(expand, - OneDNN, - ALL_LAYOUT, - phi::ExpandKernel, - float, - phi::dtype::bfloat16) {} +PD_REGISTER_KERNEL( + expand, OneDNN, ONEDNN, phi::ExpandKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/log_softmax_kernel.cc b/paddle/phi/kernels/onednn/log_softmax_kernel.cc index 963bb7e0e32..800d67a31cb 100644 --- a/paddle/phi/kernels/onednn/log_softmax_kernel.cc +++ b/paddle/phi/kernels/onednn/log_softmax_kernel.cc @@ -65,7 +65,7 @@ void LogSoftmaxKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(log_softmax, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::LogSoftmaxKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/pad3d_kernel.cc b/paddle/phi/kernels/onednn/pad3d_kernel.cc index 2d34e11afc4..fae428b6aba 100644 --- a/paddle/phi/kernels/onednn/pad3d_kernel.cc +++ b/paddle/phi/kernels/onednn/pad3d_kernel.cc @@ -31,4 +31,4 @@ void Pad3dKernel(const Context& dev_ctx, } } // namespace phi -PD_REGISTER_KERNEL(pad3d, OneDNN, ALL_LAYOUT, phi::Pad3dKernel, float) {} +PD_REGISTER_KERNEL(pad3d, OneDNN, ONEDNN, phi::Pad3dKernel, float) {} diff --git a/paddle/phi/kernels/onednn/pad_kernel.cc b/paddle/phi/kernels/onednn/pad_kernel.cc index 4177f000dba..96949da8bea 100644 --- a/paddle/phi/kernels/onednn/pad_kernel.cc +++ b/paddle/phi/kernels/onednn/pad_kernel.cc @@ -34,4 +34,4 @@ void PadKernel(const Context& dev_ctx, } } // namespace phi -PD_REGISTER_KERNEL(pad, OneDNN, ALL_LAYOUT, phi::PadKernel, float) {} +PD_REGISTER_KERNEL(pad, OneDNN, ONEDNN, phi::PadKernel, float) {} diff --git a/paddle/phi/kernels/onednn/slice_grad_kernel.cc b/paddle/phi/kernels/onednn/slice_grad_kernel.cc index c38a2237e54..45a152fd694 100644 --- a/paddle/phi/kernels/onednn/slice_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/slice_grad_kernel.cc @@ -80,7 +80,7 @@ void SliceGradRawKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(slice_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::SliceGradRawKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/slice_kernel.cc b/paddle/phi/kernels/onednn/slice_kernel.cc index 3f74a2fe0be..252c464532d 100644 --- a/paddle/phi/kernels/onednn/slice_kernel.cc +++ b/paddle/phi/kernels/onednn/slice_kernel.cc @@ -101,7 +101,7 @@ void SliceRawKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(slice, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::SliceRawKernel, float, int8_t, diff --git a/paddle/phi/kernels/onednn/softmax_grad_kernel.cc b/paddle/phi/kernels/onednn/softmax_grad_kernel.cc index 0209992a679..facbb9e9f19 100644 --- a/paddle/phi/kernels/onednn/softmax_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/softmax_grad_kernel.cc @@ -50,4 +50,4 @@ void SoftmaxGradKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - softmax_grad, OneDNN, ALL_LAYOUT, phi::SoftmaxGradKernel, float) {} + softmax_grad, OneDNN, ONEDNN, phi::SoftmaxGradKernel, float) {} -- GitLab