<p dir="auto">I have a Quadro K1100M integrated gpu with compute capability 3.0. I had to install bumblebee to make CUDA work. I am now able to run the tutorials_example_trainer with the command <code class="notranslate">sudo optirun bazel-bin/tensorflow/cc/tutorials_example_trainer --use_gpu</code>. I have been able to do that with <code class="notranslate">TF_UNOFFICIAL_SETTING=1 ./configure</code>. However, I am not able to run examples in python directly.</p>
<p dir="auto">For example, if I run the convolutional.py in tensorflow/models/image/mnist with the command <code class="notranslate">optirun python convolutional.py</code>, I get the following error :</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="tensorflow/tensorflow/models/image/mnist$ optirun python convolutional.py 
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 8
E tensorflow/stream_executor/cuda/cuda_driver.cc:466] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:98] retrieving CUDA diagnostic information for host: jp-pc
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:106] hostname: jp-pc
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:131] libcuda reported version is: 352.63
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:242] driver version file contents: &quot;&quot;&quot;NVRM version: NVIDIA UNIX x86_64 Kernel Module  352.63  Sat Nov  7 21:25:42 PST 2015
GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 
&quot;&quot;&quot;
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:135] kernel reported version is: 352.63
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:211] kernel version seems to match DSO: 352.63
I tensorflow/core/common_runtime/gpu/gpu_init.cc:112] DMA: 
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 8"><pre class="notranslate"><code class="notranslate">tensorflow/tensorflow/models/image/mnist$ optirun python convolutional.py 
Extracting data/train-images-idx3-ubyte.gz
Extracting data/train-labels-idx1-ubyte.gz
Extracting data/t10k-images-idx3-ubyte.gz
Extracting data/t10k-labels-idx1-ubyte.gz
I tensorflow/core/common_runtime/local_device.cc:25] Local device intra op parallelism threads: 8
E tensorflow/stream_executor/cuda/cuda_driver.cc:466] failed call to cuInit: CUDA_ERROR_UNKNOWN
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:98] retrieving CUDA diagnostic information for host: jp-pc
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:106] hostname: jp-pc
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:131] libcuda reported version is: 352.63
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:242] driver version file contents: """NVRM version: NVIDIA UNIX x86_64 Kernel Module  352.63  Sat Nov  7 21:25:42 PST 2015
GCC version:  gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) 
"""
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:135] kernel reported version is: 352.63
I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:211] kernel version seems to match DSO: 352.63
I tensorflow/core/common_runtime/gpu/gpu_init.cc:112] DMA: 
I tensorflow/core/common_runtime/local_session.cc:45] Local session inter op parallelism threads: 8
</code></pre></div>
<p dir="auto">It is like my gpu is not recognized in python programs because of the 3.0 compute capability.  Is there a way to avoid this problem?</p>
<p dir="auto">As of today (2018-06-09), the reproduction steps are:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pip install -U tf-nightly"><pre class="notranslate">pip install -U tf-nightly</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span></pre></div>
<p dir="auto">The error stack looks like:</p>
<blockquote>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/<strong>init</strong>.py in ()<br>
20<br>
21 # pylint: disable=g-bad-import-order<br>
---&gt; 22 from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import<br>
23 from . import app<br>
24 from . import bitwise</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/<strong>init</strong>.py in ()<br>
79 # Bring in subpackages.<br>
80 from tensorflow.python import data<br>
---&gt; 81 from tensorflow.python import keras<br>
82 from tensorflow.python.estimator import estimator_lib as estimator<br>
83 from tensorflow.python.feature_column import feature_column_lib as feature_column</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/<strong>init</strong>.py in ()<br>
22 from <strong>future</strong> import print_function<br>
23<br>
---&gt; 24 from tensorflow.python.keras import activations<br>
25 from tensorflow.python.keras import applications<br>
26 from tensorflow.python.keras import backend</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/activations/<strong>init</strong>.py in ()<br>
20<br>
21 # Activation functions.<br>
---&gt; 22 from tensorflow.python.keras._impl.keras.activations import elu<br>
23 from tensorflow.python.keras._impl.keras.activations import hard_sigmoid<br>
24 from tensorflow.python.keras._impl.keras.activations import linear</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/<strong>init</strong>.py in ()<br>
19 from <strong>future</strong> import print_function<br>
20<br>
---&gt; 21 from tensorflow.python.keras._impl.keras import activations<br>
22 from tensorflow.python.keras._impl.keras import applications<br>
23 from tensorflow.python.keras._impl.keras import backend</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/activations.py in ()<br>
21 import six<br>
22<br>
---&gt; 23 from tensorflow.python.keras._impl.keras import backend as K<br>
24 from tensorflow.python.keras._impl.keras.utils.generic_utils import deserialize_keras_object<br>
25 from tensorflow.python.layers.base import Layer</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/backend.py in ()<br>
35 from tensorflow.python.framework import ops<br>
36 from tensorflow.python.framework import sparse_tensor<br>
---&gt; 37 from tensorflow.python.layers import base as tf_base_layers<br>
38 from tensorflow.python.ops import array_ops<br>
39 from tensorflow.python.ops import clip_ops</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/layers/base.py in ()<br>
23 from tensorflow.python.framework import dtypes<br>
24 from tensorflow.python.framework import ops<br>
---&gt; 25 from tensorflow.python.keras.engine import base_layer<br>
26 from tensorflow.python.ops import variable_scope as vs<br>
27 from tensorflow.python.ops import variables as tf_variables</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/engine/<strong>init</strong>.py in ()<br>
19 from <strong>future</strong> import print_function<br>
20<br>
---&gt; 21 from tensorflow.python.keras.engine.base_layer import InputSpec<br>
22 from tensorflow.python.keras.engine.base_layer import Layer<br>
23 from tensorflow.python.keras.engine.input_layer import Input</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/engine/base_layer.py in ()<br>
31 from tensorflow.python.framework import tensor_shape<br>
32 from tensorflow.python.framework import tensor_util<br>
---&gt; 33 from tensorflow.python.keras import backend<br>
34 from tensorflow.python.keras import constraints<br>
35 from tensorflow.python.keras import initializers</p>
<p dir="auto">~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/backend/<strong>init</strong>.py in ()<br>
20<br>
21 # pylint: disable=redefined-builtin<br>
---&gt; 22 from tensorflow.python.keras._impl.keras.backend import abs<br>
23 from tensorflow.python.keras._impl.keras.backend import all<br>
24 from tensorflow.python.keras._impl.keras.backend import any</p>
<p dir="auto">ImportError: cannot import name 'abs'</p>
</blockquote>
<p dir="auto">Note that the same error does <em>not</em> happen in tensorflow 1.8.0 or 1.9.0rc0.</p>