From d14858e4baf0aaeeaa9ccd33623958de6f4a6bd4 Mon Sep 17 00:00:00 2001 From: Michal Gallus Date: Tue, 6 Nov 2018 12:52:44 +0100 Subject: [PATCH] MKLDNN elementwise_mul: Parallelize mul --- paddle/fluid/operators/elementwise_mul_mkldnn_op.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/fluid/operators/elementwise_mul_mkldnn_op.cc b/paddle/fluid/operators/elementwise_mul_mkldnn_op.cc index d66c58bd4..36e88cd78 100644 --- a/paddle/fluid/operators/elementwise_mul_mkldnn_op.cc +++ b/paddle/fluid/operators/elementwise_mul_mkldnn_op.cc @@ -144,6 +144,7 @@ class ElementwiseMulMKLDNNKernel : public framework::OpKernel { mul_func_t mul_func = (mul_func_t) mul.getCode(); + #pragma omp parallel for collapse(2) for (int ni = 0; ni < n; ni++) { for (int ci = 0; ci < C; ci++) { auto ptr_x = -- GitLab