Change error message for torch.linspace(). (#28274)
Summary:
Fix for https://github.com/pytorch/pytorch/issues/25810
Basically moves the error checking from the device-specific function to the native function.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28274
Differential Revision: D18032189
Pulled By: ezyang
fbshipit-source-id: 9072b5980aa2057274e79bc7241db853bfc36f11