为什么在我使用 MKL 时 Tensorflow 会警告 AVX2? [英] Why does Tensorflow warn about AVX2 while I am using MKL?

查看:21
本文介绍了为什么在我使用 MKL 时 Tensorflow 会警告 AVX2?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用支持 MKL 的 Tensorflow 的 Anaconda 发行版.

I am using Tensorflow's Anaconda distribution with MKL support.

from tensorflow.python.framework import test_util
test_util.IsMklEnabled()

此代码打印 True.但是,当我编译我的 Keras 模型时,我仍然得到

This code prints True. However, when I compile my Keras model I still get

您的 CPU 支持此 TensorFlow 二进制文件不支持的指令编译使用:AVX AVX2

Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2

这不是我所期望的行为.

This is not the behavior I was expecting.

推荐答案

张量流执行的 MKL-DNN 部分(这是 MKL 工程师提供的主要加速)在运行时是 JIT 的.因此,针对二进制创建的指令集与 MKL-DNN 代码无关.它只会影响其他数学,主要是 Eigen 库和任何没有被 MKL-DNN 函数替换的函数.

The MKL-DNN portions of the tensorflow execution (which is the main acceleration provided by MKL engineers) are JIT'ed at runtime. So the instruction set targeted at binary creation is not relevant to the MKL-DNN code. It will only effect the other math, mainly the Eigen library and whatever functions haven't been replaced with MKL-DNN functions.

这篇关于为什么在我使用 MKL 时 Tensorflow 会警告 AVX2?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆