Commit 0550cfb
root
Update on "extend torch.jit._overload to module methods"
Follow up to #23886, add the same overload api specified in PEP 484 to module methods to reduce the friction of adding method overloads that was brought up in #23266.
The usage is:
```
@torch.jit.overload
def add(self, y: int) -> int: ...
@torch.jit.overload
def add(self, y: float) -> float: ...
def add():
...
```
Differential Revision: [D16921304](https://our.internmc.facebook.com/intern/diff/D16921304)1 parent c7454d5 commit 0550cfb
1 file changed
+0
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
| |||
0 commit comments