Adding this bit of info for people around..
Tensorflow can be now activated on Intel-gpus as well..
For this, just create a new environment on anaconda , and do pip install intel-tensorflow
Now, when the needed libararies are installed,
we can do sanity test by a sample program.
import tensorflow as tf
import os
def get_mkl_enabled_flag():
mkl_enabled = False
major_version = int(tf.__version__.split(".")[0])
minor_version = int(tf.__version__.split(".")[1])
if major_version >= 2:
if minor_version < 5:
from tensorflow.python import _pywrap_util_port
else:
from tensorflow.python.util import _pywrap_util_port
onednn_enabled = int(os.environ.get('TF_ENABLE_ONEDNN_OPTS', '0'))
mkl_enabled = _pywrap_util_port.IsMklEnabled() or (onednn_enabled == 1)
else:
mkl_enabled = tf.pywrap_tensorflow.IsMklEnabled()
return mkl_enabled
print ("We are using Tensorflow version", tf.__version__)
print("MKL enabled :", get_mkl_enabled_flag())
It should return MKL enabled : True
Note - These optimisations are brought through (Intel MKL)Intel oneAPI Math Kernel Library
More Info