-
Notifications
You must be signed in to change notification settings - Fork 26.3k
better error msg when seeing a unsupported builtin function #21068
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
better error msg when seeing a unsupported builtin function #21068
Conversation
torch/csrc/jit/script/compiler.cpp
Outdated
| } else { | ||
| auto inputs = getNamedValues(apply.inputs(), true); | ||
| auto attributes = emitAttributes(apply.attributes()); | ||
| if (sv->kind() == "python value of type \'builtin_function_or_method\'") { |
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 error message probably should go in PythonValue::call not here. kind() is for error message reporting only and shouldn't be used to decide behavior.
…er_errmsg_for_unsupported_builtin
…er_errmsg_for_unsupported_builtin
|
@zdevito I updated the PR as suggested, would you mind taking another look when you have time? Thanks! |
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.
@ailzhang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
fixes https://github.com/pytorch/lockdown/issues/39.
Hopefully it doesn't break other tests....