-
Notifications
You must be signed in to change notification settings - Fork 21
functions: type autoinference #344
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
|
@kennykos can you please check and confirm that it fixes #342? You have another problem with this line. |
This fixes #342, given my caveat above about the mangled error message when the return type is not specified. |
|
@IvanGrigorik the most recent push checks argument inference for nested Is this something we can support as well. |
|
@kennykos everything is fixed |
kennykos
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.
I have some questions
- Why are we explicitly casting common thread ID names to int?
- Why are we casting ints to doubles?
- Should we consider other module types in addition to numpy?
See the specific comments for details.
Otherwise, this looks good to me.
|
For now pykokkos |
|
|
||
| if not types_changed: | ||
| break | ||
|
|
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.
Can we have some sort of failure warning here if the iterations max out and there are still uninferred types?
kennykos
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.
Looks good to me! I left one comment about an error message that could be nice, but I'll defer to @IvanGrigorik on that one. Otherwise, looks good to me!
kennykos
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.
Looks great!
91cd766 to
4d2c2a4
Compare
This PR addresses #342.
Fixed type inference for functions, so now no need to specify argument types.