Fix device normalization of automatically generate methods for custom backends. (#101796)
Fixes #ISSUE_NUMBER
Fix the problem of error handling when the device input parameter adopts string type, Align capabilities.
`foo_storage = torch.DoubleStorage(4).foo(device="foo:0, non_blocking=False")`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101796
Approved by: https://github.com/bdhirsh