Commit 83fb974
scriptfunction: Make sure we have valid __name__ and __qualname__ (pytorch#147906)
It's not fully clear why these are not being created, but you can definitely
reproduce this in code. `__name__` is fun, since there appears to be no way to
explicitly set it on the pybind11 layer or c++ layer. I've set this in the
python wrapper code (which works correctly). But let me know if people feel
strongly and want us to go explicitly cast to python within the cpp functions
and set it there.
Pull Request resolved: pytorch#147906
Approved by: https://github.com/jansel
ghstack dependencies: pytorch#1478941 parent 1ae7cc4 commit 83fb974
2 files changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
461 | 468 | | |
462 | 469 | | |
463 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
1214 | 1216 | | |
1215 | 1217 | | |
1216 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
1217 | 1221 | | |
1218 | 1222 | | |
1219 | 1223 | | |
| |||
0 commit comments