-
Notifications
You must be signed in to change notification settings - Fork 87
fix(atenlib): Cast SymInt to INT64 to fix Windows CI #292
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
Codecov Report
@@ Coverage Diff @@
## main #292 +/- ##
==========================================
- Coverage 73.26% 72.73% -0.54%
==========================================
Files 95 95
Lines 9171 9176 +5
==========================================
- Hits 6719 6674 -45
- Misses 2452 2502 +50
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
| # FIXME(#277): Script when attributes can come before inputs | ||
| @torch_op("aten::index_select", trace_only=True) | ||
| def aten_index_select(self: TTensor, dim: int, index: TInt) -> TTensor: | ||
| def aten_index_select(self: TTensor, dim: int, index: IntType) -> TTensor: |
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.
Why can't we keep TInt here? Looks like they are the same to me.
If we are using Txxx in most of places, I'd like to use the same style.
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.
Since mypy requires a TypeVar to appear at least twice in the signature of a generic function, we are forced to use a plain type here.
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.
Actually, we can probably get away with TInt here. Let me try again and replace as many with TInt.
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.
Done
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.
Approved, thanks!
PyTorch can supply int32 inputs as SymInt values. This change adds explicit casts to them to fix the Windows CI.
Fixed additional mypy errors
#289 may be needed for python3.10