title: Blas GEMV launch failed: m=3, n=2 [Op:MatMul]
body: <p>When I run the following code, I get the error:</p>
  
  <pre><code>E tensorflow/stream_executor/cuda/cuda_blas.cc:654] failed to run cuBLAS routine cublasSgemv_v2: CUBLAS_STATUS_EXECUTION_FAILED
  Traceback (most recent call last):
  File "modelAndLayer.py", line 16, in &lt;module&gt;
  y_pred=model(X)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/base_layer.py", line 314, in __call__
  output = super(Layer, self).__call__(inputs, *args, **kwargs)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 717, in __call__
  outputs = self.call(inputs, *args, **kwargs)
  File "modelAndLayer.py", line 10, in call
  output=self.dense(input)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/keras/_impl/keras/engine/base_layer.py", line 314, in __call__
  output = super(Layer, self).__call__(inputs, *args, **kwargs)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/layers/base.py", line 717, in __call__
  outputs = self.call(inputs, *args, **kwargs)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/layers/core.py", line 163, in call
  outputs = gen_math_ops.mat_mul(inputs, self.kernel)
  File "/home/cxsbg/anaconda3/envs/dl36/lib/python3.6/site-packages/tensorflow/python/ops/gen_math_ops.py", line 4305, in mat_mul
  _six.raise_from(_core._status_to_exception(e.code, message), None)
  File "&lt;string&gt;", line 3, in raise_from
  tensorflow.python.framework.errors_impl.InternalError: Blas GEMV launch failed:  m=3, n=2 [Op:MatMul]
  </code></pre>
  
  <p>My gpu is <strong>RTX2080</strong> and the driver is <strong>v410</strong>. The cuda is <strong>v9.0</strong>, the cudnn is <strong>v7</strong>. The tensorflow-gpu is <strong>v1.8</strong> (I tired on both v1.8 and v1.12). The python is <strong>v3.6</strong> (I tried on both v3.6 and v2.7). The system is <strong>Ubuntu 16.04</strong>  (I also tired on win10).</p>
  
  <p>The problem always occurs on tensorflow-gpu, but it works on tensorflow cpu.</p>
  
  <p>Code is here (a simple linear model):</p>
  
  <pre><code>import tensorflow as tf
  tf.enable_eager_execution()
  X=tf.constant([[1.,2.,3,],[4.,5.,6.]])
  Y=tf.constant([[10.],[20.]])
  class Linear(tf.keras.Model):
      def __init__(self):
          super().__init__()
          self.dense=tf.keras.layers.Dense(units=1,kernel_initializer=tf.zeros_initializer(),bias_initializer=tf.zeros_initializer())
      def call(self,input):
          output=self.dense(input)
          return output
  model=Linear()
  optimizer=tf.train.GradientDescentOptimizer(learning_rate=1e-3)
  for i in range(1000):
      with tf.GradientTape() as tape:
          y_pred=model(X)
          loss=tf.reduce_mean(tf.square(y_pred-Y))
      grads=tape.gradient(loss,model.variables)
      optimizer.apply_gradients(zip(grads,model.variables))
  print(model.variables)
  </code></pre>