https://github.com/halide/Halide

sort by:
Revision Author Date Message Commit Date
88f2956 Allow use of bool|int|float for Generator type args Per suggestion on https://github.com/halide/Halide/pull/6764, this allows these type aliases. How does it look / feel? (Adding similar aliasing for, at least, NumPy types is probably desirable as well) 09 September 2022, 23:40:56 UTC
d040964 Update bitpy_generator.py 09 September 2022, 23:16:13 UTC
a2964a3 Merge branch 'srj/pyext-bool-types' into srj/pygen-three 09 September 2022, 23:16:10 UTC
1c570cb Fix Python handling of boolean buffers The Python Extension code didn't handle boolean buffers correctly, making it impossible to construct one in Python and pass it thru to Halide-generated code. This fixes that, and also fixes the test that just expected it to fail (!). 09 September 2022, 23:06:58 UTC
f613271 Move argname uniquification stripping into PyCallable 09 September 2022, 22:08:00 UTC
b789450 Add error checking for missing Python in add_halide_library() 09 September 2022, 21:47:50 UTC
07ea6c2 Use add_halide_generator() 09 September 2022, 21:19:52 UTC
202e8bf Update README_python.md 09 September 2022, 21:12:08 UTC
f85be0a README changes 09 September 2022, 21:11:27 UTC
1b19311 NoneType -> UnspecifiedType 09 September 2022, 20:53:33 UTC
7a84863 PythonCorrectnessGenerators 09 September 2022, 20:48:45 UTC
406ade5 Merge branch 'main' into srj/pygen-three 09 September 2022, 20:34:56 UTC
4e352d3 Clean up Adams2019 CMake file (#7003) 09 September 2022, 16:49:26 UTC
bd74f94 Log target info in performance_fast_pow (#6997) (#6998) Try to gather info to track down heisenbug 08 September 2022, 00:40:05 UTC
e5069ef Apply _Halide_place_dll() to _Halide_gengen (#6999) (#7000) 07 September 2022, 21:15:58 UTC
1644e64 [Codegen] Adapt ModuleAddressSanitizerPass/ModuleSanitizerCoveragePass renaming (#6996) https://github.com/llvm/llvm-project/commit/93600eb50ceeec83c488ded24fa0fd25f997fec6 renamed ModuleAddressSanitizerPass to AddressSanitizerPass. https://github.com/llvm/llvm-project/commit/4c18670776cd6ac31099a455b2b22b38b0408006 renamed ModuleSanitizerCoveragePass. 07 September 2022, 18:28:08 UTC
cbe2e63 Fix compiler warnings in Elf.cpp (#6992) * Fix compiler warnings in Elf.cpp Some versions of GCC will complain that there is a possible use of uninitialized field `Sym<>::st_info` here; that's technically true, in that it is a bitfield that we previously set via two calls, so it temporarily could use uninitialized bits, but those would immediately be overwritten by well-defined bits. That said, the API could have been misused, so I collapsed Sym::set_type and Sym::set_bindings into a single call to avoid this warning. While I was there, I did a little hygiene on Rel<> and Rela<> as well, as there was an unused-but-similarly-dubious API there. Also added some C++17 `if constexpr` love. * Removed constexpr 06 September 2022, 17:18:50 UTC
8b9c081 Fixes for Xcode "new" build system. (#6993) 1. TargetExportScript was running into an Xcode bug with its handling of linker flags. Now using XCODE_ATTRIBUTE_EXPORTED_SYMBOLS_LIST as a workaround. 2. Added a missing dependency in Python module definition code. Fixes #6987 02 September 2022, 01:55:43 UTC
d7949f3 fixes 01 September 2022, 19:09:18 UTC
3a1d480 Merge branch 'main' into srj/pygen-three 01 September 2022, 18:59:28 UTC
ce2e7f3 Refactor buffer-unpacking code in PythonExtensionGen (#6991) This moves most of the interesting code into the common module block, so we don't risk duplicating code for extensions that contain multiple function definitions. 01 September 2022, 17:58:57 UTC
95e37ee Improve error-handling in Python Extensions (#6986) * Improve error-handling in Python Extensions Currently, Python Extensions don't make any effort to override `halide_error`, so the default (which aborts) is generally used... this is very unfriendly. This modifies the standard Python Extension glue code to hook halide_error, saving the text in a thread local, and then throwing a Python exception after the extension's AOT call is finished (if an error occurred, of course). Also does a drive-by default hooking of `halide_print` to ensure that it goes to whatever Python thinks that `stdout` is. (Note that it would be really nice if we could use closures of some sort for halide_error, halide_print, etc so that we could save context in the actual Python module, rather than in a thread-local global var, but this currently isn't possible without nontrivial refactoring in the Halide runtime.) * Make Windows happy * Remove dangling code bits * Allow defeating of error-handler via HALIDE_PYTHON_EXTENSION_OMIT_ERROR_AND_PRINT_HANDLERS 31 August 2022, 21:44:17 UTC
e531e24 Fix markdown links (#6988) 31 August 2022, 16:55:51 UTC
386e1ee Add `add_halide_runtime` rule (#6985) Fixes #6981 30 August 2022, 20:19:58 UTC
e7c1c86 Add test for _Halide_target_export_single_symbol (#6983) Add test for _Halide_target_export_single_symbol 29 August 2022, 23:09:20 UTC
c24b406 Add add_halide_python_extension_library() rule (#6979) * 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 29 August 2022, 20:48:23 UTC
5a09dda Fix XCode by wrapping weights in an OBJECT library (#6977) The XCode "new build system" doesn't like generated source files to be associated with more than one target. Going through an OBJECT library like this fixes that problem, but also saves us a compilation, so it's a good thing to do anyway. Fixes #6976 26 August 2022, 00:42:26 UTC
50018c4 Small refactor to remove confusion between CodeGen_LLVM and CodeGen_Internal. (#6973) * Small refactor to remove confusion between CodeGen_LLVM and CodeGen_Internal. 25 August 2022, 23:01:39 UTC
4877b9f Lower saturating_cast in bounds inference (#6970) * lower saturating_cast in bounds inference * openGL fix to saturating_cast 24 August 2022, 16:21:24 UTC
068f1e2 Don't cache Halide_ASAN_ENABLED (#6969) check_cxx_symbol_exists saves its output in the cache and does not run if its destination variable is defined. This is OK when used to test something that necessitates a totally fresh configuration, like any property of the target architecture, which would require changing the toolchain file. However, the result here can change if someone just modifies CMAKE_CXX_FLAGS, so it can get out of sync in some cases. 24 August 2022, 00:35:10 UTC
eacadb6 Use CMake target to handle vendored SPIRV headers (#6968) 24 August 2022, 00:35:00 UTC
1dcff43 Update Pipeline.cpp 23 August 2022, 22:49:13 UTC
7379375 Update _generator_helpers.py 23 August 2022, 22:46:52 UTC
93a437d Make GeneratorParam values only settable from ctor 23 August 2022, 22:36:27 UTC
b96e972 fixes 23 August 2022, 22:17:59 UTC
1959ae0 Update callable.py 23 August 2022, 22:14:37 UTC
d899cc4 add compile_to_callable() 23 August 2022, 22:04:16 UTC
96fec07 Add _to_argument() convenience fn for Parameter 23 August 2022, 21:52:08 UTC
a29fd0b Fill in Argument and ArgumentEstimates 23 August 2022, 21:10:04 UTC
2f0957b CMake packaging fixes (#6966) * Add Halide_ASAN_ENABLED to package. * Fix handling of optional components. Make PNG/JPEG optional. * Make it easier to find HalideHelpers Before this change, users would either need to set Halide_ROOT to a Halide installation path or add said path to CMAKE_PREFIX_PATH. If they tried to use a different mechanism, like setting Halide_DIR or directly annotating their find_package call with HINTS or PATHS, then it would fail to find HalideHelpers.cmake. Adding this hint inside HalideConfig.cmake makes the package more robust, while still respecting the more powerful Halide_ROOT and CMAKE_PREFIX_PATH variables. * Delete undocumented variables in HalideConfig Some of our package's internal variables and macros leak out into user builds. We don't want users to use any of these. We might hit Hyrum's Law here, but I hope not. Users of these variables and macros should seek other means. 23 August 2022, 19:38:51 UTC
59fc488 Clarify naming for generators 23 August 2022, 18:38:13 UTC
d4fa840 Fix bullet list 23 August 2022, 18:02:08 UTC
e7229b3 Add internal Generator link 23 August 2022, 17:59:55 UTC
57468c3 Merge branch 'main' into srj/pygen-three 23 August 2022, 17:47:09 UTC
ca6319b Some minor top-level CMakeLists.txt reorganization (#6957) * Disables the usage warning when CMAKE_BUILD_TYPE is defined, but explicitly empty. * Overrides C++ standard variables using the cache (CMake 3.21+) * Allows including projects to build our tests, etc. but disables by default via PROJECT_IS_TOP_LEVEL (CMake 3.21+) * Removes misleading distrib target. * Removes deprecated clang-format target (use ./run-clang-format.sh instead) 23 August 2022, 04:07:09 UTC
37f7514 Python: don't crash for repr(Expr()) (#6962) 23 August 2022, 00:40:17 UTC
671b26d Enable deprecations warnings (#6555) * Enable deprecations warnings We currently disable deprecation warnings inside Halide. This re-enables them there, and also inside add_halide_generator(). 23 August 2022, 00:39:28 UTC
f7a30e0 Fix RPATH for Python wheels on macOS (#6958) 22 August 2022, 18:35:26 UTC
a927717 Don't allow PYSTUB for Python Generators 22 August 2022, 17:20:13 UTC
fd3bec3 [HVX] Fix state_var issue (#6894) * fix HVX state_var issue * abort if host is nullptr 22 August 2022, 16:08:34 UTC
33d471e Merge branch 'main' into srj/pygen-three 19 August 2022, 22:55:24 UTC
4bcd6fa Remove add_python_stub_extension(), adding the functionality to add_halide_generator() instead (#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 ed5bb00283f0e4fbdbea74adf497d4ff93b0c8d1. * fixes * fixes * Update CMakeLists.txt * fixes * fixes * fixes * Remove LIBRARY DESTINATION * Update CMakeLists.txt * fixup packaging Co-authored-by: Alex Reinking <reinking@google.com> 19 August 2022, 21:17:21 UTC
a1cd71c Build fixes for manylinux2014 (#6953) 19 August 2022, 03:55:04 UTC
3af76bc Update HalideGeneratorHelpers.cmake 18 August 2022, 21:41:32 UTC
14638e2 Update HalideGeneratorHelpers.cmake 18 August 2022, 00:12:23 UTC
dd79a82 Merge branch 'main' into srj/pygen-three 18 August 2022, 00:12:16 UTC
1068403 Remove add_python_aot_extension() rule in CMake (#6949) * 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 17 August 2022, 23:20:43 UTC
14c720b Update README_python.md 17 August 2022, 23:19:49 UTC
e822000 Update Generator.cpp 17 August 2022, 23:07:48 UTC
dd5fe8d Two quick build fixes (#6950) * ASLog is linked to autoscheduler MODULES; needs PIC * Out-of-source Python bindings just need libHalide, not imageio * Fixes to setup.py 17 August 2022, 22:17:40 UTC
6f2d878 Merge branch 'main' into srj/pygen-three 17 August 2022, 22:04:48 UTC
807d988 Handle saturating_cast in compute_expr_cost() (#6947) 17 August 2022, 19:33:38 UTC
5100ad6 Don't throw an exception from generate_filter_main (#6946) 17 August 2022, 01:06:52 UTC
7ab869f WIP 17 August 2022, 00:28:01 UTC
fde327f Merge branch 'main' into srj/pygen-three 16 August 2022, 22:17:29 UTC
4f5c53c Add/update Python Readme (#6939) * Add/update Python Readme This moves the Python README to the toplevel and reworks it considerably, adding details and updating various bits. Note that the Python documentation here is still incomplete; this is intended as a prelude to adding documentation for Python Generators in a future PR. 16 August 2022, 22:15:53 UTC
63d563f Export HalidePythonExtensionHelpers.cmake for installs (#6941) * Export HalidePythonExtensionHelpers.cmake for installs * oops * fixes * Fix broken code in target_export_script() * oops #2 * Add WITH_SOABI to stubs as well as AOT * More fixes * Update CMakePresets.json * Update CMakePresets.json 16 August 2022, 21:38:42 UTC
52b91a4 Add minimal useful implementation of extracting and concatenating bits (#6928) * Minimal approach to making Deinterleave correct for Reinterpret * Add minimal useful implementation of extracting and concatenating bits * clang-tidy * More clang-tidy fixes * Add missing error message * Add low-bit-depth noise test * Add test to cmake build * Fix power-of-two check * Remove dead object * Add little-endian comment to reinterpret IR node * Simplify concat_bits of single arg * Add missing second arg * Fix concat_bits call Co-authored-by: Andrew Adams <anadams@adobe.com> 14 August 2022, 17:24:30 UTC
118acc2 Update PyStubImpl.cpp 12 August 2022, 22:25:00 UTC
e8782d4 Update __init__.py 12 August 2022, 20:53:16 UTC
f60a8fb Fix badly-merged CMakePresets.json file (#6936) 12 August 2022, 20:45:37 UTC
87b2e1d Merge branch 'srj/bad-presets' into srj/pygen-three 12 August 2022, 20:45:14 UTC
abadedf Fix badly-merged CMakePresets.json file 12 August 2022, 20:44:38 UTC
028367f add hl.active_generator_context() 12 August 2022, 20:41:59 UTC
e8638e7 Merge branch 'main' into srj/pygen-three 12 August 2022, 19:56:14 UTC
5081cc1 Revise PyGen API to have implicit GeneratorContext (#6935) * Revise PyGen API to have implicit GeneratorContext This proposes to revise the Python Generator API to have GeneratorContext *never* be an explicit argument; rather, to have an *implicit* current GeneratorContext that is active. This reduces boilerplate when composing code (e.g. via Generator.call). To temporarily push a new GeneratorContext on the active stack, `with hl.set_context(ctx):` is the appropriate thing to do. * Update _generator_helpers.py * Revise to avoid need for set_context() * clang-tidy 12 August 2022, 19:55:54 UTC
5e8f97b Add ASAN support to CMake via toolchain file (#6920) Add ASAN support Co-authored-by: Alex Reinking <reinking@google.com> 11 August 2022, 22:57:54 UTC
d452955 Merge branch 'main' into srj/pygen-three 11 August 2022, 21:55:03 UTC
b734957 Add build & test presets for release and debug CMake builds (#6934) Also, drive-by rename of 'default' to 'base' to better imply the inheritance 11 August 2022, 19:35:28 UTC
4ac278c Merge branch 'main' into srj/pygen-three 11 August 2022, 19:31:19 UTC
4cdc2a1 Tutorial 10 needs to be skipped for Python when targeting Wasm (just as non-Python does) (#6932) * Tutorial 10 needs to be skipped for Python when targeting Wasm (just as non-Python does) * fixes * Update CMakeLists.txt 11 August 2022, 19:30:57 UTC
42ba36b Update CMakeLists.txt 11 August 2022, 16:46:59 UTC
fc17dc2 Update PyGenerator.cpp 11 August 2022, 00:46:08 UTC
d210731 fixes 11 August 2022, 00:42:05 UTC
fc9e685 Fixes 11 August 2022, 00:31:33 UTC
43e6a26 Rework internal PYTHONPATH maintenance (#6922) * Rework PYTHONPATH * Move pure-Python file copying logic to build time. * Use TARGET_RUNTIME_DLLS to copy all DLLs instead of just Halide. * Ensure that the last path component for Halide_Python is always `halide` * Simplify __init__.py now that it's copied to build tree * Add helper to de-duplicate PYTHONPATH test logic Fixes #6870 Co-authored-by: Alex Reinking <alex.reinking@gmail.com> Co-authored-by: Alex Reinking <reinking@google.com> 10 August 2022, 22:05:11 UTC
b690801 Update CMakeLists.txt 10 August 2022, 21:55:17 UTC
d686a96 fixes 10 August 2022, 21:33:50 UTC
46fefdb Merge branch 'main' into srj/pygen-three 10 August 2022, 21:02:15 UTC
92de4a1 Halide::Error should not extend std::runtime_error (#6927) * Halide::Error should not extend std::runtime_error Unfortunately, the std error/exception classes aren't marked for DLLEXPORT under MSVC; we need our Error classes to be DLLEXPORT for libHalide (and python bindings). The current situation basically causes MSVC to generator another version of `std::runtime_error` marked for DLLEXPORT, which can lead to ODR violations, which are bad. AFAICT we don't really rely on this inheritance anywhere, so this just eliminates the inheritance entirely. (Note that I can't point to a specific malfunction resulting from this, but casual googling based on the many warnings MSVC emits about the current situation has me convinced that it needs addressing.) * noexcept 10 August 2022, 17:30:46 UTC
1bf1599 Make saturating_cast an intrinsic (#6900) * Make saturating_cast an intrinsic * handle saturating_cast in Bounds.cpp + add bounds tests * update saturating_cast CodeGen * with_lanes should work on intrinsics as well * lift to saturating_cast in FindIntrinsics * update intrinsics test for u16_sat * better sat_cast(widen(expr)) handling in find_intrinsics * simplify bounds of saturating_cast + update is_monotonic 08 August 2022, 21:24:16 UTC
8794fac Make use of CMake 3.22 features (#6919) * Remove AddCudaToTarget.cmake * Remove MakeShellPath.cmake * Use CheckLinkerFlag in TargetExportScript * Use DEPFILE for all generators * Use REQUIRED with find_program, where applicable * Use REQUIRED with find_library, where applicable * Use CMake 3.21 cache behavior in HalideTargetHelpers.cmake * Replace uses of get_filename_component with cmake_path * Rework BLAS detection in linear_algebra app * Drive-by: fix autotune_loop.sh install rule. * Fix CBLAS header in linear_algebra test_halide_blas 08 August 2022, 20:44:32 UTC
988ae06 Merge branch 'main' into srj/pygen-three 08 August 2022, 20:12:41 UTC
9ca7560 Fix wrong install path for *.py files (#6921) * Fix wrong install path for *.py files We were looking in a nonexistent dir, so we never copied `__init__.py` as we should have. * Update CMakeLists.txt 05 August 2022, 02:20:29 UTC
b32f347 Merge branch 'main' into srj/pygen-three 04 August 2022, 20:53:18 UTC
256c4d9 Fix bug when realize condition depends on tuple call (#6915) If the realization is tuple-valued, and the condition on the realization uses a tuple call (index != 0), then the condition wasn't getting resolved during the split_tuples pass. The cause was a missing mutate call. 04 August 2022, 20:21:01 UTC
ffa2c36 Fix two warnings found with clang 16 (#6918) - variable 'count' set but not used - warning: use of bitwise '|' with boolean operands 04 August 2022, 20:10:37 UTC
3a04fc0 Remove unused GHA and packaging workflows. (#6917) 04 August 2022, 14:00:45 UTC
cc44ee5 Upgrade CMake minimum version to 3.22 (#6916) Fixes #6910. 04 August 2022, 01:40:22 UTC
857b045 LICENSE.txt: add BLAS license. (#6914) 03 August 2022, 22:24:43 UTC
back to top