Home
last modified time | relevance | path

Searched refs:torch_function (Results 1 – 17 of 17) sorted by relevance

/aosp_15_r20/external/pytorch/torch/csrc/utils/
H A Dpython_arg_parser.cpp291 py::object torch_function = in dispatch_on_subclass() local
293 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() local
386 if (!torch_function) { in dispatch_on_mode()
[all …]
/aosp_15_r20/external/pytorch/test/
H A Dtest_overrides.py75 def implements_diagonal(torch_function): argument
85 @functools.wraps(torch_function)
87 HANDLED_FUNCTIONS_DIAGONAL[torch_function] = func
186 def implements_sub(torch_function): argument
188 @functools.wraps(torch_function)
190 HANDLED_FUNCTIONS_SUB[torch_function] = func
251 def implements_sub_diagonal(torch_function): argument
253 @functools.wraps(torch_function)
255 HANDLED_FUNCTIONS_SUB_DIAGONAL[torch_function] = func
315 def implements_tensor_like(torch_function): argument
[all …]
/aosp_15_r20/external/pytorch/torch/nn/utils/_expanded_weights/
H A Dexpanded_weights_impl.py81 def implements_per_sample_grads(torch_function): argument
82 @functools.wraps(torch_function)
84 HANDLED_FUNCTIONS[torch_function] = autograd_func
/aosp_15_r20/external/pytorch/torch/_dynamo/variables/
H A Dtensor.py667 from .torch_function import TensorWithTFOverrideVariable
1316 from .torch_function import TensorWithTFOverrideVariable
H A Duser_defined.py657 from .torch_function import build_torch_function_fn
664 from .torch_function import _get_subclass_type_var, call_torch_function
H A Dtorch.py48 from .torch_function import (
H A Dbuilder.py204 from .torch_function import (
/aosp_15_r20/external/pytorch/torch/_dynamo/
H A Dcodegen.py34 from .variables.torch_function import TensorWithTFOverrideVariable
H A Dside_effects.py594 var, variables.torch_function.TorchFunctionModeStackVariable
H A Dsource.py614 from .variables.torch_function import TorchFunctionModeStackVariable
H A Dguards.py2325 from .variables.torch_function import IGNORED_MODES
2640 from .variables.torch_function import IGNORED_MODES
H A Dsymbolic_convert.py126 from .variables.torch_function import TorchFunctionModeVariable
2766 from .variables.torch_function import TorchFunctionModeStackVariable
H A Doutput_graph.py107 from .variables.torch_function import TensorWithTFOverrideVariable
H A Dutils.py2622 from torch._dynamo.variables.torch_function import TensorWithTFOverrideVariable
/aosp_15_r20/external/pytorch/docs/source/community/
H A Ddesign.rst144 - `torch_function <https://pytorch.org/docs/main/notes/extending.html#extending-torch>`__
/aosp_15_r20/external/pytorch/test/dynamo/
H A Dtest_modules.py25 from torch._dynamo.variables.torch_function import TensorWithTFOverrideVariable
1144 def temporary_tensor_subclass(torch_function=None): argument
1148 if torch_function is not None:
1149 torch_function()
/aosp_15_r20/external/pytorch/docs/source/notes/
H A Dextending.rst578 def implements(torch_function):
581 functools.update_wrapper(func, torch_function)
582 HANDLED_FUNCTIONS[torch_function] = func