(cls, *args, **kwargs)
| 68 | |
| 69 | @classmethod |
| 70 | def push(cls, *args, **kwargs): |
| 71 | warnings.warn("`Mode.push()` is no longer necessary and can be replaced with just `with Mode()`") |
| 72 | instance = cls(*args, **kwargs) |
| 73 | return instance |
| 74 | |
| 75 | def _get_current_dispatch_mode(): |
| 76 | stack_len = _len_torch_dispatch_stack() |
no test coverage detected