Aaron Orenstein
0b2a3687b9
PEP585 update - torch/fx ( #145166 )
...
See #145101 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145166
Approved by: https://github.com/bobrenjc93
2025-01-20 18:11:54 +00:00
Xuehai Pan
abbd71d29d
[BE][Easy] enable PYFMT for torch.fx ( #138443 )
...
Reproduce command:
```bash
ghstack checkout https://github.com/pytorch/pytorch/pull/138443
git checkout HEAD~1 torch/
lintrunner -a --take "PYFMT" --all-files
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/138443
Approved by: https://github.com/ezyang
2024-10-21 19:15:49 +00:00
Aaron Orenstein
ed86ac2f25
[BE] typing for decorators - fx/_compatibility ( #134054 )
...
Summary: See #131429
Test Plan: unit tests pass
Differential Revision: D61493706
Pull Request resolved: https://github.com/pytorch/pytorch/pull/134054
Approved by: https://github.com/oulgen
2024-08-26 04:00:27 +00:00
PyTorch MergeBot
945bf78894
Revert "[BE] typing for decorators - fx/_compatibility ( #131568 )"
...
This reverts commit 193f62fde9 .
Reverted https://github.com/pytorch/pytorch/pull/131568 on behalf of https://github.com/clee2000 due to same as https://github.com/pytorch/pytorch/pull/131572#issuecomment-2254328359 but I clicked the wrong link by accident. This is where it actually starts ([comment](https://github.com/pytorch/pytorch/pull/131568#issuecomment-2254330781 ))
2024-07-28 03:43:39 +00:00
Aaron Orenstein
193f62fde9
[BE] typing for decorators - fx/_compatibility ( #131568 )
...
See #131429
Pull Request resolved: https://github.com/pytorch/pytorch/pull/131568
Approved by: https://github.com/justinchuby , https://github.com/oulgen , https://github.com/zou3519
2024-07-25 22:24:19 +00:00
Aaron Orenstein
5a0068cc69
[BE] mypy: disallow untyped decorators ( #131428 )
...
Untyped decorators strip the types from their decorated function so even if the underlying function is fully typed then callers to it don't get any benefit from type annotations.
Step 1 - Enable the error and override in all the offending files.
#131429
Pull Request resolved: https://github.com/pytorch/pytorch/pull/131428
Approved by: https://github.com/justinchuby , https://github.com/oulgen
2024-07-23 21:50:55 +00:00
Aaron Orenstein
038b927590
Flip default value for mypy disallow_untyped_defs [7/11] ( #127844 )
...
See #127836 for details.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/127844
Approved by: https://github.com/oulgen
ghstack dependencies: #127842 , #127843
2024-06-08 18:49:45 +00:00
Wenting Wang
393fe9339a
Back out "Revert D49107540: [pytorch][PR] split by tag" ( #109332 )
...
Summary:
Original commit changeset: 6391a068640b
Original Phabricator Diff: D49107540
Test Plan: same as D49107540
Differential Revision: D49297522
Pull Request resolved: https://github.com/pytorch/pytorch/pull/109332
Approved by: https://github.com/842974287
2023-09-16 05:29:16 +00:00
PyTorch MergeBot
bf5622e965
Revert "split by tag ( #108892 )"
...
This reverts commit 89b6276be9 .
Reverted https://github.com/pytorch/pytorch/pull/108892 on behalf of https://github.com/facebook-github-bot due to Diff reverted internally ([comment](https://github.com/pytorch/pytorch/pull/108892#issuecomment-1720249148 ))
2023-09-14 22:43:03 +00:00
Wenting Wang
89b6276be9
split by tag ( #108892 )
...
Differential Revision: D49107540
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108892
Approved by: https://github.com/842974287
2023-09-14 21:49:11 +00:00
Kazuaki Ishizaki
105ef68f72
Fix typos under torch/fx directory ( #97596 )
...
This PR fixes typos in comments and messages of `.py` files under `torch/fx` directory
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97596
Approved by: https://github.com/dagitses , https://github.com/kit1980
2023-04-10 21:57:36 +00:00
Sherlock Huang
2ca721cda5
An improved version of subgraph matcher ( #82090 )
...
This new version of subgraph matcher further supports
- optionally match with pattern's placeholder and output nodes
- patterns with multiple outputs
- filtering out non-containing matches
- filtering out overlapping matches
TODOs:
- [x] Update replace_pattern() to use this matcher
- [x] Fix cases with identical anchor
- [x] Introduce wildcard matching, such Any, OneOf
- [ ] Improve node comparer to match args and kwargs values
Pull Request resolved: https://github.com/pytorch/pytorch/pull/82090
Approved by: https://github.com/ezyang
2022-08-12 03:32:09 +00:00
Sherlock Huang
ac5a94789f
Refactor lift_subgraph_as_module as a fx.passes.util function ( #80292 )
...
lift_subgraph_as_module can be shared between fuser_utils.py and spliter_utils.py
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80292
Approved by: https://github.com/jjsjann123 , https://github.com/842974287
2022-06-29 22:35:39 +00:00