Issue #24962: Fix cuda method to support "None" arg for device and a … (#25018)
Summary:
…default value
Addresses https://github.com/pytorch/pytorch/issues/24962. A valid (and the default) value for the `device` parameter in the `cuda` method is `None`. Type signature was returning invalid linter errors in PyCharm. Verified fix in latest PyCharm.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/25018
Differential Revision: D17098520
Pulled By: VitalyFedyunin
fbshipit-source-id: d83eb9976f09c75b4a033cb49c81d972e3fd37c1