pytorch/torch/csrc/jit/python
Nikolay Korovaiko 5177f95d21 Introducing SymInt to Pytorch (for tracing size arithmetic) (master rebase) (#74861)
Summary:
This PR introduces `SymInt` type to Pytorch which will be used by LTC and AOTAutograd for tracing size arithmetic and tests.
`SymInt` is a C++ union structure [int64_t, SymbolicIntNode*] that wraps around an int64_t field where the value of the field could be an index into a list of `shared_ptr<SymbolicIntNode>` or a real int.
This PR doesn't add any support for actually tracing symbolic ints. i.e. data_ for now can only contain real ints.

```
Goal 1: just to show we can add a type to PyTorch core. (wraps int) LANDEABLE
Finalize the naming - symint
Want the name to be short
Does invoke “size” - NO
SInt/SymInt/SymbolicInt
SInt could mean signed int
sym_int or symint or SymInt (originally it was “int”; capitalized implies object semantics, whereas lowercase implies value semantics)
JIT schema - symint
C++ - symint
```

See more details here: https://docs.google.com/document/d/1iiLNwR5ohAsw_ymfnOpDsyF6L9RTUaHMpD8 (d843f63f2a)YLw-jxEw

Pull Request resolved: https://github.com/pytorch/pytorch/pull/74861

Reviewed By: qihqi, ngimel

Differential Revision: D35226230

Pulled By: Krovatkin

fbshipit-source-id: 34acf342bd50fcaa4d8d5dd49c2fd6a98823a5b3
(cherry picked from commit 218643f63ef181cabb92d13a6e837eb64f2dda3c)
2022-03-31 21:59:59 +00:00
..
init.cpp Add comments for adding shape function and linting (#73570) 2022-03-31 04:25:43 +00:00
init.h
module_python.h
pybind_utils.cpp Introducing SymInt to Pytorch (for tracing size arithmetic) (master rebase) (#74861) 2022-03-31 21:59:59 +00:00
pybind_utils.h Get rid of TorchScript sparse tensor is experimental warning. (#73874) 2022-03-09 15:45:24 +00: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 Introducing SymInt to Pytorch (for tracing size arithmetic) (master rebase) (#74861) 2022-03-31 21:59:59 +00:00
python_ir.h
python_ivalue.h
python_list.cpp [BE] Fix pybind deprecation warnings (#72376) 2022-02-07 18:33:32 +00:00
python_list.h Use ptrdiff_t rather than ssize_t (#71271) 2022-01-13 12:41:53 -08:00
python_sugared_value.cpp (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
python_sugared_value.h (2/2) Make TorchScript Preserve Fully Qualified Class Name for Python Exceptions: frontend change (#72899) 2022-02-16 03:45:15 +00:00
python_tracer.cpp
python_tracer.h
python_tree_views.cpp Revert D34455360: Multisect successfully blamed D34455360 for test failures 2022-03-08 23:18:54 +00:00
python_tree_views.h
script_init.cpp Clean up profiling mode and profiling executor strategy (#73875) 2022-03-29 18:38:51 +00: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