Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this tensorflow message mean? Any side effect? Was the installation successful?

I just installed tensorflow v2.3 on anaconda python. I tried to test out the installation using the python command below;

$ python -c "import tensorflow as tf; x = [[2.]]; print('tensorflow version', tf.__version__); print('hello, {}'.format(tf.matmul(x, x)))"

I got the following message;

2020-12-15 07:59:12.411952: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
hello, [[4.]]

From the message, it seems that the installation was installed successfully. But what does This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX AVX2 mean exactly?

Am I using a tensorflow version with some limited features? Any side effects?

I am using Windows 10.

like image 329
user1315789 Avatar asked Dec 15 '20 00:12

user1315789


People also ask

Is TensorFlow binary is optimized with oneAPI deep neural network library?

2020-12-15 07:59:12.411952: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the ...


Video Answer


2 Answers

An important part of Tensorflow is that it is supposed to be fast. With a suitable installation, it works with CPUs, GPUs, or TPUs. Part of going fast means that it uses different code depending on your hardware. Some CPUs support operations that other CPUs do not, such as vectorized addition (adding multiple variables at once). Tensorflow is simply telling you that the version you have installed can use the AVX and AVX2 operations and is set to do so by default in certain situations (say inside a forward or back-prop matrix multiply), which can speed things up. This is not an error, it is just telling you that it can and will take advantage of your CPU to get that extra speed out.

Note: AVX stands for Advanced Vector Extensions.

like image 117
mCoding Avatar answered Sep 26 '22 18:09

mCoding


The message

This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)
to use the following CPU instructions in performance-critical operations:  AVX AVX2

means that in places where performance matters (eg matrix multiplication in deep neural networks), certain optimized compiler instructions will be used. Installation seems to be successful.

The oneDNN GitHub repository says:

oneAPI Deep Neural Network Library (oneDNN) is an open-source cross-platform performance library of basic building blocks for deep learning applications. The library is optimized for Intel Architecture Processors, Intel Processor Graphics and Xe architecture-based Graphics. oneDNN has experimental support for the following architectures:

  • Arm* 64-bit Architecture (AArch64)
  • NVIDIA* GPU
  • OpenPOWER* Power ISA (PPC64)
  • IBMz* (s390x)
like image 29
jakub Avatar answered Sep 24 '22 18:09

jakub