title: nvidia_deeplearningexamples_tacotron2 :RuntimeError: CUDA error: invalid device function
body: <p>Set up runtime: python3 and GPU.</p>
  
  <p>Run the <a href="https://colab.research.google.com/github/pytorch/pytorch.github.io/blob/master/assets/hub/nvidia_deeplearningexamples_tacotron2.ipynb" rel="nofollow noreferrer">code</a> step by step.
  I only successfully run the code at first time. </p>
  
  <p>After that, when run the below part, occured "RuntimeError: CUDA error: invalid device function"</p>
  
  <pre><code>sequence = np.array(tacotron2.text_to_sequence(text, ['english_cleaners']))[None, :]
  sequence = torch.from_numpy(sequence).to(device='cuda', dtype=torch.int64)
  
  with torch.no_grad():
      _, mel, _, _ = tacotron2.infer(sequence)
      audio = waveglow.infer(mel)
  audio_numpy = audio[0].data.cpu().numpy()
  rate = 22050
  </code></pre>
  
  <p>Do you know the root cause? And does the pre-trained model be run on local CPU?</p>