Jose Vega
Jose Vega

Reputation: 579

AVX512 not showing on Intel Tensorflow

I have a Windows 11 computer with an 11th Gen Intel Core i7-1185G7, which supports SSE4.1, SSE4.2, AVX, AVX2 and AVX512. The computer has no GPU.

I created a conda environment with Python 3.10, and ran pip install intel-tensorflow. According to the documentation, the command pip install intel-tensorflow-avx512 should only be used on Linux platforms. It mentions that AVX512 is automatically used and enabled on PIP wheels:

All Intel TensorFlow binaries are optimized with oneAPI Deep Neural Network Library (oneDNN), which will use the AVX2 or AVX512F FMA etc CPU instructions automatically in performance-critical operations based on the supported Instruction sets on your machine for both Windows and Linux OS.

However, when I start a new project that uses TensorFlow, the following message is shown:

I tensorflow/core/platform/cpu_feature_guard.cc:193] 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.

Therefore, I am not sure that TensorFlow is using AVX512 as the default instructions set.


Questions

  1. How can I check that TensorFlow is indeed using AVX512?
  2. If TensorFlow is not using AVX512, how can I force it to? Is it a bug that should be reported to Intel?
  3. Is AVX512 really worth it in comparison with AVX and AVX2 when training a model in TensorFlow on a CPU?

Upvotes: 1

Views: 1417

Answers (1)

TonyM
TonyM

Reputation: 376

This may not be ideal but you could try WSL and run TF through there using the intel-tensorflow-avx512 package as a test.

It is supposed to be default in the TF windows package as well (no need to use the avx512 pip package), but I’m confirming that now. Will get back to you asap.

Upvotes: 0

Related Questions