Skip to content
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
merged 19 commits into from
Aug 19, 2022

Conversation

steven-johnson
Copy link
Contributor

@steven-johnson steven-johnson commented Aug 17, 2022

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 realize I moved this into a static library instead, the changes to Halide Python were just too weird
  • The functionality of add_python_stub_extension() is now added to add_halide_generator() (note, not add_halide_library); if you specify PYSTUB <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)

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 steven-johnson changed the title PyStubs Remove add_python_stub_extension(), adding the functionality to add_halide_generator() instead Aug 17, 2022
@steven-johnson steven-johnson marked this pull request as ready for review August 17, 2022 21:54
Base automatically changed from srj/python-helpers to main August 17, 2022 23:20
cmake/HalideGeneratorHelpers.cmake Show resolved Hide resolved
cmake/HalideGeneratorHelpers.cmake Show resolved Hide resolved
python_bindings/src/halide/CMakeLists.txt Outdated Show resolved Hide resolved
packaging/CMakeLists.txt Outdated Show resolved Hide resolved
python_bindings/stub/CMakeLists.txt Outdated Show resolved Hide resolved
packaging/CMakeLists.txt Outdated Show resolved Hide resolved
@steven-johnson steven-johnson merged commit 4bcd6fa into main Aug 19, 2022
@steven-johnson steven-johnson deleted the srj/python-helpers-2 branch August 19, 2022 21:17
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants