Issue 1:
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 sudo optirun bazel-bin/tensorflow/cc/tutorials_example_trainer --use_gpu. I have been able to do that with TF_UNOFFICIAL_SETTING=1 ./configure. However, I am not able to run examples in python directly.

For example, if I run the convolutional.py in tensorflow/models/image/mnist with the command optirun python convolutional.py, I get the following error :

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

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?

Issue 2:
As of today (2018-06-09), the reproduction steps are:

pip install -U tf-nightly

import tensorflow as tf

The error stack looks like:

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/init.py in ()

20

21 # pylint: disable=g-bad-import-order

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

23 from . import app

24 from . import bitwise

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/init.py in ()

79 # Bring in subpackages.

80 from tensorflow.python import data

---> 81 from tensorflow.python import keras

82 from tensorflow.python.estimator import estimator_lib as estimator

83 from tensorflow.python.feature_column import feature_column_lib as feature_column

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/init.py in ()

22 from future import print_function

23

---> 24 from tensorflow.python.keras import activations

25 from tensorflow.python.keras import applications

26 from tensorflow.python.keras import backend

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/activations/init.py in ()

20

21 # Activation functions.

---> 22 from tensorflow.python.keras._impl.keras.activations import elu

23 from tensorflow.python.keras._impl.keras.activations import hard_sigmoid

24 from tensorflow.python.keras._impl.keras.activations import linear

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/init.py in ()

19 from future import print_function

20

---> 21 from tensorflow.python.keras._impl.keras import activations

22 from tensorflow.python.keras._impl.keras import applications

23 from tensorflow.python.keras._impl.keras import backend

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/activations.py in ()

21 import six

22

---> 23 from tensorflow.python.keras._impl.keras import backend as K

24 from tensorflow.python.keras._impl.keras.utils.generic_utils import deserialize_keras_object

25 from tensorflow.python.layers.base import Layer

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/_impl/keras/backend.py in ()

35 from tensorflow.python.framework import ops

36 from tensorflow.python.framework import sparse_tensor

---> 37 from tensorflow.python.layers import base as tf_base_layers

38 from tensorflow.python.ops import array_ops

39 from tensorflow.python.ops import clip_ops

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/layers/base.py in ()

23 from tensorflow.python.framework import dtypes

24 from tensorflow.python.framework import ops

---> 25 from tensorflow.python.keras.engine import base_layer

26 from tensorflow.python.ops import variable_scope as vs

27 from tensorflow.python.ops import variables as tf_variables

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/engine/init.py in ()

19 from future import print_function

20

---> 21 from tensorflow.python.keras.engine.base_layer import InputSpec

22 from tensorflow.python.keras.engine.base_layer import Layer

23 from tensorflow.python.keras.engine.input_layer import Input

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/engine/base_layer.py in ()

31 from tensorflow.python.framework import tensor_shape

32 from tensorflow.python.framework import tensor_util

---> 33 from tensorflow.python.keras import backend

34 from tensorflow.python.keras import constraints

35 from tensorflow.python.keras import initializers

~/venv_cpu_py3/lib/python3.5/site-packages/tensorflow/python/keras/backend/init.py in ()

20

21 # pylint: disable=redefined-builtin

---> 22 from tensorflow.python.keras._impl.keras.backend import abs

23 from tensorflow.python.keras._impl.keras.backend import all

24 from tensorflow.python.keras._impl.keras.backend import any

ImportError: cannot import name 'abs'

Note that the same error does not happen in tensorflow 1.8.0 or 1.9.0rc0.