I’m having a very weird issue when training my model in PyTorch. When using CPU, it works flawlessly. However, when switching over to CUDA, the program crashes with no error reported. I’m running it in this Google Colab Notebook 1 and at a specific point in time the notebook just crashes “unexpectedly” with not error reported whatsoever.
I realize that anybody clicking that link will be deterred of helping me. However, I have pretty much no clue what the issue might be.

Do you have any idea of common issues that causes a crash with no error?

I have managed to narrow it down to one specific point in time. In the second to last cell, I have my main training loop. In order to better capture print messages (?) I put a sleep in there at the end of each loop. The program crashes after the sleep (never wakes up) when my lengths.max() == 2 - and I have no idea why.

Does the sleep behave weirdly when using CUDA (time.sleep)?

Thank you for you help