在Keras上使用TensorFlow后端时出现奇怪的输出(OMP:信息#xx KMP_AFFINITY

问题描述 投票:3回答:1

我将Keras与TensorFlow后端配合使用以训练神经网络模型。这是一个简单的模型(来自教程),一切正常。模型预测了应该采用的方式。只有tensorflow似乎在输出信息,我不知道我是否可以安全地忽略它/它意味着什么。有人可以解释一下下面的输出告诉我们什么吗?特别是对于以OMP开头的所有行,我都不清楚。弃用警告并没有让我真正担心。

Using TensorFlow backend.
OMP: Info #212: KMP_AFFINITY: decoding x2APIC ids.
OMP: Info #210: KMP_AFFINITY: Affinity capable, using global cpuid leaf 11 info
OMP: Info #154: KMP_AFFINITY: Initial OS proc set respected: 0-7
OMP: Info #156: KMP_AFFINITY: 8 available OS procs
OMP: Info #157: KMP_AFFINITY: Uniform topology
OMP: Info #179: KMP_AFFINITY: 1 packages x 4 cores/pkg x 2 threads/core (4 total cores)
OMP: Info #214: KMP_AFFINITY: OS proc to physical thread map:
OMP: Info #171: KMP_AFFINITY: OS proc 0 maps to package 0 core 0 thread 0 
OMP: Info #171: KMP_AFFINITY: OS proc 1 maps to package 0 core 0 thread 1 
OMP: Info #171: KMP_AFFINITY: OS proc 2 maps to package 0 core 1 thread 0 
OMP: Info #171: KMP_AFFINITY: OS proc 3 maps to package 0 core 1 thread 1 
OMP: Info #171: KMP_AFFINITY: OS proc 4 maps to package 0 core 2 thread 0 
OMP: Info #171: KMP_AFFINITY: OS proc 5 maps to package 0 core 2 thread 1 
OMP: Info #171: KMP_AFFINITY: OS proc 6 maps to package 0 core 3 thread 0 
OMP: Info #171: KMP_AFFINITY: OS proc 7 maps to package 0 core 3 thread 1 
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 5252 thread 0 bound to OS proc set 0
WARNING: Logging before flag parsing goes to stderr.
W0820 14:05:56.256548  5252 deprecation.py:323] From C:\Users\Gebruiker\Anaconda3\envs\Anaconda3.7\lib\site-packages\tensorflow\python\ops\nn_impl.py:180: add_dispatch_support.<locals>.wrapper (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
2019-08-20 14:05:56.449349: I tensorflow/core/platform/cpu_feature_guard.cc:145] This TensorFlow binary is optimized with Intel(R) MKL-DNN to use the following CPU instructions in performance critical operations:  AVX AVX2
To enable them in non-MKL-DNN operations, rebuild TensorFlow with the appropriate compiler flags.
2019-08-20 14:05:56.451182: I tensorflow/core/common_runtime/process_util.cc:115] Creating new thread pool with default inter op setting: 8. Tune using inter_op_parallelism_threads for best performance.
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 13256 thread 1 bound to OS proc set 2
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 5064 thread 2 bound to OS proc set 4
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 8904 thread 3 bound to OS proc set 6
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 9408 thread 4 bound to OS proc set 1
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 14360 thread 5 bound to OS proc set 3
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 14616 thread 6 bound to OS proc set 5
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 2692 thread 7 bound to OS proc set 7
OMP: Info #250: KMP_AFFINITY: pid 14400 tid 14172 thread 8 bound to OS proc set 0
python tensorflow keras
1个回答
4
投票

OpenMP将线程绑定到您的cpu以便运行。这只是后勤输出,我不会担心。您可以找到here中记录的类似输出。

英特尔®编译器的OpenMP *运行时库具有将OpenMP *线程绑定到物理处理单元的能力。

本文将向您展示如何使用KMP_AFFINITY环境来自英特尔编译器的变量扩展,高级关联接口,以确定计算机拓扑并分配OpenMP *线程根据处理器在处理器中的物理位置机器。

示例1:

您拥有一个采用英特尔®超线程技术的四核系统(英特尔®HT技术)已启用。默认情况下,英特尔编译器OpenMP *运行时库将创建8个线程,在8个逻辑上自由运行操作系统提供的处理器。

如上所述,根据您的物理CPU配置,线程被分配给了不同的内核。

© www.soinside.com 2019 - 2024. All rights reserved.