From 4b9dae01c9c74cbda5a6a52e408cb71fe8320fc0 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Fri, 30 Sep 2022 10:20:42 +0800 Subject: [PATCH] change mkldnn kernel layout, ALL_LAYOUT->ONEDNN (#46627) --- paddle/phi/kernels/onednn/add_n_kernel.cc | 2 +- paddle/phi/kernels/onednn/cast_kernel.cc | 2 +- paddle/phi/kernels/onednn/full_kernel.cc | 2 +- paddle/phi/kernels/onednn/gaussian_random_kernel.cc | 2 +- paddle/phi/kernels/onednn/interpolate_kernel.cc | 4 ++-- paddle/phi/kernels/onednn/scale_kernel.cc | 2 +- paddle/phi/kernels/onednn/sgd_kernel.cc | 5 ++--- paddle/phi/kernels/onednn/split_kernel.cc | 4 ++-- paddle/phi/kernels/onednn/stack_kernel.cc | 2 +- 9 files changed, 12 insertions(+), 13 deletions(-) diff --git a/paddle/phi/kernels/onednn/add_n_kernel.cc b/paddle/phi/kernels/onednn/add_n_kernel.cc index 421e60504be..413408a21e0 100644 --- a/paddle/phi/kernels/onednn/add_n_kernel.cc +++ b/paddle/phi/kernels/onednn/add_n_kernel.cc @@ -132,4 +132,4 @@ void AddNKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - add_n, OneDNN, ALL_LAYOUT, phi::AddNKernel, float, phi::dtype::bfloat16) {} + add_n, OneDNN, ONEDNN, phi::AddNKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/cast_kernel.cc b/paddle/phi/kernels/onednn/cast_kernel.cc index 166db43db66..74298cc055e 100644 --- a/paddle/phi/kernels/onednn/cast_kernel.cc +++ b/paddle/phi/kernels/onednn/cast_kernel.cc @@ -56,4 +56,4 @@ void CastKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - cast, OneDNN, ALL_LAYOUT, phi::CastKernel, float, phi::dtype::bfloat16) {} + cast, OneDNN, ONEDNN, phi::CastKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/full_kernel.cc b/paddle/phi/kernels/onednn/full_kernel.cc index 5a444175bfb..2820427af4d 100644 --- a/paddle/phi/kernels/onednn/full_kernel.cc +++ b/paddle/phi/kernels/onednn/full_kernel.cc @@ -85,4 +85,4 @@ void FullKernel(const Context& dev_ctx, } } // namespace phi -PD_REGISTER_KERNEL(full, OneDNN, ALL_LAYOUT, phi::FullKernel, float) {} +PD_REGISTER_KERNEL(full, OneDNN, ONEDNN, phi::FullKernel, float) {} diff --git a/paddle/phi/kernels/onednn/gaussian_random_kernel.cc b/paddle/phi/kernels/onednn/gaussian_random_kernel.cc index b8259754d0b..853cbfaa8a3 100644 --- a/paddle/phi/kernels/onednn/gaussian_random_kernel.cc +++ b/paddle/phi/kernels/onednn/gaussian_random_kernel.cc @@ -47,4 +47,4 @@ void GaussianRandomKernel(const Context& ctx, } // namespace phi PD_REGISTER_KERNEL( - gaussian_random, OneDNN, ALL_LAYOUT, phi::GaussianRandomKernel, float) {} + gaussian_random, OneDNN, ONEDNN, phi::GaussianRandomKernel, float) {} diff --git a/paddle/phi/kernels/onednn/interpolate_kernel.cc b/paddle/phi/kernels/onednn/interpolate_kernel.cc index f70b9bcaf1a..abef0ccf6fe 100644 --- a/paddle/phi/kernels/onednn/interpolate_kernel.cc +++ b/paddle/phi/kernels/onednn/interpolate_kernel.cc @@ -228,11 +228,11 @@ void NearestInterpKernel( } // namespace phi PD_REGISTER_KERNEL( - bilinear_interp, OneDNN, ALL_LAYOUT, phi::BilinearInterpKernel, float) {} + bilinear_interp, OneDNN, ONEDNN, phi::BilinearInterpKernel, float) {} PD_REGISTER_KERNEL(nearest_interp, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::NearestInterpKernel, float, phi::dtype::bfloat16, diff --git a/paddle/phi/kernels/onednn/scale_kernel.cc b/paddle/phi/kernels/onednn/scale_kernel.cc index 9ff767cff8c..68bee7a39c8 100644 --- a/paddle/phi/kernels/onednn/scale_kernel.cc +++ b/paddle/phi/kernels/onednn/scale_kernel.cc @@ -59,4 +59,4 @@ void ScaleKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - scale, OneDNN, ALL_LAYOUT, phi::ScaleKernel, float, phi::dtype::bfloat16) {} + scale, OneDNN, ONEDNN, phi::ScaleKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/sgd_kernel.cc b/paddle/phi/kernels/onednn/sgd_kernel.cc index bbb02204105..5bdcbf03e1f 100644 --- a/paddle/phi/kernels/onednn/sgd_kernel.cc +++ b/paddle/phi/kernels/onednn/sgd_kernel.cc @@ -82,12 +82,11 @@ void SGDDenseParamSparseGradKernel( } // namespace phi PD_REGISTER_KERNEL( - sgd, OneDNN, ALL_LAYOUT, phi::SGDDenseKernel, float, phi::dtype::bfloat16) { -} + sgd, OneDNN, ONEDNN, phi::SGDDenseKernel, float, phi::dtype::bfloat16) {} PD_REGISTER_KERNEL(sgd_dense_param_sparse_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::SGDDenseParamSparseGradKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/split_kernel.cc b/paddle/phi/kernels/onednn/split_kernel.cc index 1d0544758fe..94c0924e36e 100644 --- a/paddle/phi/kernels/onednn/split_kernel.cc +++ b/paddle/phi/kernels/onednn/split_kernel.cc @@ -80,11 +80,11 @@ void SplitWithNumKernel(const Context& dev_ctx, } // namespace phi PD_REGISTER_KERNEL( - split, OneDNN, ALL_LAYOUT, phi::SplitKernel, float, phi::dtype::bfloat16) {} + split, OneDNN, ONEDNN, phi::SplitKernel, float, phi::dtype::bfloat16) {} PD_REGISTER_KERNEL(split_with_num, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::SplitWithNumKernel, float, phi::dtype::bfloat16) {} diff --git a/paddle/phi/kernels/onednn/stack_kernel.cc b/paddle/phi/kernels/onednn/stack_kernel.cc index 6ede31952e8..ba418f4de6f 100644 --- a/paddle/phi/kernels/onednn/stack_kernel.cc +++ b/paddle/phi/kernels/onednn/stack_kernel.cc @@ -124,4 +124,4 @@ void StackKernel(const Context& dev_ctx, } // namespace phi -PD_REGISTER_KERNEL(stack, OneDNN, ALL_LAYOUT, phi::StackKernel, float) {} +PD_REGISTER_KERNEL(stack, OneDNN, ONEDNN, phi::StackKernel, float) {} -- GitLab