Issue 1:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): only import tensorflow

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): windows 10

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: no

TensorFlow installed from (source or binary): pip

TensorFlow version (use command below):

Python version: 3.7.3

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version: cuda 10.1, cudnn v.7.5

GPU model and memory: gtx 1070

Exact command to reproduce:

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with:

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

and this is the error

Traceback (most recent call last):

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\imp.py", line 242, in load_module

return load_dynamic(name, filename, file)

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\imp.py", line 342, in load_dynamic

return _load(spec)

ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "", line 1, in

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow_init_.py", line 24, in

from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python_init_.py", line 49, in

from tensorflow.python import pywrap_tensorflow

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in

raise ImportError(msg)

ImportError: Traceback (most recent call last):

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in

from tensorflow.python.pywrap_tensorflow_internal import *

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in

_pywrap_tensorflow_internal = swig_import_helper()

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\imp.py", line 242, in load_module

return load_dynamic(name, filename, file)

File "C:\Users\kevol\Anaconda3\envs\tensorflow\lib\imp.py", line 342, in load_dynamic

return _load(spec)

ImportError: DLL load failed: The specified module could not be found.

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.

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):

Don't have code yet

**OS Platform and Distribution

Linux Ubuntu 16.04

TensorFlow installed from (source or binary):

git clone latest revision (TensorFlow 1.1)

TensorFlow version (use command below):

Bazel version (if compiling from source):

Build label: 0.4.5

Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar

Build time: Thu Mar 16 12:19:38 2017 (1489666778)

Build timestamp: 1489666778

Build timestamp as int: 1489666778

CUDA/cuDNN version:

None

GPU model and memory:

None

Exact command to reproduce:

I don't understand what the above sentence refers to?

Describe the problem

Bazel failed to build/compile tensor flow with mkl support

I added these compiler flags during the configure phase and they caused the compilation error:

-DEIGEN_USE_MKL_ALL -DMKL_ILP64

Source code / logs

Configure phase:

drormeirovich@drormeirovich-xps-13-9360:~/projects/tensorflow$ sudo ./configure
Please specify the location of python. [Default is /usr/bin/python]:
Found possible Python library paths:
/usr/local/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages
Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages]

Using python library path: /usr/local/lib/python2.7/dist-packages
Do you wish to build TensorFlow with MKL support? [y/N] y
MKL support will be enabled for TensorFlow
Do you wish to download MKL LIB from the web? [Y/n] n
Please specify the location where MKL is installed. [Default is /opt/intel/mklml]: /opt/intel/mkl
Please specify optimization flags to use during compilation when bazel option "--config=opt" is specified [Default is -march=native]: -O3 -DNDEBUG -fPIC -DEIGEN_USE_MKL_ALL -DMKL_ILP64 -fopenmp -m64 -v -I/opt/intel/mkl/include
Do you wish to use jemalloc as the malloc implementation? [Y/n]
jemalloc enabled
Do you wish to build TensorFlow with Google Cloud Platform support? [y/N]
No Google Cloud Platform support will be enabled for TensorFlow
Do you wish to build TensorFlow with Hadoop File System support? [y/N]
No Hadoop File System support will be enabled for TensorFlow
Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? [y/N]
No XLA support will be enabled for TensorFlow
Do you wish to build TensorFlow with VERBS support? [y/N]
No VERBS support will be enabled for TensorFlow
Do you wish to build TensorFlow with OpenCL support? [y/N]
No OpenCL support will be enabled for TensorFlow
Do you wish to build TensorFlow with CUDA support? [y/N]
No CUDA support will be enabled for TensorFlow
INFO: Starting clean (this may take a while). Consider using --async if the clean takes more than several minutes.
Configuration finished

Build command...

sudo bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package

Error output:

ERROR: /home/drormeirovich/projects/tensorflow/tensorflow/core/kernels/BUILD:998:1: C++ compilation of rule '//tensorflow/core/kernels:gather_functor' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 64 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 6.2.0-3ubuntu11~16.04' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.2.0 20160901 (Ubuntu 6.2.0-3ubuntu11~16.04)
COLLECT_GCC_OPTIONS='-U' '_FORTIFY_SOURCE' '-fstack-protector' '-Wall' '-B' '/usr/bin' '-B' '/usr/bin' '-Wunused-but-set-parameter' '-Wno-free-nonheap-object' '-fno-omit-frame-pointer' '-g0' '-O2' '-D' '_FORTIFY_SOURCE=1' '-D' 'NDEBUG' '-ffunction-sections' '-fdata-sections' '-O3' '-D' 'NDEBUG' '-D' 'EIGEN_USE_MKL_ALL' '-D' 'MKL_ILP64' '-v' '-I' '/opt/intel/mkl/include' '-std=c++11' '-O3' '-D' 'NDEBUG' '-D' 'EIGEN_USE_MKL_ALL' '-D' 'MKL_ILP64' '-fopenmp' '-m64' '-v' '-I' '/opt/intel/mkl/include' '-MD' '-MF' 'bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.d' '-frandom-seed=bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.o' '-fPIC' '-D' 'EIGEN_MPL2_ONLY' '-iquote' '.' '-iquote' 'bazel-out/local-opt/genfiles' '-iquote' 'external/bazel_tools' '-iquote' 'bazel-out/local-opt/genfiles/external/bazel_tools' '-iquote' 'external/eigen_archive' '-iquote' 'bazel-out/local-opt/genfiles/external/eigen_archive' '-iquote' 'external/local_config_sycl' '-iquote' 'bazel-out/local-opt/genfiles/external/local_config_sycl' '-isystem' 'external/bazel_tools/tools/cpp/gcc3' '-isystem' 'external/eigen_archive' '-isystem' 'bazel-out/local-opt/genfiles/external/eigen_archive' '-D' 'EIGEN_AVOID_STL_ARRAY' '-I' 'external/gemmlowp' '-Wno-sign-compare' '-fno-exceptions' '-msse3' '-pthread' '-fno-canonical-system-headers' '-Wno-builtin-macro-redefined' '-D' '__DATE__="redacted"' '-D' '__TIMESTAMP__="redacted"' '-D' '__TIME__="redacted"' '-c' '-o' 'bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.o' '-mtune=generic' '-march=x86-64' '-pthread'
/usr/lib/gcc/x86_64-linux-gnu/6/cc1plus -quiet -v -v -I /opt/intel/mkl/include -I /opt/intel/mkl/include -I external/gemmlowp -imultiarch x86_64-linux-gnu -MD bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.d -MF bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.d -MQ bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.o -D_GNU_SOURCE -D_REENTRANT -U _FORTIFY_SOURCE -D _FORTIFY_SOURCE=1 -D NDEBUG -D NDEBUG -D EIGEN_USE_MKL_ALL -D MKL_ILP64 -D NDEBUG -D EIGEN_USE_MKL_ALL -D MKL_ILP64 -D EIGEN_MPL2_ONLY -D EIGEN_AVOID_STL_ARRAY -D __DATE__="redacted" -D __TIMESTAMP__="redacted" -D __TIME__="redacted" -iquote . -iquote bazel-out/local-opt/genfiles -iquote external/bazel_tools -iquote bazel-out/local-opt/genfiles/external/bazel_tools -iquote external/eigen_archive -iquote bazel-out/local-opt/genfiles/external/eigen_archive -iquote external/local_config_sycl -iquote bazel-out/local-opt/genfiles/external/local_config_sycl -isystem external/bazel_tools/tools/cpp/gcc3 -isystem external/eigen_archive -isystem bazel-out/local-opt/genfiles/external/eigen_archive tensorflow/core/kernels/gather_functor.cc -quiet -dumpbase gather_functor.cc -m64 -msse3 -mtune=generic -march=x86-64 -auxbase-strip bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.o -g0 -O2 -O3 -O3 -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -Wno-sign-compare -Wno-builtin-macro-redefined -std=c++11 -version -fstack-protector -fno-omit-frame-pointer -ffunction-sections -fdata-sections -fopenmp -frandom-seed=bazel-out/local-opt/bin/tensorflow/core/kernels/_objs/gather_functor/tensorflow/core/kernels/gather_functor.pic.o -fPIC -fno-exceptions -fno-canonical-system-headers -Wformat-security -o /tmp/ccloY0qb.s
GNU C++11 (Ubuntu 6.2.0-3ubuntu11~16.04) version 6.2.0 20160901 (x86_64-linux-gnu)
compiled by GNU C version 6.2.0 20160901, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "external/bazel_tools/tools/cpp/gcc3"
ignoring nonexistent directory "bazel-out/local-opt/genfiles/external/eigen_archive"
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/6"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/6/../../../../x86_64-linux-gnu/include"
ignoring duplicate directory "/opt/intel/mkl/include"
ignoring nonexistent directory "bazel-out/local-opt/genfiles/external/bazel_tools"
ignoring duplicate directory "external/eigen_archive"
as it is a non-system directory that duplicates a system directory
ignoring nonexistent directory "bazel-out/local-opt/genfiles/external/eigen_archive"
ignoring nonexistent directory "bazel-out/local-opt/genfiles/external/local_config_sycl"
#include "..." search starts here:
.
bazel-out/local-opt/genfiles
external/bazel_tools
external/local_config_sycl
#include <...> search starts here:
/opt/intel/mkl/include
external/gemmlowp
external/eigen_archive
/usr/include/c++/6
/usr/include/x86_64-linux-gnu/c++/6
/usr/include/c++/6/backward
/usr/lib/gcc/x86_64-linux-gnu/6/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/6/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
GNU C++11 (Ubuntu 6.2.0-3ubuntu11~16.04) version 6.2.0 20160901 (x86_64-linux-gnu)
compiled by GNU C version 6.2.0 20160901, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version 0.15
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 23988a38771f71e4676d56931fe884f7
In file included from external/eigen_archive/unsupported/Eigen/CXX11/../../../Eigen/Core:522:0,
from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:14,
from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:1,
from ./tensorflow/core/kernels/gather_functor.h:19,
from tensorflow/core/kernels/gather_functor.cc:52:
external/eigen_archive/unsupported/Eigen/CXX11/../../../Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h: In static member function 'static void Eigen::internal::general_matrix_matrix_product<Index, double, LhsStorageOrder, ConjugateLhs, double, RhsStorageOrder, ConjugateRhs, 0>::run(Index, Index, Index, const double*, Index, const double*, Index, double*, Index, double, Eigen::internal::level3_blocking<double, double>&, Eigen::internal::GemmParallelInfo<Index>*)':
external/eigen_archive/unsupported/Eigen/CXX11/../../../Eigen/src/Core/products/GeneralMatrixMatrix_BLAS.h:106:1: error: cannot convert 'Eigen::BlasIndex* {aka long long int*}' to 'const int*' for argument '3' to 'int dgemm_(const char*, const char*, const int*, const int*, const int*, const double*, const double*, const int*, const double*, const int*, const double*, double*, const int*)'
GEMM_SPECIALIZATION(double, d, double, d)
^