Searched refs:torch_function (Results 1 – 17 of 17) sorted by relevance
291 py::object torch_function = in dispatch_on_subclass() local293 if (!torch_function) { in dispatch_on_subclass()296 if (torch_function.ptr() == torch::disabled_torch_dispatch_impl()) { in dispatch_on_subclass()308 PyObject_FastGetAttrString(torch_function.ptr(), "__self__") in dispatch_on_subclass()310 torch_function.ptr() != torch::disabled_torch_function_impl()) { in dispatch_on_subclass()322 torch_function = maybe_torch_dispatch_rule; in dispatch_on_subclass()325 torch_function.ptr(), in dispatch_on_subclass()342 torch_function.ptr(), in dispatch_on_subclass()384 py::object torch_function = in dispatch_on_mode() local386 if (!torch_function) { in dispatch_on_mode()[all …]
75 def implements_diagonal(torch_function): argument85 @functools.wraps(torch_function)87 HANDLED_FUNCTIONS_DIAGONAL[torch_function] = func186 def implements_sub(torch_function): argument188 @functools.wraps(torch_function)190 HANDLED_FUNCTIONS_SUB[torch_function] = func251 def implements_sub_diagonal(torch_function): argument253 @functools.wraps(torch_function)255 HANDLED_FUNCTIONS_SUB_DIAGONAL[torch_function] = func315 def implements_tensor_like(torch_function): argument[all …]
81 def implements_per_sample_grads(torch_function): argument82 @functools.wraps(torch_function)84 HANDLED_FUNCTIONS[torch_function] = autograd_func
667 from .torch_function import TensorWithTFOverrideVariable1316 from .torch_function import TensorWithTFOverrideVariable
657 from .torch_function import build_torch_function_fn664 from .torch_function import _get_subclass_type_var, call_torch_function
48 from .torch_function import (
204 from .torch_function import (
34 from .variables.torch_function import TensorWithTFOverrideVariable
594 var, variables.torch_function.TorchFunctionModeStackVariable
614 from .variables.torch_function import TorchFunctionModeStackVariable
2325 from .variables.torch_function import IGNORED_MODES2640 from .variables.torch_function import IGNORED_MODES
126 from .variables.torch_function import TorchFunctionModeVariable2766 from .variables.torch_function import TorchFunctionModeStackVariable
107 from .variables.torch_function import TensorWithTFOverrideVariable
2622 from torch._dynamo.variables.torch_function import TensorWithTFOverrideVariable
144 - `torch_function <https://pytorch.org/docs/main/notes/extending.html#extending-torch>`__
25 from torch._dynamo.variables.torch_function import TensorWithTFOverrideVariable1144 def temporary_tensor_subclass(torch_function=None): argument1148 if torch_function is not None:1149 torch_function()
578 def implements(torch_function):581 functools.update_wrapper(func, torch_function)582 HANDLED_FUNCTIONS[torch_function] = func