RuntimeError: cublas runtime error : the GPU program failed to execute at /opt/conda/conda-bld/pytorch_1549628766161/work/aten/src/THC/THCBlas.cu:258

dongyuanli: <h1><a name="hi-everyone-i-tried-to-run-the-pointnet-module-on-pytorch-but-got-the-following-error-1690x431uploadqhkqy4zjzennvtjqjuoelfsmwqypng-1" class="anchor" href="#hi-everyone-i-tried-to-run-the-pointnet-module-on-pytorch-but-got-the-following-error-1690x431uploadqhkqy4zjzennvtjqjuoelfsmwqypng-1"></a>Hi everyone, I tried to run the pointnet module on Pytorch but got the following error:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/b/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae.png" data-download-href="https://discuss.pytorch.org/uploads/default/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae" title="1"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/b/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae_2_690x431.png" alt="1" data-base62-sha1="qHKqy4zJZeNNvTjQJuoeLfSMwqy" width="690" height="431" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/b/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae_2_690x431.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/b/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae_2_1035x646.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/b/b/bb2a8a34bbb8594862839cc76b8aceddfd9c47ae_2_1380x862.png 2x" data-dominant-color="0A353C"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">1</span><span class="informations">1440×900 132 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></h1>
<p>I tried to search on the Internet but cannot find any posts that are helpful.</p>
<p>======================<br>
Here is the versions installed:<br>
GPU info: GeForce RTX 2080<br>
$ nvidia-smi<br>
It shows “Driver Version: 418.67, CUDA version: 10.1”</p>
<p>$nvcc -V<br>
It shows “Cuda compilation tools, release 10.1, V10.1.168”</p>
<p>Pytorch version: 1.0.1.post2 (installed by anaconda3)<br>
Python version: 3.6.8</p>
<p>If you can give me hand I will be really thankful</p>

ptrblck: <p>Could you post a code snippet to reproduce this issue, please?</p>

dongyuanli: <p>Thanks for your reply. I run this following code and the error happans<br>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://github.githubassets.com/favicon.ico" class="site-icon" width="16" height="16">
      <a href="https://github.com/tshi04/LeafNATS" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars1.githubusercontent.com/u/15058453?s=400&amp;v=4" class="thumbnail onebox-avatar" width="60" height="60">

<h3><a href="https://github.com/tshi04/LeafNATS" target="_blank" rel="nofollow noopener">tshi04/LeafNATS</a></h3>

<p>A tool for NLP research. Contribute to tshi04/LeafNATS development by creating an account on GitHub.</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>

dongyuanli: <p>Thanks I reproduce it as following, and the error happans at<br>
self.encoder2decoder = nn.Linear(2*src_hidden_size, trg_hidden_size)</p>
<p>class natsEncoder2Decoder(nn.Module):</p>
<pre><code>def __init__(self, src_hidden_size, trg_hidden_size, rnn_network):
    super(natsEncoder2Decoder, self).__init__()
    self.rnn_network = rnn_network

    self.encoder2decoder = nn.Linear(2*src_hidden_size, trg_hidden_size)
    if rnn_network == 'lstm':
        self.encoder2decoder_c = nn.Linear(2*src_hidden_size, trg_hidden_size)

def forward(self, hidden_encoder):
    if self.rnn_network == 'lstm':
        (src_h_t, src_c_t) = hidden_encoder
        h_t = torch.cat((src_h_t[-1], src_h_t[-2]), 1)
        c_t = torch.cat((src_c_t[-1], src_c_t[-2]), 1)

        decoder_h0 = torch.tanh(self.encoder2decoder(h_t)) # (batch_size, hidden_dim)
        decoder_c0 = torch.tanh(self.encoder2decoder_c(c_t))

        return (decoder_h0, decoder_c0)

    else:
        src_h_t = hidden_encoder
        h_t = torch.cat((src_h_t[-1], src_h_t[-2]), 1)

        decoder_h0 = torch.tanh(self.encoder2decoder(h_t))

        return decoder_h0</code></pre>