Commit Graph

6 Commits

Author SHA1 Message Date
BowenBao
60a68477a6 Bump black version to 23.1.0 (#96578)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96578
Approved by: https://github.com/ezyang
2023-03-15 06:27:59 +00:00
Xuehai Pan
5b1cedacde [BE] [2/3] Rewrite super() calls in functorch and torch (#94588)
Rewrite Python built-in class `super()` calls. Only non-semantic changes should be applied.

- #94587
- #94588
- #94592

Also, methods with only a `super()` call are removed:

```diff
class MyModule(nn.Module):
-   def __init__(self):
-       super().__init__()
-
    def forward(self, ...):
        ...
```

Some cases that change the semantics should be kept unchanged. E.g.:

f152a79be9/caffe2/python/net_printer.py (L184-L190)

f152a79be9/test/test_jit_fuser_te.py (L2628-L2635)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/94588
Approved by: https://github.com/ezyang, https://github.com/albanD
2023-02-10 21:16:33 +00:00
Nikita Karetnikov
841995d53b [primTorch] Add refs for data conversion ops (#86561)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/86561
Approved by: https://github.com/lezcano, https://github.com/mruberry, https://github.com/zou3519
2022-10-18 08:38:51 +00:00
Peter Bell
4aeb98dee9 Move RefInfo classes into opinfo.refs (#83563)
Given that there is already a clear `op_db`, `python_ref_db` split I
think it makes sense to have the `RefInfo` classes be defined in a
different file.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83563
Approved by: https://github.com/albanD
2022-08-19 12:25:59 +00:00
PyTorch MergeBot
0ddabe56ad Revert "Move RefInfo classes into opinfo.refs (#83563)"
This reverts commit 03ce36e3c1.

Reverted https://github.com/pytorch/pytorch/pull/83563 on behalf of https://github.com/peterbell10 due to Stack broke lint
2022-08-19 02:21:40 +00:00
Peter Bell
03ce36e3c1 Move RefInfo classes into opinfo.refs (#83563)
Given that there is already a clear `op_db`, `python_ref_db` split I
think it makes sense to have the `RefInfo` classes be defined in a
different file.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83563
Approved by: https://github.com/albanD
2022-08-19 01:49:47 +00:00