pytorch/torch/_dynamo/variables
Joel Schlosser 8b55b86dbd Move sym_int and sym_float alongside SymInt / SymFloat in base torch package (#91317)
This PR moves the definitions for:
* `sym_int`
* `sym_ceil` (used only for `sym_int`)
* `sym_floor` (used only for `sym_int`)
* `sym_float`

from `torch/fx/experimental/symbolic_shapes.py` to `torch/__init__.py`, where `SymInt` and `SymFloat` are already defined.

This removes the need for several in-line imports, and enables proper JIT script gating for #91318. I'm very open to doing this in a better way!

Pull Request resolved: https://github.com/pytorch/pytorch/pull/91317
Approved by: https://github.com/ezyang, https://github.com/anijain2305
2022-12-28 16:08:16 +00:00
..
__init__.py [dynamo] Port all pytorch/dynamo and test/dynamo pieces over from symbolic-shapes branch (#88768) 2022-11-13 04:50:21 +00:00
base.py Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827) 2022-12-02 01:45:05 +00:00
builder.py Revert "Store source, not sname, in Symbol (#91057)" 2022-12-21 22:33:15 +00:00
builtin.py Move sym_int and sym_float alongside SymInt / SymFloat in base torch package (#91317) 2022-12-28 16:08:16 +00:00
constant.py Fix exception causes all over the codebase (#90271) 2022-12-07 04:29:00 +00:00
dicts.py Cache guards once per variable tracker, rather than re-propagating them repeatedly (#89827) 2022-12-02 01:45:05 +00:00
functions.py Revert "Store source, not sname, in Symbol (#91057)" 2022-12-21 22:33:15 +00:00
lists.py Dynamo FX graph stack traceback fix (#87136) 2022-12-06 02:22:16 +00:00
misc.py Dynamo comptime, with public ComptimeContext API (#90983) 2022-12-19 11:06:01 +00:00
nn_module.py Revert "Don't graph break on patched module methods or aliased methods (#91018)" 2022-12-21 19:54:15 +00:00
tensor.py [dynamo] Rewrite inplace addcdiv and inplace add (#90330) 2022-12-08 21:19:23 +00:00
torch.py [Dynamo] Support torch.get_default_dtype (#89790) 2022-12-19 04:14:11 +00:00
user_defined.py [Dynamo] Fix builder for class with metaclass (#90807) 2022-12-20 05:02:28 +00:00