-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[JIT] Record source/line info in SourceRange and report in highlight #20898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
suo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our dreams are coming true
6ffe317 to
ea201db
Compare
zdevito
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few inline comments where there may be bugs but it generally looks good.
torch/csrc/jit/source_range.h
Outdated
| } | ||
| } | ||
|
|
||
| std::tuple<size_t, size_t> line_col_to_byte_offs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is python frontend specific so it should probably live in SourceRangeFactory not here.
facebook-github-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesr66a is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@jamesr66a merged this pull request in 6875018. |
Resolves https://github.com/pytorch/lockdown/issues/29
Examples:
It also gets the correct column number in the case where the original source file has common leading whitespace in front of the callable: