diff --git a/paddle/fluid/framework/ir/mkldnn/mkldnn_conv_bn_fuse_pass_tester.cc b/paddle/fluid/framework/ir/mkldnn/mkldnn_conv_bn_fuse_pass_tester.cc index 2d4f6263748940222dfc29824f254a585fb36a9f..e51073385bcbbb562945251d036060345f8e7c5c 100644 --- a/paddle/fluid/framework/ir/mkldnn/mkldnn_conv_bn_fuse_pass_tester.cc +++ b/paddle/fluid/framework/ir/mkldnn/mkldnn_conv_bn_fuse_pass_tester.cc @@ -38,7 +38,7 @@ USE_OP_DEVICE_KERNEL(conv2d_transpose, MKLDNN); USE_OP_ITSELF(elementwise_add); USE_OP_DEVICE_KERNEL(elementwise_add, MKLDNN); USE_OP_ITSELF(gelu); -PD_DECLARE_KERNEL(gelu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(gelu, OneDNN, ONEDNN); PD_DECLARE_ARG_MAPPING_FN(gelu); namespace paddle { diff --git a/paddle/fluid/framework/ir/mkldnn/mkldnn_inplace_pass_tester.cc b/paddle/fluid/framework/ir/mkldnn/mkldnn_inplace_pass_tester.cc index d78c0c4356266b7d6567c2b1faada889aae3905b..9b0cb0a60902f2c2625f5cfb6927b54a9528daaa 100644 --- a/paddle/fluid/framework/ir/mkldnn/mkldnn_inplace_pass_tester.cc +++ b/paddle/fluid/framework/ir/mkldnn/mkldnn_inplace_pass_tester.cc @@ -27,11 +27,11 @@ USE_OP_DEVICE_KERNEL(softmax, MKLDNN); USE_OP_ITSELF(elementwise_add); USE_OP_DEVICE_KERNEL(elementwise_add, MKLDNN); USE_OP_ITSELF(leaky_relu); -PD_DECLARE_KERNEL(leaky_relu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(leaky_relu, OneDNN, ONEDNN); USE_OP_ITSELF(gelu); USE_OP_ITSELF(relu); USE_OP_ITSELF(tanh); -PD_DECLARE_KERNEL(tanh, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(tanh, OneDNN, ONEDNN); PD_DECLARE_ARG_MAPPING_FN(gelu); namespace paddle { diff --git a/paddle/fluid/imperative/tests/test_prepare_op.cc b/paddle/fluid/imperative/tests/test_prepare_op.cc index f9501dedfe240060bb558e6aef349b343488cb2d..38b68bba2fcbdd11dfa98c66ddb60b03671e939f 100644 --- a/paddle/fluid/imperative/tests/test_prepare_op.cc +++ b/paddle/fluid/imperative/tests/test_prepare_op.cc @@ -259,5 +259,5 @@ TEST(test_prepare_op, test_prepare_data_cpu_mkldnn) { USE_OP_ITSELF(split); USE_OP_ITSELF(relu); #ifdef PADDLE_WITH_MKLDNN -PD_DECLARE_KERNEL(relu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(relu, OneDNN, ONEDNN); #endif diff --git a/paddle/fluid/operators/mkldnn/test_mkldnn_caching.cc b/paddle/fluid/operators/mkldnn/test_mkldnn_caching.cc index f05bd2635116c11cb48b73b4bef82d94f16e4252..d340e1a06052ffb9b0cef7cd1f4aee804a0ab27b 100644 --- a/paddle/fluid/operators/mkldnn/test_mkldnn_caching.cc +++ b/paddle/fluid/operators/mkldnn/test_mkldnn_caching.cc @@ -32,7 +32,7 @@ USE_OP_DEVICE_KERNEL(elementwise_add, MKLDNN); USE_OP_ITSELF(elementwise_mul); USE_OP_DEVICE_KERNEL(elementwise_mul, MKLDNN); USE_OP_ITSELF(relu); -PD_DECLARE_KERNEL(relu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(relu, OneDNN, ONEDNN); USE_OP_ITSELF(softmax); USE_OP_DEVICE_KERNEL(softmax, MKLDNN); USE_OP_ITSELF(conv2d); diff --git a/paddle/fluid/operators/mkldnn/test_mkldnn_op_inplace.cc b/paddle/fluid/operators/mkldnn/test_mkldnn_op_inplace.cc index 196e018507069c94ddefbc5bcb84156ae0a8b805..fde1ce5892265700e459c28e7c11be55d4aff066 100644 --- a/paddle/fluid/operators/mkldnn/test_mkldnn_op_inplace.cc +++ b/paddle/fluid/operators/mkldnn/test_mkldnn_op_inplace.cc @@ -30,7 +30,7 @@ USE_OP_ITSELF(elementwise_add); USE_OP_DEVICE_KERNEL(elementwise_add, MKLDNN); USE_OP_ITSELF(relu); -PD_DECLARE_KERNEL(relu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(relu, OneDNN, ONEDNN); USE_OP_ITSELF(softmax); USE_OP_DEVICE_KERNEL(softmax, MKLDNN); diff --git a/paddle/fluid/operators/mkldnn/test_mkldnn_op_nhwc.cc b/paddle/fluid/operators/mkldnn/test_mkldnn_op_nhwc.cc index ad2b53de1ed9158f11aad5977ff396b648cd54aa..3efea85ec540c7510e33c44bed23dae668b550ea 100644 --- a/paddle/fluid/operators/mkldnn/test_mkldnn_op_nhwc.cc +++ b/paddle/fluid/operators/mkldnn/test_mkldnn_op_nhwc.cc @@ -30,11 +30,11 @@ USE_OP_ITSELF(pool2d); USE_OP_DEVICE_KERNEL(pool2d, MKLDNN); USE_OP_ITSELF(relu); -PD_DECLARE_KERNEL(relu, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(relu, OneDNN, ONEDNN); USE_OP_ITSELF(transpose); USE_OP_DEVICE_KERNEL(transpose, MKLDNN); USE_OP_ITSELF(shape); -PD_DECLARE_KERNEL(shape, OneDNN, ALL_LAYOUT); +PD_DECLARE_KERNEL(shape, OneDNN, ONEDNN); USE_OP_ITSELF(crop); USE_OP_DEVICE_KERNEL(crop, CPU); diff --git a/paddle/phi/kernels/onednn/activation_grad_kernel.cc b/paddle/phi/kernels/onednn/activation_grad_kernel.cc index 9e183abf0287fa595c6905f1a44665eef62ead4a..3e59a2a0df2e0cf5a299f5026de1101a96dcf17f 100644 --- a/paddle/phi/kernels/onednn/activation_grad_kernel.cc +++ b/paddle/phi/kernels/onednn/activation_grad_kernel.cc @@ -260,14 +260,14 @@ void Relu6GradKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(relu_grad, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::ReluGradKernel, float, phi::dtype::bfloat16) {} #define PD_REGISTER_ACTIVATION_GRAD_KERNEL(name, func) \ PD_REGISTER_KERNEL( \ - name, OneDNN, ALL_LAYOUT, phi::func, float, phi::dtype::bfloat16) {} + name, OneDNN, ONEDNN, phi::func, float, phi::dtype::bfloat16) {} PD_REGISTER_ACTIVATION_GRAD_KERNEL(abs_grad, AbsGradKernel) PD_REGISTER_ACTIVATION_GRAD_KERNEL(elu_grad, EluGradKernel) diff --git a/paddle/phi/kernels/onednn/activation_kernel.cc b/paddle/phi/kernels/onednn/activation_kernel.cc index 36ba1be724ccf103ff47f65a8873992289fe9f44..b9db43fa03b962b735b38da23c8b198cbeff9c80 100644 --- a/paddle/phi/kernels/onednn/activation_kernel.cc +++ b/paddle/phi/kernels/onednn/activation_kernel.cc @@ -192,11 +192,11 @@ void Relu6Kernel(const Context& dev_ctx, } // namespace phi -PD_REGISTER_KERNEL(round, OneDNN, ALL_LAYOUT, phi::RoundKernel, float) {} +PD_REGISTER_KERNEL(round, OneDNN, ONEDNN, phi::RoundKernel, float) {} #define PD_REGISTER_ACTIVATION_KERNEL(name, func) \ PD_REGISTER_KERNEL( \ - name, OneDNN, ALL_LAYOUT, phi::func, float, phi::dtype::bfloat16) {} + name, OneDNN, ONEDNN, phi::func, float, phi::dtype::bfloat16) {} PD_REGISTER_ACTIVATION_KERNEL(abs, AbsKernel) PD_REGISTER_ACTIVATION_KERNEL(elu, EluKernel) diff --git a/paddle/phi/kernels/onednn/shape_kernel.cc b/paddle/phi/kernels/onednn/shape_kernel.cc index b6fcd32f1c81a5de2d1ee57704ae69619bf789b3..a59e8fa01daa537ea2430faa9cfa6f8d457f271f 100644 --- a/paddle/phi/kernels/onednn/shape_kernel.cc +++ b/paddle/phi/kernels/onednn/shape_kernel.cc @@ -51,7 +51,7 @@ void ShapeKernel(const Context& dev_ctx, PD_REGISTER_KERNEL(shape, OneDNN, - ALL_LAYOUT, + ONEDNN, phi::ShapeKernel, float, phi::dtype::bfloat16,