提交 9f55f1ff 编写于 作者: P peizhilin

use the platform api to decide the specific instruction support or not

test=develop
上级 0b4f742e
......@@ -83,12 +83,7 @@ class ElementwiseMulMKLDNNKernel : public framework::OpKernel<T> {
UpdateDataFormat(ctx, const_cast<Tensor*>(x), "x_data_format");
UpdateDataFormat(ctx, const_cast<Tensor*>(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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册