I am using vs2022 to build and debug the project. Since I have only the lib of libtorch, I can not step into it.

image1582×813 60.2 KB

Please have a look at the above figure. Would it be helpful to locate the error?
In addition, I found another bug:
torch::Tensor tensor = torch::rand({5, 3}, torch::kCUDA)

It also crash.  But torch::rand({5, 3}) works.