【问题标题】:TensorFlow binary is optimized to use the following CPU instructions in performance-critical operations: AVX2 FMATensorFlow 二进制文件经过优化,可在性能关键操作中使用以下 CPU 指令:AVX2 FMA
【发布时间】:2021-02-03 13:39:57
【问题描述】:

此 TensorFlow 二进制文件使用 oneAPI 深度神经网络库 (oneDNN) 进行了优化,以在性能关键操作中使用以下 CPU 指令:AVX2 FMA 要在其他操作中启用它们,请使用适当的编译器标志重建 TensorFlow。

尝试运行使用 Tensorflow 库的程序时,我在适用于 macOS 的 PyCharm IDE 上收到此错误。为什么仅仅安装 Tensorflow 还不够好?我按照这里的安装说明进行操作:https://www.tensorflow.org/install/pip

【问题讨论】:

  • 您确定这是一个错误吗?打印此代码后您的代码是否终止?另外,密码是什么?请发帖minimal reproducible example
  • 此消息肯定不会终止脚本。此消息与性能有关。只需重建您的模型以使其与您当前的架构兼容。

标签: python tensorflow


【解决方案1】:

我通过如下设置环境变量修复了这个错误。

os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'

它在带有 python 3.7 (Anaconda) 的 Ubuntu 16.04 上完美运行。

【讨论】:

    猜你喜欢
    • 2018-12-28
    • 1970-01-01
    • 2019-01-11
    • 1970-01-01
    • 1970-01-01
    • 2020-02-27
    • 2018-04-14
    • 1970-01-01
    相关资源
    最近更新 更多