You could try RelWithDebInfo builds first. I tried them in CI and it should work with this PR https://github.com/pytorch/pytorch/pull/16008 19 merged. The debug version could work with this PR, but you’ll need a newer MSVC (>= 15.8). Newer MSVC won’t work with CUDA 10. So you’ll need both the newer version and the legacy version of MSVC.