pytorch/torch/csrc/jit/python
anjali411 043e84b3d2 Per-overload torch.ops API (#67254)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67254

Fixes https://github.com/pytorch/pytorch/issues/65997

BC breaking:
`output = torch.ops._test.leaky_relu(self=torch.tensor(-1.0))` now fails with the error `TypeError: __call__() got multiple values for argument 'self'` since we call into `OpOverloadBundle`'s `__call__` method that has `self` bound to it as its first argument.

Follow up work:
1. disallow `default` as an overload name for aten operators.
2. Add a method to obtain a list of all overloads (exclude the ones registered by JIT)
3. Add methods/properties to `OpOverload` to access more schema information (types of input and output args etc)

cc ezyang gchanan

Test Plan: Imported from OSS

Reviewed By: pbelevich

Differential Revision: D33469839

Pulled By: anjali411

fbshipit-source-id: c3fc43460f1c7c9651c64b4d46337be21c400621
2022-01-10 17:29:06 -08:00
..
init.cpp Per-overload torch.ops API (#67254) 2022-01-10 17:29:06 -08:00
init.h
module_python.h
pybind_utils.cpp [jit] Implement DynamicType for TorchScript runtime. (#68136) 2022-01-07 11:23:07 -08:00
pybind_utils.h Remove WindowsTorchApiMacro.h in favor of Export.h (#69585) 2021-12-09 17:30:09 -08:00
pybind.h [AutoAccept][Codemod][FBSourceClangFormatLinter] Daily arc lint --take CLANGFORMAT 2021-12-19 16:38:25 -08:00
python_arg_flatten.cpp
python_arg_flatten.h
python_custom_class.cpp
python_custom_class.h
python_dict.cpp
python_dict.h
python_interpreter.cpp
python_ir.cpp [PyTorch][JIT] Don't refcount Type singletons (#69579) 2022-01-06 17:39:16 -08:00
python_ir.h
python_ivalue.h
python_list.cpp
python_list.h
python_sugared_value.cpp Per-overload torch.ops API (#67254) 2022-01-10 17:29:06 -08:00
python_sugared_value.h Back out "Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions" 2021-12-27 09:11:46 -08:00
python_tracer.cpp
python_tracer.h
python_tree_views.cpp Add SourceView which doesn't own source text as base class of Source (#65309) 2021-10-18 23:17:22 -07:00
python_tree_views.h
script_init.cpp Bump version number to 7 and compile old operators with old schema (#68358) 2022-01-05 23:57:22 -08:00
script_init.h
update_graph_executor_opt.cpp
update_graph_executor_opt.h Remove WindowsTorchApiMacro.h in favor of Export.h (#69585) 2021-12-09 17:30:09 -08:00