pytorch
aaba0bd3 - [JIT] Fix torch.jit.script for functions with many decorators (#87804)

Commit
2 years ago
[JIT] Fix torch.jit.script for functions with many decorators (#87804) Summary: Python's function parsing from the `ast` module records the line number of the function definition, not the first decorator. So this diff fixes crashes like this: ``` IndexError: vector::_M_range_check: __n (which is 10) >= this->size() (which is 8) ``` Test Plan: New unit test Differential Revision: D40726352 Pull Request resolved: https://github.com/pytorch/pytorch/pull/87804 Approved by: https://github.com/tugsbayasgalan, https://github.com/davidberard98
Author
Mike Iovine
Committer
Parents
Loading