MCPcopy Create free account
hub / github.com/pytorch/pytorch / push

Method push

torch/utils/_python_dispatch.py:70–73  ·  view source on GitHub ↗
(cls, *args, **kwargs)

Source from the content-addressed store, hash-verified

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
75def _get_current_dispatch_mode():
76 stack_len = _len_torch_dispatch_stack()

Callers 15

nFunction · 0.45
pFunction · 0.45
htm.mjsFile · 0.45
renderHeadlineMethod · 0.45
renderTensorMethod · 0.45
renderBodyMethod · 0.45
getTensorMemoryByDeviceFunction · 0.45
aFunction · 0.45
kFunction · 0.45
mFunction · 0.45
wFunction · 0.45
IFunction · 0.45

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected