https://github.com/halide/Halide
Revision c24b40690c28dcea6aaef663f0997739d2a29a97 authored by Steven Johnson on 29 August 2022, 20:48:23 UTC, committed by GitHub on 29 August 2022, 20:48:23 UTC
* Add add_halide_python_extension_library() rule

This adds a rule to create a single Python extension library from one (or more) halide_library rules. This allows you to package multiple Halide filters into a single Python module, which is nice because (1) being able to organize is good, and (2) all the filters in a single Python extension module share the same Halide runtime, including (e.g.) thread pools and method overrides.

(It also removes the just-recently-added PYTHON_EXTENSION_LIBRARY option from the add_halide_library rule, as this new rule is better and more flexible in pretty much every way.)

This modifies the content of our `python_extension` output in such a way that existing uses should be completely unaffected, but defining the right preprocessor macros allows us to split the function wrappers up from the method-definition declaration, so we don't have to generate any new code artifiacts to make this work.

Partially addresses #6956.

* Omits -D in target_compile_definitions

* be explicit about setting to empty

* Add quotes

* Add comments re BUILD_INTERFACE

* Add MODULE_NAME comment

* Remove "defined in HalideGeneratorHelpers.cmake"

* Add comment re add_halide_runtime()

* osx, macos, darwin, oh m

* blankity blank blank

* Use OBJECT library instead

* Add comment about X-macros

* Update HalideGeneratorHelpers.cmake
1 parent 5a09dda
History
Tip revision: c24b40690c28dcea6aaef663f0997739d2a29a97 authored by Steven Johnson on 29 August 2022, 20:48:23 UTC
Add add_halide_python_extension_library() rule (#6979)
Tip revision: c24b406
File Mode Size
.github
apps
cmake
dependencies
doc
packaging
python_bindings
src
test
tools
tutorial
util
.clang-format -rw-r--r-- 1.4 KB
.clang-format-ignore -rw-r--r-- 286 bytes
.clang-tidy -rw-r--r-- 2.2 KB
.gitattributes -rw-r--r-- 342 bytes
.gitignore -rw-r--r-- 5.0 KB
.gitmodules -rw-r--r-- 0 bytes
CMakeLists.txt -rw-r--r-- 4.9 KB
CMakePresets.json -rw-r--r-- 5.6 KB
CODE_OF_CONDUCT.md -rw-r--r-- 3.5 KB
LICENSE.txt -rw-r--r-- 13.8 KB
Makefile -rw-r--r-- 102.6 KB
README.md -rw-r--r-- 16.4 KB
README_cmake.md -rw-r--r-- 73.9 KB
README_python.md -rw-r--r-- 11.1 KB
README_rungen.md -rw-r--r-- 12.1 KB
README_webassembly.md -rw-r--r-- 10.5 KB
run-clang-format.sh -rwxr-xr-x 1.4 KB
run-clang-tidy.sh -rwxr-xr-x 3.1 KB

README.md

back to top