William Wen
|
762a2079c7
|
[dynamo 3.11] make create_instruction kwarg mandatory (#98032)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/98032
Approved by: https://github.com/albanD
|
2023-03-31 18:20:51 +00:00 |
|
William Wen
|
14ef91cea6
|
[dynamo 3.11] small bug fixes (#96508)
Bugs fixed:
- CALL_FUNCTION_EX expects null pop in symbolic_convert
- make_function_with_closure codegen requires a push_null
- copy over the closure in eval_frame.c
- add JUMP_FORWARD to terminal opcodes
- enum repr fix in utils.py
- fix symbolic_convert's break_graph_if_unsupported wrapper
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96508
Approved by: https://github.com/jansel
|
2023-03-31 18:18:12 +00:00 |
|
William Wen
|
24a5d006f2
|
[dynamo 3.11] Refactor create_instruction (#96499)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96499
Approved by: https://github.com/jansel, https://github.com/albanD
|
2023-03-30 17:05:27 +00:00 |
|
Yanbo Liang
|
f388bec985
|
[Dynamo] torch.Generator state should have a source and be reconstructed properly (#97403)
Fixes #97077 partially.
During FX graph propagation, we request every tensor should have source:
a524123c91/torch/_dynamo/variables/builder.py (L929)
However, the output of ```torch.Generator.get_state()``` is a tensor but without source, since it's generated inside of the FX graph. My change is following what we did for [Python random functions](https://github.com/pytorch/pytorch/blob/master/torch/_dynamo/variables/user_defined.py#L260), to have a dedicated ```GeneratorStateSource```. We have to also update the reconstruction logics, since we will reuse the ```TensorVariable``` reconstruction.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97403
Approved by: https://github.com/jansel, https://github.com/mlazos
|
2023-03-29 04:31:23 +00:00 |
|
jon-chuang
|
7a192cc51c
|
dynamo: wrap graph break inst in try except block - with context manager setup/teardown (#94758)
Replacement to https://github.com/pytorch/pytorch/pull/94672.
Follow up to https://github.com/pytorch/pytorch/pull/94137.
We simply replace the set grad mode try except blocks with one for a more generic contextmanager (using `__enter__` and `__exit__`), storing the context manager into a `symbolic_local` for the duration of the try block.
(see https://github.com/pytorch/torchdynamo/issues/207 for the original motivation)
This allows us to handle calling inner functions with graph breaks for any arbitrarily deep nesting of live context managers subclassing `AbstractContextManager`. (see tests)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94758
Approved by: https://github.com/yanboliang
|
2023-03-06 14:04:17 +00:00 |
|
William Wen
|
04d931d979
|
[dynamo 3.11] changes to MAKE_FUNCTION and MATCH_KEYS (#94100)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94100
Approved by: https://github.com/albanD, https://github.com/jansel
|
2023-02-21 18:47:34 +00:00 |
|
William Wen
|
d5aaf54261
|
[dynamo 3.11] fix cell/freevar offsets (#94099)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94099
Approved by: https://github.com/albanD, https://github.com/jansel
|
2023-02-21 18:47:32 +00:00 |
|
William Wen
|
055a9e45aa
|
[dynamo 3.11] changes to LOAD_GLOBAL and function calls (#94098)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94098
Approved by: https://github.com/albanD
|
2023-02-21 18:47:30 +00:00 |
|
William Wen
|
d567df9f36
|
[dynamo 3.11] remap dup/rotate to copy/swap (#93988)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93988
Approved by: https://github.com/jansel, https://github.com/albanD, https://github.com/mlazos
|
2023-02-14 04:25:14 +00:00 |
|
Michael Voznesensky
|
bbe33532ae
|
Rename DynamicShapeVariable to SymNodeVariable cause thats what it is (#94152)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94152
Approved by: https://github.com/ezyang
|
2023-02-08 10:41:10 +00:00 |
|
Aaron Gokaslan
|
8fce9a09cd
|
[BE]: pyupgrade Python to 3.8 - imports and object inheritance only (#94308)
Apply parts of pyupgrade to torch (starting with the safest changes).
This PR only does two things: removes the need to inherit from object and removes unused future imports.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94308
Approved by: https://github.com/ezyang, https://github.com/albanD
|
2023-02-07 21:10:56 +00:00 |
|
Nikita Shulga
|
5976f0bdfe
|
Set min supported Python version to 3.8 (#93155)
Also, grep for `if sys.version_info .cond. (3, 8)` and replaces them with appropriate action.
This is a last in a series of PRs that moved CI/CD away from testing PyTorch behavior against Python-3.7.
Fixes https://github.com/pytorch/pytorch/issues/80513
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93155
Approved by: https://github.com/huydhn
|
2023-01-29 18:28:46 +00:00 |
|
Andrew M. James
|
7cd951c21e
|
Properly guard all numpy usage within dynamo and remove UnspecializedNumpyVariable (#90795)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90795
Approved by: https://github.com/ngimel, https://github.com/cpuhrsch
|
2023-01-06 22:36:38 +00:00 |
|
Michael Voznesensky
|
06ce1338bc
|
[dynamo] Port all pytorch/dynamo and test/dynamo pieces over from symbolic-shapes branch (#88768)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/88768
Approved by: https://github.com/jansel, https://github.com/ezyang
|
2022-11-13 04:50:21 +00:00 |
|
Jason Ansel
|
c7c09722ad
|
Move TorchDynamo into PyTorch core (#86461)
Context:
https://github.com/pytorch/torchdynamo/issues/1588
This PR moves [TorchDynamo](https://github.com/pytorch/torchdynamo) and TorchInductor into PyTorch core.
- `torchdynamo` becomes `torch._dynamo`
- `torchinductor` becomes `torch._inductor`
This PR was generated by running `copy_to_core.sh` in https://github.com/pytorch/torchdynamo/pull/1538
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86461
Approved by: https://github.com/voznesenskym
|
2022-10-13 23:18:06 +00:00 |
|