-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allows the caller to pass in argv to hl.main() #8937
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
base: main
Are you sure you want to change the base?
Conversation
62a5895 to
9bae1f1
Compare
|
Any suggestions on how / where to put tests? A simple test would be to use something like |
| if (result != 0) { | ||
| // Some paths in generate_filter_main() will fail with user_error or similar (which throws an exception | ||
| // due to how libHalide is built for Python), but some paths just return an error code. For consistency, | ||
| // handle both by throwing a C++ exception, which pybind11 turns into a Python exception. |
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 updated this comment to be more clear.
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.
Sorry to be a noodge, but now that this hasn't been substantially changed, can we keep it inline? It will make the diff clearer.
|
Hold off on merging - it occurs to me that one can implement |
|
@alexreinking PTAL. Much cleaner I think. |
alexreinking
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 with one nitpick
| if (result != 0) { | ||
| // Some paths in generate_filter_main() will fail with user_error or similar (which throws an exception | ||
| // due to how libHalide is built for Python), but some paths just return an error code. For consistency, | ||
| // handle both by throwing a C++ exception, which pybind11 turns into a Python exception. |
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.
Sorry to be a noodge, but now that this hasn't been substantially changed, can we keep it inline? It will make the diff clearer.
No description provided.