1) add is_{custom_device_name}() and {custom_device_name}() for open device register; 2) fix open device failed testcases. @ezyang @bdhirsh Pull Request resolved: https://github.com/pytorch/pytorch/pull/124923 Approved by: https://github.com/ezyang