Wsl2 cuda-gdb is attached to a python process for debugging, and it gets stuck on certain code

cuda-toolkit version 12.3
Ubuntu 18
WSL2

I refer to this tutorial to debug my python files

Here is my test python file.(It didn’t call the .cu file,just for test)

import torch
b=[[4,5,6],[7,8,9]]
b=torch.tensor(b)
print("arrive here 11")
b=b.cuda()
print("arrive here 22")
print(b)
print(torch.unsqueeze(b,2).shape)

In step seven,my python process is blocked when executing b=b.cuda().
What should I do to fix it? Looking forward to your reply

Hi, @waitting33
This seems duplicate with another topic you post Wsl2 cuda-gdb is attached to a python process for debugging, and it gets stuck on certain code

I am going to close this. Thanks !
Any disagree, please let me know.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.