- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is our install guide for building from source or downloading from conda, pip, or intel's website:
https://software.intel.com/en-us/articles/intel-optimization-for-tensorflow-installation-guide
Check out our performance guide to understand the important run time execution settings:
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Gael,
I've some issues in running Intel Tensorflow MKL.
Issue 1:
I installed the OneAPI Basekit + AI Analytic kit in my Ubuntu 18.04 machine by following the related toolkit installation guides.
After installed both kits, I tried to start using Intel Tensorflow by following the link you shared above. The steps I did:
- move linux shell directory to /opt/intel/inteloneapi (this is the directory I installed Intel OneAPI)
- execute "source setvars.sh"
- execute "source activate tensorflow" . "tensorflow" env has been activated.
- run below codes referring from Tensorflow_HelloWorld.py of AI Analytic kit samples.
import tensorflow as tf print("Intel DNNL optimizations are present : ", tf.pywrap_tensorflow.IsMklEnabled())
The IsMklEnabled function ever returns FALSE.
Issue 2:
- use Intel Python with Tensorflow-MKL; "conda create -n intel_mkl tensorflow-mkl python=3 -c intel "
- Then, I tried to run below codes referring from Tensorflow_HelloWorld.py of AI Analytic kit samples.
import tensorflow as tf print("Intel DNNL optimizations are present : ", tf.pywrap_tensorflow.IsMklEnabled())
File "<stdin>", line 1, in <module>
AttributeError: module 'tensorflow' has no attribute 'pywrap_tensorflow'
For both tests, I was using Python 3.
Can you please advise ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am getting the following error
C:\Users\Subhendu>cd C:\Program Files (x86)\IntelSWTools\openvino\bin\
C:\Program Files (x86)\IntelSWTools\openvino\bin>setupvars.bat
Python 3.6.5
ECHO is off.
PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\accuracy_checker;C:\Program Files (x86)\IntelSWTools\openvino\python\python3.6;C:\Program Files (x86)\IntelSWTools\openvino\python\python3;
[setupvars.bat] OpenVINO environment initialized
C:\Program Files (x86)\IntelSWTools\openvino\bin>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Program Files\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 99, in <module>
from tensorflow_core import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Program Files\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Program Files\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
C:\Windows\system32>cd C:\Program Files (x86)\IntelSWTools\openvino\bin\
C:\Program Files (x86)\IntelSWTools\openvino\bin>setupvars.bat
Python 3.6.5
ECHO is off.
PYTHONPATH=C:\Program Files (x86)\IntelSWTools\openvino\deployment_tools\open_model_zoo\tools\accuracy_checker;C:\Program Files (x86)\IntelSWTools\openvino\python\python3.6;C:\Program Files (x86)\IntelSWTools\openvino\python\python3;
[setupvars.bat] OpenVINO environment initialized
C:\Program Files (x86)\IntelSWTools\openvino\bin>python
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> import numpy
>>> import tensorflow
Traceback (most recent call last):
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Program Files\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 99, in <module>
from tensorflow_core import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\__init__.py", line 28, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 50, in __getattr__
module = self._load()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow\__init__.py", line 44, in _load
module = _importlib.import_module(self.__name__)
File "C:\Program Files\Python36\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\Subhendu\AppData\Roaming\Python\Python36\site-packages\tensorflow_core\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "C:\Program Files\Python36\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "C:\Program Files\Python36\lib\imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed.
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/errors
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
>>>
I am getting this error pls help

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page