Commit 99e7370
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():
...
```1 parent 940597e commit 99e7370
1 file changed
+0
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 281 | | |
290 | 282 | | |
291 | 283 | | |
| |||
0 commit comments