I am trying out the c++ frontend with a simple program.
Compilation of this code block is failing -
    torch::DeviceType device_type;
    if (torch::cuda::is_available())
    {
        std::cout << "CUDA is available!" << std::endl;
        device_type = torch::kCUDA;
    }


And throws this error -
error: ‘is_available’ is not a member of ‘at::cuda’
     if (torch::cuda::is_available())

Any idea what might be wrong here?