Well, it is because torch_cuda and torch_cpu are separated to make the linker happy. (target executable/library has a size limit) However, calling torch::cuda::is_available(); doesn’t rely on any symbol in torch_cuda so the linker will optimize it away for your executable. As the result, you see FALSE there. Adding -INCLUDE:?warp_size@cuda@at@@YAHXZ forces the linker to include torch_cuda. If you use CMake, then you don’t need to set it manually. I just don’t expect so many users that create the VS project on their own. So we are working on to move this flag into the header to avoid confusing the user.