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

本文解析了在Mac上运行TensorFlow时遇到的警告信息,该警告表明TensorFlow未使用CPU上的AVX2和FMA指令集。文章解释了这并非错误,而是编译时的默认设置,旨在确保兼容性。通过设置环境变量TF_CPP_MIN_LOG_LEVEL=2可以忽略此警告。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

就,记录自己报的那些错吧啊啊啊啊

每一个问题都有 一丢丢收获

mac 运行tensorflow,报错:

2019-04-24 15:07:06.421041: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

一开始我以为是因为我装的python3.7的问题,然后卸了换3.6,还是这样,其实这不是错误。Tensorflow运行得很好。

这是一个警告,说Tensorflow没有利用CPU上的一些高级指令,因为它的二进制文件被编译为不使用这些指令(所以它可以在较旧的CPU上运行)。

当然,如果可以在打开AVX2 FMA指令的情况下编译TensorFlow,它可能会“运行得更快”

忽略它,在运行之前设置环境变量。

windows:

$ set TF_CPP_MIN_LOG_LEVEL=2

Linux的/ MacOS:

$ export TF_CPP_MIN_LOG_LEVEL=2

参考:https://stackoverflow.com/questions/51681727/tensorflow-on-macos-your-cpu-supports-instructions-that-this-tensorflow-binary

Skipping registering GPU devices... 2025-07-26 19:41:36.404421: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 AVX512F FMA 2025-07-26 19:41:36.434980: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency: 2000000000 Hz 2025-07-26 19:41:36.441018: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f2764000b60 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2025-07-26 19:41:36.441046: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2025-07-26 19:41:36.442874: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix: 2025-07-26 19:41:36.442890: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108] WARNING:tensorflow:From /root/Python/conda_lit/kind/lib/python3.6/site-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer_v1) is deprecated and will be removed in a future version. Instructions for updating: Please use `layer.__call__` method instead. loaded ./checkpoint/decom_net_train/model.ckpt loaded ./checkpoint/illumination_adjust_net_train/model.ckpt No restoration pre model! (480, 640, 3) (680, 720, 3) (415, 370, 3) Traceback (most recent call last): File "evaluate.py", line 73, in <module> eval_low_im = load_images(eval_low_data_name[idx]) File "/root/Python/KinD-master/KinD-master/utils.py", line 63, in load_images im = Image.open(file) File "/root/Python/conda_lit/kind/lib/python3.6/site-packages/PIL/Image.py", line 2975, in open fp = builtins.open(filename, "rb") IsADirectoryError: [Errno 21] Is a directory: './test/results'
最新发布
07-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值