Topk() error in cuda

Traceback (most recent call last):
  File "C:/project_py/OpenNMT-S_A_translation/translate.py", line 156, in <module>
    main()
  File "C:/project_py/OpenNMT-S_A_translation/translate.py", line 103, in main
    predBatch, predScore, goldScore, src = translator.translate(srcBatch, tgtBatch)
  File "C:\project_py\OpenNMT-S_A_translation\onmt\Translator.py", line 286, in translate
    pred, predScore, goldScore = self.translateBatch(batch, srcBatch)
  File "C:\project_py\OpenNMT-S_A_translation\onmt\Translator.py", line 255, in translateBatch
    is_done = beam[b].advance(word_scores.data[b],b)
  File "C:\project_py\OpenNMT-S_A_translation\onmt\Beam.py", line 78, in advance
    if self.nextYs[-1][0] == onmt.Constants.EOS:
RuntimeError: cuda runtime error (4) : unspecified launch failure at d:\pytorch\pytorch\torch\lib\thc\generic/THCStorage.c:36

I used the torch.topk() in two subfunctions of my program . The first subfunction can do well , while the other will happen to this bug . Who encountered this bug and has any solutions ?
Thanks in advance !

However the traceback didn’t show any problem about torch.topk()