pytorch/torchgen/api
Peter Bell 5f2e31797a Replace _dtype_default_type_hack (#81479)
Currently any function with a default dtype other than None has to be
manually entered into this function. Instead, this reads the default
directly from `native_functions.yaml`. In order to do this, I also
change `PythonSignatureGroup` to take `tensor_options_args` from the
functional variant since the out variant doesn't actually have tensor
options arguments to take the default values from.

Also note that we need to use `default_init` instead of `default`
because the out argument version doesn't have a `tensor_options`
argument to extract the default value from and so the PythonSignature
objects wouldn't match.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/81479
Approved by: https://github.com/albanD
2022-07-21 16:42:49 +00:00
..
__init__.py
autograd.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
cpp.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
dispatcher.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
functionalization.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
lazy.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
meta.py
native.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
python.py Replace _dtype_default_type_hack (#81479) 2022-07-21 16:42:49 +00:00
structured.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
translate.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
types.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
ufunc.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00
unboxing.py Apply ufmt linter to all py files under torchgen (#81570) 2022-07-16 03:52:25 +00:00