hemingkx / ChineseNMT

ChineseNMT: Translate English to Chinese with PyTorch Implementation of Transformer
439 stars 84 forks source link

总是gpu错误 #17

Open gamamasm opened 10 months ago

gamamasm commented 10 months ago

CUDA error: invalid device ordinal CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

bxy666666 commented 10 months ago

maybe you can turn to config.py, modify the device_id = [0, 1] according to your GPU situation, hope this can works.

WThirteen commented 5 months ago

我是在笔记本上运行。只有一张3060laptop。

我把os.environ['CUDA_VISIBLE_DEVICES'] = '2, 3' 改为了 os.environ['CUDA_VISIBLE_DEVICES'] = '0' 就可以运行了。 希望能够帮到你