From 9f55f1ff50fd4b7db87689185cb0f3255cf72dc0 Mon Sep 17 00:00:00 2001 From: peizhilin Date: Wed, 19 Dec 2018 20:19:07 +0800 Subject: [PATCH] use the platform api to decide the specific instruction support or not test=develop --- .../fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc b/paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc index b45e08174c..db47b8c460 100644 --- a/paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc +++ b/paddle/fluid/operators/elementwise/elementwise_mul_mkldnn_op.cc @@ -83,12 +83,7 @@ class ElementwiseMulMKLDNNKernel : public framework::OpKernel { UpdateDataFormat(ctx, const_cast(x), "x_data_format"); UpdateDataFormat(ctx, const_cast(y), "y_data_format"); -#ifdef PADDLE_WITH_XBYAK - Xbyak::util::Cpu cpu; - const bool is_avx512_enabled = cpu.has(Xbyak::util::Cpu::tAVX512F); -#else const bool is_avx512_enabled = platform::MayIUse(platform::avx512f); -#endif // PADDLE_WITH_XBYAK const bool are_dims_divisable = !(x_int_dims[1] % 16); const bool is_x_format_correct = x->format() == memory::format::nChw16c; const bool is_y_format_correct = y->format() == memory::format::nc; -- GitLab