https://github.com/halide/Halide

sort by:
Revision Author Date Message Commit Date
3577f88 Fix type error in VectorizeLoops (#8055) 01 February 2024, 17:47:24 UTC
2111594 Track whether or not let expressions failed to solve in solver (#7982) * Track whether or not let expressions failed to solve in solver After mutating an expression, the solver needs to know two things: 1) Did the expression contain the variable we're solving for 2) Was the expression successfully "solved" for the variable. I.e. the variable only appears once in the leftmost position. We need to know this to know property 1 of any subexpressions (i.e. does the right child of the expression contain the variable). This drives what transformations we do in ways that are guaranteed to terminate and not take exponential time. We were tracking property 1 through lets but not property 2, and this meant we were doing unhelpful transformations in some cases. I found a case in the wild where this made a pipeline take > 1 hour to compile (I killed it after an hour). It may have been in an infinite transformation loop, or it might have just been exponential. Not sure. * Remove surplus comma * Fix use of uninitialized value that could cause bad transformation 01 February 2024, 17:47:24 UTC
be6d6c6 Fix bounds_of_nested_lanes (#8039) * Fix bounds_of_nested_lanes bounds_of_nested_lanes assumed that one layer of nested vectorization could be removed at a time. When faced with the expression: min(ramp(x8(a), x8(b), 5), x40(27)) It panicked, because on the left hand side it reduced the bounds to x8(a) ... x8(a) + x8(b) * 4, and on the right hand side it reduced the bounds to 27. It then attempted to take a min of mismatched types. In general we can't assume that binary operators on nested vectors have the same nesting structure on both sides, so I just rewrote it to reduce directly to a scalar. Fixes #8038 01 February 2024, 17:47:24 UTC
6d29ad5 Add missing Python bindings for various recent additions to Func and Stage (#8002) * Add missing Python bindings for various recent additions to Func and Stage We have been sloppy about maintaining these. Also added a bit of testing. * Update PyEnums.cpp 13 December 2023, 17:02:37 UTC
3d5cf40 Inject profiling for function calls to 'halide_copy_to_host' and 'halide_copy_to_device'. (#7913) * Inject profiling for function calls to 'halide_copy_to_host' and 'halide_copy_to_device'. * WIP: I get segfaults. The device_interface pointer is bogus. * Figured it out... * Allow global sync on d3d12. * Cleanly time all buffer copies as well. * Cleanup old comment. * Following Andrews suggestion for suffixing buffer copies in the profiler. * Sort the profiler report lines into three sections: funcs, buffer copy to device, and buffer copy to host. * Inject profiling for function calls to 'halide_copy_to_host' and 'halide_copy_to_device'. * WIP: I get segfaults. The device_interface pointer is bogus. * Figured it out... * Allow global sync on d3d12. * Cleanly time all buffer copies as well. * Cleanup old comment. * Following Andrews suggestion for suffixing buffer copies in the profiler. * Sort the profiler report lines into three sections: funcs, buffer copy to device, and buffer copy to host. * Attempt to fix output parsing. * Fix crash for copy_to_device * halide_device_sync_global(NULL) -> success * Fixed the buffer copy bug. Added a new test that will cause buffer copies in two directions within the compiled pipeline. This will catch this better in the future. Tweaked the profile report section header printing. * Clang-format, my dear friend... 12 December 2023, 17:50:56 UTC
357e646 Do some basic validation of Target Features (#7986) (#7987) * Do some basic validation of Target Features (#7986) * Update Target.cpp * Update Target.cpp * Fixes * Update Target.cpp * Improve error messaging. * format * Update Target.cpp 08 December 2023, 19:17:30 UTC
9c099c2 Teach unrolling to exploit conditions in enclosing ifs (#7969) * Teach unrolling to exploit conditions in enclosing ifs Fixes #7968 * Handle vectorization as well * Remove unused usings * Add missing print 08 December 2023, 17:53:04 UTC
9643518 Add join_strings() call and use it from mattrs() (#7997) * Add join_strings() call and use it from mattrs() This is a super-nit kind of fix, but the fact that we had rerolled a join-strings algo in a half-dozen places made my teeth hurt, so I decided to fix it: - Add join_strings() to Util.h - revise the mattrs() calls to use it instead of the janky mess they used This doesn't move the needle on code size or speed but it is less weird. Probably other places we could/should use this too. (Does C++20 have join/split strings in the std library yet? If not, why not?) * Update Util.h * Update Util.h * clang-tidy 08 December 2023, 17:50:32 UTC
19c1c81 Make wasm +sign-ext and +nontrapping-fptoint the default (#7995) * Make wasm +sign-ext and +nontrapping-fptoint the default These have been supported in ~all wasm runtimes for a while now, and +nontrapping-fptoint in particular can make a big performance difference. We should enable these by default, and add a new backdoor (wasm_mvponly) for code paths that need to use the original wasm Minimum Viable Product spec only. * Update simd_op_check_wasm.cpp 08 December 2023, 16:50:01 UTC
5aa891a Silence useless 'Outer dim vectorization of var' warning in Mullapudi… (#7992) Silence useless 'Outer dim vectorization of var' warning in Mullapudi scheduler 07 December 2023, 18:03:06 UTC
df36139 Fix all "unscheduled update()" warnings in our code (#7991) * Fix all "unscheduled update()" warnings in our code And also fix the Mullapudi scheduler to explicitly touch all update stages. This allows us to mark this warning as an error if we so choose. * fixes * fixes * Update recursive_box_filters.cpp 07 December 2023, 18:02:42 UTC
83febb0 Fix handling of assert statements whose conditions get vectorized (#7989) * Fix handling of assert statements whose conditions get vectorized * Fix test name 07 December 2023, 17:46:27 UTC
d1ecc1f Make narrowing float->int casts on wasm go via wider ints (#7973) Fixes #7972 07 December 2023, 16:06:57 UTC
6e57d6c Add a notebook with a visualization of the aprrox_* functions and their errors (#7974) * Add a notebook with a visualization of the aprrox_* functions and their errors * Fix spelling error 07 December 2023, 16:06:31 UTC
9f6ec17 Silence useless "Insufficient parallelism" autoscheduler warning (#7990) 07 December 2023, 00:59:53 UTC
17b7366 Move canonical version numbers into source, not build system (#7980) (#7981) * Move canonical version numbers into source, not build system (#7980) * Fixes 06 December 2023, 23:03:14 UTC
209ec02 Add appropriate mattrs for arm-32 extensions (#7978) * Add appropriate mattrs for arm-32 extensions Fixes #7976 * Pull clauses out of if 05 December 2023, 22:15:23 UTC
17578a1 Add two new tail strategies for update definitions (#7949) * Add two new tail strategies for update definitions * Stop printing asm * Update expected number of partitions for Partition::Always * Add a comment explaining why the blend safety check is per dimension * Add serialization support for the new tail strategies * trigger buildbots * Add comment --------- Co-authored-by: Steven Johnson <srj@google.com> 05 December 2023, 18:08:08 UTC
dea2cf7 complete_x86_target() should enable F16C and FMA when AVX2 is present (#7971) All known AVX2-enabled architectures definitely have these features. 03 December 2023, 21:34:02 UTC
674e6cc Disallow async nestings that violate read after write dependencies (#7868) * Disallow async nestings that violate read after write dependencies Fixes #7867 * Add test * Add another failure case, and improve error message * Add some more tests * Update test * Add new test to cmakelists * Fix for llvm trunk * Always acquire the folding semaphore, even if unused * Skip async_order test under wasm * trigger buildbots --------- Co-authored-by: Volodymyr Kysenko <vksnk@google.com> Co-authored-by: Steven Johnson <srj@google.com> 01 December 2023, 21:18:20 UTC
4fc2a7d Handle many more intrinsics in Bounds.cpp (#7823) * Handle many more intrinsics in Bounds.cpp This addresses many (but not all) of the `signed integer overflow` issues we're seeing in Google due to https://github.com/halide/Halide/pull/7814 -- a lot of the issues seems to be in code that uses intrinsics that had no handling in value bounds checking, so the bounds were naively large and overflowed. - Most of the intrinsics from FindIntrinsics.h weren't handled; now they all are (most by lowering to other IR, though the halving_add variants were modeled directly because the bitwise ops don't mesh well) - strict_float() is just a pass-through - round() is a best guess (basically, if bounds exist, expand by one as a worst-case) There are definitely others we should handle here... trunc/floor/ceil probably? * Fix round() and strict_float() handling * Update Bounds.cpp * Fixes? * trigger buildbots * Revert saturating_cast handling * Update Bounds.cpp --------- Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com> 01 December 2023, 00:31:48 UTC
3136819 [serialization] Add Halide version and serialization version in serialization format (#7905) * halide version * serialization version * format * Fix Makefile * trigger buildbots --------- Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com> Co-authored-by: Steven Johnson <srj@google.com> 30 November 2023, 17:59:30 UTC
ad5dd20 Update instructions to include generated schedules (#7928) The generated schedule from the auto-scheduler can no longer be copy-n-pasted to the Generater source code. Update the tutorial to show how the generated schedules can be appled and included into Generator. Use case: version control and fine tuning of schedules. Resolves: #7148 See also: #7900 Co-authored-by: Steven Johnson <srj@google.com> 29 November 2023, 17:31:12 UTC
bf5f206 Remove inadvertently added generated file (#7966) 29 November 2023, 17:19:03 UTC
68f2bbd Revise Flatbuffers codegen style (#7964) * Rename the generated Flatbuffer headers The Blaze/Bazel rules for Flatbuffers are inflexible and require this naming pattern :-/ * Also update the flags to flatc * Fix lots of stuff * exclude from clang-format * ignore again 29 November 2023, 17:06:51 UTC
b7468af Attempt to fix nested vectorization gemm performance on new build bot (#7959) * Better (simpler) schedules for nested vectorization gemm * Remove early return * Empty-Commit --------- Co-authored-by: Steven Johnson <srj@google.com> 29 November 2023, 16:39:41 UTC
5175d16 Make the fast inverse test throughput-limited rather than latency-limited (#7958) Co-authored-by: Steven Johnson <srj@google.com> 28 November 2023, 21:59:21 UTC
2b23e07 Return values from stub functions in Deserialization (#7963) Needed to prevent "error: non-void function does not return a value" 28 November 2023, 16:05:52 UTC
9ce5fd6 [WebGPU] Update to latest native headers (#7932) * [WebGPU] Update to latest native headers * Update mini_webgpu.h with latest version from Dawn * Document this process * Remove an argument from wgpuQueueOnSubmittedWorkDone Fixes #7581 * [WebGPU] Note that wgpu is not yet supported * [WebGPU] Add https:// to external links in README * update to commit b5d38fc7dc2a20081312c95e379c4a918df8b7d4 * Update mini_webgpu.h --------- Co-authored-by: Steven Johnson <srj@google.com> 28 November 2023, 14:54:03 UTC
976ea0b [serialization] Serialize stub definitions of external parameters. (#7926) * Serialize stub definitions of external parameters. Add deserialize_parameter methods to allow the user to only deserialize the mapping of external parameters (and remap them to their own user parameters) prior to deserializing the full pipeline definition. * Clang tidy/format pass --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> 28 November 2023, 00:55:41 UTC
8c28a73 Improve code size and compile time for local laplacian app (#7927) Improve code size and compile time for local laplacian and interpolate apps This reduces compile time for the manual local laplacian schedule from 4.9s to 2.2s, and reduces code size from 126k to 82k Most of the reduction comes from avoiding a pointless boundary condition in the output Func. A smaller amount comes from avoiding loop partitioning using RoundUp and Partition::Never. The Partition::Never calls are responsible for a 3% reduction in code size and compile times by themselves. This has basically no effect on runtime. It seems to reduce it very slightly, but it's in the noise. 21 November 2023, 23:27:21 UTC
04c21bf Always call lower_round_to_nearest_ties_to_even on arm32 (#7957) 21 November 2023, 21:56:45 UTC
f5a4e49 Add missing condition to if renesting rule (#7952) * Add missing condition to if renesting rule * Add test * clang-format 21 November 2023, 19:23:44 UTC
ad0f24e Track likely values through lets in loop partitioning (#7930) * Track likely values through lets in loop partitioning Fixes #7929 Improves runtime of lens_blur app by ~20% * Add uncaptured likely tags to selects in boundary condition helpers Now that we look through lets, we end up in more situations where both sides have a captured likely. * Better comments 16 November 2023, 00:49:35 UTC
0f65435 More targeted fix for gather instructions being slow on intel processors (#7945) See https://github.com/llvm/llvm-project/issues/70259 14 November 2023, 19:48:34 UTC
f0cdd50 Delete unused function (#7925) 14 November 2023, 18:23:14 UTC
f25af7f Remove the deprecated API `llvm::Type::getInt8PtrTy` usage. (#7937) This API is removed in LLVM trunk now https://github.com/llvm/llvm-project/commit/7b9d73c2f90c0ed8497339a16fc39785349d9610. 09 November 2023, 05:27:20 UTC
3b4dc33 Make sure all Halide arithmetic scalar types can be named from the Generator interface. (#7934) * Make sure all Halide arithmetic scalar types can be named from the Generator interface. Specifically adding 64-bit signed and unsigned integers and making sure float16 and bfloat16 are fully supported and documented. Add a simple test for all the type names. (Don't use float16 and bfloat16 in the arithmetic as they do not compile with the C++ backend. The name mapping should still be tested but the types passed do not seem to be checked as the values are not used.) 07 November 2023, 21:23:31 UTC
256c2f2 Add missing serialization of Dim::partition_policy (#7935) add missing serialization of Dim::partition_policy 07 November 2023, 17:57:21 UTC
e5bf7ab Add special build for testing serialization via a serialization roundtrip in JIT compilation and fix serialization leaks (#7763) * add back JIT testing, enclosed in #ifdef blocks * fix typo * nits * WITH_SERIALIZATION_JIT->WITH_SERIALIZATION_JIT_ROUNDTRIP_TESTING * fix self-reference leaks: now uses weak function ptr in reverse function mappings * Move clang-tidy checks back to Linux Recent changes in the GHA runners for macOS don't play well with clang-tidy; rather than sink any more time into debugging it, I'm going to revert the relevant parts of #7746 so that it runs on the less-finicky Linux runners instead. * bogus * Update Generator.cpp * Update Generator.cpp * call copy_to_host before serializing buffers * throw an error if we serialize on-device buffer * Skip specialize_to_gpu * Update Pipeline.cpp * Skip two more tests * use serialize to memory during jit testing * makefile update * makefile fix * skip the tutorial if flatc is not there * fix * fix signature * fix makefile * trigger buildbot --------- Co-authored-by: Steven Johnson <srj@google.com> 06 November 2023, 23:36:56 UTC
e5ee753 Remove use of dynamic_cast. (#7931) Remove use of dynamic_cast to preserve compiling the Halide compiler without RTTI. 03 November 2023, 00:27:03 UTC
1865101 Loop Partitioning Policy through Stage::partition(VarOrRVar, LoopPartitionPolicy) (#7914) * Loop Partitioning Policy through Stage::partition(VarOrRVar, LoopPartitionPolicy) * Renamed LoopPartitionPolicy to Partition. Added tests in boundary_conditions to verify correctness of the code with and without loop partitioning. Added tests that validates that disabling loop partitioning works. * Include error-test for when partitioning is always requested, but none was performed. 31 October 2023, 17:38:55 UTC
0134c40 Improve the error message if you store_at without a compute_at (#7923) * Improve an error message * Clean up * Update messages 30 October 2023, 21:39:17 UTC
97573c6 Scheduling directive to hoist the storage of the function (#7915) * Minimal hoist_storage plumbing * HoistedStorage placeholder IR node * Basic hoist_storage test * Fully plumb through the HoistedStorage node * IRPrinter for HoistedStorage * Insert hoisted storage at the correct loop level * Progress * Formatted * Move out common code for creating Allocate node * Format * Emit Allocate at the HoistedStorage site * Collect all dependant vars * Basic test working * Progress * Substitute lets into allocation extents instead of lifting stuff * Infer bounds for the extends dependant on loop variables * Update tests * Remove old code * Remove old code * Better tests * More tests * Validate schedules with hoist_storage * Error test * Fix stupid mistake * More tests * Remove debug prints * Better errors * Add missing handler for inlined functions * Format * Comments * Format * Add some missing visit handlers * New line * Fix comment * Luckily we only have two build systems * Adds hoist_storage_root * Comment for IR node * Serialization support for HoistedStorage * Handle hoist_storage fo tuples * Handle multiple realize nodes * Move assert up * Better error message * Better loop bounds * Format * Updated error message * Happy clang-tidy happy me * An error message when compute is inlined, but store is not inlined * Only mutate lets which are needed * Update apps to use hoist_storage Some very minor performance gains, but mostly in the noise. Also switched the apps makefiles to emit stmt html by default instead of stmt, to take advantage of the new and improved stmt html. * Switch to stack of hoisted storages * Limit scope of lets for expansion * Break early * Skip substitute_in_all_lets * Re-use expanded min/extents * WebAssembly JIT does not support custom allocators * Change debug level to get more info about segfault * More debugging prints * Let's try aligned malloc * Revert "Change debug level to get more info about segfault" This reverts commit a5a689be8c6ad351674f3ced3bbf542335f91d75. * Revert "More debugging prints" This reverts commit bb6b8c1313cbdb9f355df20fd203ee02d485042e. --------- Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com> 27 October 2023, 21:21:26 UTC
ed357c2 Fix bug mentioned by @antonysigma. (#7916) 27 October 2023, 17:23:42 UTC
cf01e97 Turn off SLP vectorization for avx512 only (#7918) Fixes #7917 27 October 2023, 17:22:31 UTC
fffb8bd Fix read-after-write hazard analysis in storage folding (#7910) Explicitly mark which loops get loop-carry-dependencies inserted by sliding window to assist storage folding. Storage folding needs to know about this so it doesn't try to fold in a way that invalidates these read-after-write dependencies. It currently tries to prove the absence of hazards with box_contains(box_provided, box_required), but this is sometimes incorrect because box_provided could be conservatively large, and the code it analyses might not actually provide (store to) all the required (loaded from) values. It's simpler for sliding window to just tell storage folding when it inserts loop-carry-dependencies, and this is most simply done directly in the IR itself. Fixes #7909 24 October 2023, 17:23:49 UTC
d023065 Hotfix reinterpret HTML (#7912) Hotfix reinterpret 22 October 2023, 19:20:47 UTC
739053d Check returned result in the test (#7911) * Check returned result of Callable * Format 22 October 2023, 19:11:00 UTC
872264c Static analysis (MSVC) fixes for device_buffer_utils.h (#7904) * Static analysis (MSVC) fixes for device_buffer_utils.h * clang-format happiness * signed integer cast 20 October 2023, 21:33:13 UTC
2918854 Highlight groups for the HTML Stmt file and tooltips to reveal types. (#7887) * Highlight groups for the HTML Stmt file and tooltips to reveal types. * Cleaned up JS using eslint. * Remove commented code. 20 October 2023, 17:37:38 UTC
bd1d4df Stop interleaver from expanding the scope of letstmts (#7908) In the following code: let a = b in X let a = c in Y If Stmt X successfully had stores interleaved, it was re-nesting it like so: let a = b in X let a = c in Y This introduces a shadowed variable 'a', which is illegal at this stage of lowering. Fixes #7906 Also some drive-by fixes to earlier tests that had debugging code left in. 20 October 2023, 17:21:50 UTC
eb66c06 Don't lift loop vars outside of their loops in sliding window (#7896) Sliding window, when operating in the mode that shifts the consumer's loop min backwards a few iterations to cover the warmup, was capable of inappropriately lifting for loop vars inside that loop but outside the produce node of the slid Func. Fixes #7891 18 October 2023, 21:45:47 UTC
5c97c3c Assignment is not associative (#7894) * Assignment is not associative * Fix internal tests 17 October 2023, 16:17:58 UTC
f9b90cb Disable warning for mismatched new/delete (#7897) 17 October 2023, 16:17:20 UTC
db207b9 Mutating if branches in isolation can break reachability analysis (#7895) Fixes #7892 17 October 2023, 16:16:33 UTC
667d6ed Check for overflow in Type constructor (#7889) * Check for overflow in Type constructor * Don't try to construct illegal types 16 October 2023, 17:12:50 UTC
7e35494 Generate simpler LLVM IR for shuffles that recursively become broadcasts (#7902) * Generate simpler LLVM IR for shuffles that recursively become broadcasts * Don't re-codegen arg 14 October 2023, 11:29:33 UTC
51ad730 Attempted fixed datalayouts for llvm trunk (#7898) * Attempted fixed datalayouts for llvm trunk * Missed a few i128:128s 13 October 2023, 21:32:01 UTC
a3911bb Explicitly name the allocgroups on GPU schedules "allocgroup__..." (#7883) * 50cents readibility improvement to allocgroups on GPU schedules. * Improve allocation group prefix: only if the alloc group cluster contains more than 1 allocation prepend the prefix. 12 October 2023, 18:38:44 UTC
509140a Implement elementwise complex value division (#7848) Implement the logic: (a + bj) / (c + dj) as an inline operator/() function. Use case: direct FFT method to solve linear least square problem, namely: ```math \begin{align} f(x) &=\Vert F^T D F x - b \Vert_2^2 \\ \arg \min_{x \in \mathbb{R}} f(x) &= F^T \left[ D^{-1} F b \right] \end{align} ``` where `D` is a diagonal complex-valued matrix representing image blur kernel, `b` is an ordinary image in vectorized form. 09 October 2023, 19:08:06 UTC
9293655 Update README.md to include RISCV in llvm build instructions (#7878) 09 October 2023, 19:07:28 UTC
b607129 HTML Stmt IR with conceptual code and device code. (#7843) * WIP: Conceptual Stmt IR and HTML cleanup. * WIP: Lots of progress on Stmt HTML. Cleanup almost complete. * Support scrolling to device code. * Resizing works decent enough for me. Fix cost-model allocate block costs. * Print better vector_reduce calls. * Optionally enable VizTree through an env variable. * Fix the device code tab for non-PTX. * StmtHTML: Tabs renamed to panes. Fix linter warnings. Cut trailing 0 byte from device code buffers. * Fix clang-format. * Fixed typos and copy paste error. * Fix HL_EXTRA_OUTPUTS behaviour to respect the defaults. * Nuked VizTree * Finalize StmtToViz nuke and rename StmtToHTML. * Improved HTML correctness by running output through an online validator. Quite some bugs fixed. * Cost model visualization improvement. Fix button not being allowed in the checkbox/label combination. * Fix collapsing being triggered by jump-to-xxx buttons. * How did this work? * Process Andrew's feedback. * Process Andrew's feedback. * Process Andrew's feedback, part 3. * Improve color palette. Few minor improvements. * Clang-format... 06 October 2023, 19:40:35 UTC
24a64f8 Update onnx app to work with newer versions of protobuf (#7879) and to work on mac 06 October 2023, 18:40:46 UTC
120e5fd Consider all dimensions before deciding to slide over a new dimension (#7875) * Don't deduce unreachability from predicated out of bounds stores Fixes #7873 * Consider all dimensions before deciding to slide over a new dimension Even ones we've already slid over. The previous version of this code could try to slide over a loop where multiple dimensions depend on the loop var, because it ignored dimensions that had already been slid over. Moving a check resolves the issue. Fixes #7872 05 October 2023, 23:52:58 UTC
51ab364 Validate for types when fusing Vars with RVars (#7877) * Fix for llvm trunk * Validate for types when fusing Vars with RVars Fixes #7871 * Commit test 05 October 2023, 17:42:23 UTC
39f12a7 Fix for llvm trunk (#7876) 05 October 2023, 16:15:09 UTC
c31e8f7 Don't deduce unreachability from predicated out of bounds stores (#7874) Fixes #7873 04 October 2023, 18:12:09 UTC
a24071c [serialization] Add support to serialize to memory, and a basic serialization tutorial (#7760) * Add in-memory buffer serialize/deserialize support. * Add basic serialization tutorial * Clang format pass * Update doc strings to use Doxygen formatted args * Clear out data buffer during serialization * Update serialization tutorial to use simple blur example with ImageParam * Make parameter map optional for serialize #7849 Add error messages to deserializer for missing params Update tutorial * Clang format pass --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> Co-authored-by: Steven Johnson <srj@google.com> 28 September 2023, 21:30:44 UTC
76ac233 Handle unreachable code in bounds inference (#7866) * Handle unreachable code in bounds inference * Avoid ambiguous constructor * IRVisitor -> IRGraphVisitor * Add success print 27 September 2023, 16:42:07 UTC
9f96b25 Prevent use of uninitialized scalar Parameters in JIT code (#7847, partial) (#7853) * Prevent use of uninitialized scalar Parameters in JIT code (#7847, partial) * Fix broken tests * Update Parameter.h * Update func_clone.cpp * Fix Generators too * Fixes * Update InferArguments.cpp * Fixes * pacify clang-tidy * fixes 27 September 2023, 01:55:12 UTC
3926b02 Respect input buffer constraints in root-level bounds inference exprs (#7865) * Respect input buffer constraints in bounds inference lets Fixes #7761 * Add test 26 September 2023, 01:58:20 UTC
05d5efa Handle nested vectorization in store predicates (#7864) Fix #7851 In one place in PartitionLoops and in another place in the simplifier we were neglecting to consider nested vectorization. I added the fuzzer output as a new test, because I have no idea how I'd generate this error with human-readable code. It stems from an interaction of several tail strategies. 25 September 2023, 19:14:25 UTC
26619d2 [Hexagon] - Fix 8-bit unsigned saturating downcasts for HVX (Fixes #7806) (#7825) * Dump the IR more frequently in HexagonOptimize.cpp * Fix 8bit unsigned saturating downcasts for HVX We do not have a way of reliably lowering the following expression to LLVM bitcode for HVX. u8_sat(uint16x) where uint16x is a vector (preferably a HVX double vector) with element type uint16. Since there is no native HVX instruction to do this, this patch introduces two helper functions in hvx_128.ll to perform this operation. One function interleaves its input (trunc_satub.vuh) and the other does not (pack_satub.vuh) This patch also removes declaration of some intrinsics not use any longer in hvx_128.ll * Make IR dump messages in HexagonOptimize.cpp consistent with those in CodeGen_Hexagon.cpp * fix clang-format complaints --------- Co-authored-by: Steven Johnson <srj@google.com> 18 September 2023, 19:48:34 UTC
68a0341 [api] Promote Internal::Parameter to Halide::Parameter (#7829) * Promote Internal::Parameter to Halide::Parameter (to support Serialization API refactoring) * Make raw_buffer(), scalar_address(), and scalar_raw_value() methods protected. Make Pipeline and Serializer protected friend classes. * Add Parameter public interface to python bindings. Remove old stub internal interface from PyParam. * Remove blank line at start of function --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> Co-authored-by: Steven Johnson <srj@google.com> 18 September 2023, 17:09:11 UTC
ab4067f Fixes for top-of-tree Halide (#7850) * Fixes for top-of-tree Halide * I am a bonehead 15 September 2023, 19:45:10 UTC
d7760f5 [tutorials] Add tutorial on JIT compile/execute performance (#7838) * Add tutorial on JIT compile/execute performance * Addressing comments from review. Fix punctuation and comment nits. Add timing estimates as comments. Add std::function example. Enable advanced scheduling directives. * Addressing comments from review. Added cases that match real usage patterns: 1. Defining and compiling the whole pipeline every time you want to run it (i.e. in the benchmarking loop) 2. Defining the pipeline outside the benchmarking loop, and realizing it repeatedly. 3. (optional) Same as 2), but calling compile_jit() outside the loop, saying what it does, and saying why the time isn't actually different to case 2 (benchmark() runs multiple times and takes a min, and realize only compiiles on the first run) 4. Compiling to a callable outside the benchmarking loop and showing that it has lower overhead than case 3 (if indeed it does. If not we may need to change the example so that it does, e.g. by adding a real input buffer.) * Addressing comments from review for style nits, and typos in comments. --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> Co-authored-by: Steven Johnson <srj@google.com> 15 September 2023, 01:05:12 UTC
8797287 Update arguments in driver.cpp to match what correctness/simd_op_check has (#7842) 12 September 2023, 20:35:23 UTC
6569a83 Zen4 support (#7840) * Enable emission of float16/32 casts on x86 Fixes #7836 Fixes #4166 * Add support for zen4 * Add avx512_Zen4 target flag It's a superset of cannon lake, and a subset of sapphire rapids * Fix runtime detection, sapphire rapids CPUID bits * Fix comment * Don't catch bfloat casts * Fix Zen4 model number * Use llvm BFloat type for bfloat intrinsics * Give up on native bfloat16 conversion for now * Don't use llvm's bfloat type at all * Add missing enum * Fix constant in comment * clang-format 11 September 2023, 17:40:29 UTC
b704abd Iterate over lets in the correct order in VectorizeLoops (#7830) * Iterate over lets in correct order * Comments * Comments * Comments 06 September 2023, 21:32:44 UTC
836879e Enable emission of float16/32 casts on x86 (#7837) * Enable emission of float16/32 casts on x86 Fixes #7836 Fixes #4166 * Fix comment * Don't catch bfloat casts * Fix missing word in comment 06 September 2023, 21:29:27 UTC
02865e2 Add a check that PredicateLoads must be used in the outermost split of a dimension (#7788) * add a check that PredicateLoads must be used in the outermost split of a dimension * newline * use the repro example * fix * avoid check for every other tail strategy * update error message to point out what's not allowed --------- Co-authored-by: Steven Johnson <srj@google.com> 05 September 2023, 20:28:11 UTC
8188b42 Avoid generating name collisions in CSE (#7821) * Avoid generating name collisions in CSE Alternative to #7801 (See the discussion there) Fixes #4124 * Add missing test * Minor cleanup * clang-format 01 September 2023, 17:38:19 UTC
ddfb1dc Don't return an undefined Stmt() from IfThenElse visitor (#7816) Fixes #7815 01 September 2023, 17:37:50 UTC
24d846c Remove dead `auto-schedule` label in CMake (#7818) These were replaced by more granular labels. Also, drive-by fix to comment that needed plurals. 30 August 2023, 23:54:48 UTC
afc61b2 Update 'Check CMake file lists' action (#7809) * Update 'Check CMake file lists' action Several subcategories were missing -- let's add them and see if they should be there or not * bogus change * Add missing comments * Revert "bogus change" This reverts commit 80454b1313e1c06b5432d15287fa1f51185f70b6. 30 August 2023, 23:54:09 UTC
3a1dffe Move clang-tidy checks back to Linux (#7817) * Move clang-tidy checks back to Linux Recent changes in the GHA runners for macOS don't play well with clang-tidy; rather than sink any more time into debugging it, I'm going to revert the relevant parts of #7746 so that it runs on the less-finicky Linux runners instead. * bogus * Update Generator.cpp * Update Generator.cpp 29 August 2023, 16:23:44 UTC
fa136cb Ensure that multitarget AOT builds have consistent random sequence (#7717) * Fix CMake test for generator_aot_multitarget * Ensure that multitarget AOT builds have consistent random numbers If a Generator uses random_float() (or the int or uint versions), and is used in a multitarget build, we weren't resetting the counters for random generation between each subtarget... meaning that each subtarget would get a different random sequence, leading to some ery hard-to-debug test failures when running on different hardware variants. This PR ensures that the relevant counters are all reset before each subtarget is generated, so that each should see the same sequence of random number generation. * Update CMakeLists.txt * Update multitarget_aottest.cpp * Combine float/uint counters 29 August 2023, 16:21:59 UTC
fe9f0b7 [serialization] Add serialization support to generator interface (#7792) * Add serialization support to Generator interface * Clang format pass * Make target required when emitting a serialized pipeline (since schedule may be target dependent). Apply auto-scheduler before serialization so that schedules can be serialized. * Fix enum ordering for hlpipe. Fix hlpipe comments. Add missing hlpipe enum to pyenums. * Remove unused Serialization build_mode * Fix formatting * Remove unused serializable flag. Remove redundant cpp_stub check. Fix comments. * Safeguard emit_hlpipe calls with #ifdef WITH_SERIALIZATION --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> Co-authored-by: Steven Johnson <srj@google.com> 28 August 2023, 18:13:53 UTC
79d2be3 Update clang-tidy action to stop breaking (#7808) * Switch clang-tidy action from macos-13 to macos-latest `macos-latest` is actually macos-12 (macos13 is considered "beta" on the GHA runners). Hopefully this will fix the recent install snafus that are breaking clang-tidy. * Bogus change to trigger check * Update presubmit.yml * Update presubmit.yml * Update presubmit.yml * Revert "Bogus change to trigger check" This reverts commit a70f9ed8e6032d4b7799ff0cf6c009a7d2f92b3a. * Update presubmit.yml 28 August 2023, 17:21:38 UTC
8ac1e1c Add jump-buttons to get fro Stmt directly to Assembly (#7793) Co-authored-by: Steven Johnson <srj@google.com> 28 August 2023, 16:46:45 UTC
69c75b3 Update WebGPU to latest Emscripten/Dawn API (#7804) * Update WebGPU to latest Emscripten/Dawn API - Updated mini_webgpu.h to be in sync with Dawn as of commit ded6610f45a8826db37b52d73121a66b74d8aa61 - Updated the use of SetDeviceLost callbacks to be in the DeviceDescriptor instead of a separate call - Updated a couple of fields that got renamed - Update webgpu.cpp and gpu_context.h to always use wgpuCreateInstance() and wgpuInstanceRelease(), since the Dawn node bindings now support & require them * clang-tidy 24 August 2023, 23:12:19 UTC
84faa68 [wasm] Enable PIC for WebAssembly on LLVM v18.x (#7803) * Enable PIC code generation for WebAssembly for LLVM >18. Enable +mutable-globals to support dynamic linking * Fix LLVM v18 interface changes for writeArchive() Add RelLookupTableConverterPass for PIC (in LLVM v18) * Resolve conflict for writeArchive interface changes. * Clang format pass --------- Co-authored-by: Derek Gerstmann <dgerstmann@adobe.com> 24 August 2023, 22:22:22 UTC
84af2cd Add support to the makefile for serialization (#7762) * Add support to the makefile for serialization * Fix deps * Fix for no flatc, and for homebrew --------- Co-authored-by: Steven Johnson <srj@google.com> 24 August 2023, 22:18:09 UTC
f56b9ad Remove some unused includes (#7799) 24 August 2023, 21:48:26 UTC
678ea32 [ARM] support new udot/sdot patterns (#7800) 24 August 2023, 19:49:57 UTC
88c75ec [ARM] Distribute shifts as muls (#7790) * [ARM] distribute shifts as muls This reverts commit eba8f325edfaaa7b11c52a19435200f6b28e539a. --------- Co-authored-by: Steven Johnson <srj@google.com> 24 August 2023, 17:31:26 UTC
e8df5cf Fix for top-of-tree LLVM (#7798) 23 August 2023, 18:05:37 UTC
acc9413 Don't inject undef() in the simplifier (#7791) We shouldn't be using undef() in the simplifier. This replaces a load with a constant false predicate with a zero instead. I also added a guard around some dubious logic about out of bounds loads. out of bounds loads may be reachable if they have a false predicate, so I changed this simplification to only trigger if the load is unpredicated. 22 August 2023, 15:49:44 UTC
6efecbe slice IRMatcher should only match on slices (#7772) * slice IRMatcher should only match on slices Fixes #7768 * Add test 22 August 2023, 15:49:29 UTC
back to top