Zhengxu Chen
86370fd658
[dynamo] Allow guards to be dropped with custom filter functions. ( #150936 )
...
Summary: A follow up of https://github.com/pytorch/pytorch/pull/150689 .
Test Plan: test_dynamo -k test_guard_filter_fn
Differential Revision: D72722322
Pull Request resolved: https://github.com/pytorch/pytorch/pull/150936
Approved by: https://github.com/jansel
2025-04-11 03:06:34 +00:00
Raymond Li
21c2565f35
Document dynamo ( #146736 )
...
Many files in dynamo are currently lacking file/module-level documentation, which makes it hard to know what they do at a glance and without digging into the code. This fixes that.
Note: documentation was AI-generated and could be incorrect, please review carefully.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/146736
Approved by: https://github.com/jansel , https://github.com/StrongerXi , https://github.com/anijain2305 , https://github.com/zou3519
2025-02-13 00:02:21 +00:00
Xuehai Pan
e74ba1b34a
[BE][Easy][15/19] enforce style for empty lines in import segments in torch/_d*/ ( #129767 )
...
See https://github.com/pytorch/pytorch/pull/129751#issue-2380881501 . Most changes are auto-generated by linter.
You can review these PRs via:
```bash
git diff --ignore-all-space --ignore-blank-lines HEAD~1
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/129767
Approved by: https://github.com/anijain2305
2024-07-31 21:18:11 +00:00
Jez Ng
f908b0e9a3
[dynamo] Enable typechecking for hooks.py ( #112565 )
...
Pull Request resolved: https://github.com/pytorch/pytorch/pull/112565
Approved by: https://github.com/Skylion007
ghstack dependencies: #112561 , #112562 , #112563 , #112564
2023-11-04 19:37:06 +00:00
Edward Z. Yang
7abd035b2f
Add missing mypy-nofollow.ini ( #90179 )
...
I'm not sure how lintrunner worked without this lol.
Signed-off-by: Edward Z. Yang <ezyang@fb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90179
Approved by: https://github.com/albanD , https://github.com/voznesenskym
2022-12-08 01:05:12 +00:00
Michael Voznesensky
4cdc96fb4f
Add hooks structure for passing around user provided hooks, add a new guard_failure_fn ( #90371 )
...
This PR introduces a new function we can pass to torch._dynamo.optimize - guard_failure_fn. Usage is in the PR, and the one stacked on top of it, but the gist of it is that it emits failed guard reason strings alongside code. This is useful for tests and debugging, as it gives far finer grained assertions and control than the compile counter alone.
This is a resubmit of https://github.com/pytorch/pytorch/pull/90129
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90371
Approved by: https://github.com/ezyang
2022-12-07 17:51:53 +00:00