I read everything here https://pytorch.org/tutorials/advanced/cpp_export.html 12 and tried at::kCUDA instead of torch::kCUDA. I tried the nightly debug 1.5 libtorch but encountered other problems that I couldn’t solve, so I need to stick with 1.4 for now.