-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Remove add_python_stub_extension(), adding the functionality to add_halide_generator() instead #6952
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move it into `add_halide_library` instead, as another output option. (add_python_stub_extension will likely be moved as well, in a subsequent PR)
steven-johnson
commented
Aug 17, 2022
steven-johnson
changed the title
PyStubs
Remove add_python_stub_extension(), adding the functionality to add_halide_generator() instead
Aug 17, 2022
alexreinking
requested changes
Aug 19, 2022
alexreinking
approved these changes
Aug 19, 2022
ardier
pushed a commit
to ardier/Halide-mutation
that referenced
this pull request
Mar 3, 2024
…alide_generator() instead (halide#6952) * Remove add_python_aot_extension() rule in CMake Move it into `add_halide_library` instead, as another output option. (add_python_stub_extension will likely be moved as well, in a subsequent PR) * Update README_cmake.md * Skip Python tests when compiling for WASM * PyStubs * Update README_cmake.md * Update Generator.h * Update CMakeLists.txt * Revert "Update CMakeLists.txt" This reverts commit ed5bb00. * fixes * fixes * Update CMakeLists.txt * fixes * fixes * fixes * Remove LIBRARY DESTINATION * Update CMakeLists.txt * fixup packaging Co-authored-by: Alex Reinking <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bit more involved than the previous one:
To simplify the world, I moved the generic implementation of the PyStub call from its own bespoke library and into the Halide Python library; my reasoning here is that any code that can usefully use a PyStub (ie, to generate Halide IR in Python) is gonna have to have this dependency anyway. To accomplish this I had to change the pybind11_add_module type from MODULE to SHARED (otherwise I can't add it as a link dependency)... not sure if there is a downside to this that I don't realizeI moved this into a static library instead, the changes to Halide Python were just too weirdadd_python_stub_extension()
is now added toadd_halide_generator()
(note, not add_halide_library); if you specifyPYSTUB <generator-name>
then you get your stub generated. Note that we lost the ability to customize the stubname (it's now always<generator-name>_pystub
); if this turns out to be unpopular then we can add the ability back in (I just wanted to keep options to a minimum)