https://github.com/halide/Halide

sort by:
Revision Author Date Message Commit Date
2601d6a Update Makefile 20 April 2021, 23:02:08 UTC
13580ab Update vector_reductions.cpp 20 April 2021, 23:01:14 UTC
dfeac9f Update vector_reductions.cpp 20 April 2021, 23:00:54 UTC
a4d9f11 Update vector_reductions.cpp 20 April 2021, 23:00:24 UTC
75de725 Update Makefile 20 April 2021, 22:58:10 UTC
c521c7f Update vector_reductions.cpp 20 April 2021, 22:56:21 UTC
6250585 Temporarily disable hanging test (#5925) * Temporarily disable hanging test LLVM13 is causing vector_reductions to hang (https://reviews.llvm.org/D100099 appears to be the injection point). Disabling this test to unbreak the buildbots. * Update vector_reductions.cpp 20 April 2021, 21:23:26 UTC
c1de142 [adams2019] Add caching to autoscheduler (#5697) * add feature caching and block caching to adams2019 autoscheduler * added caching verification for feautures * add caching docstrings 20 April 2021, 21:21:33 UTC
ac23987 Speed up simd_op_check by only compiling one pipeline per op (#5918) * Speed up simd_op_check and compute_with * Dense vector loads can be written many different ways. 20 April 2021, 15:02:14 UTC
6963673 Add Target::ARMv81a and improve shift instruction selection (#5917) * Add Target::ARMv81a and improve shift instruction selection. * Remove merge mistake. * Don't use ARM intrinsic on arm32, it seems to be missing sometimes. 20 April 2021, 00:24:06 UTC
493dbd4 Comment out specialiations for f64x2.convert_low_i32x4_s/u (#5914) LLVM removed the primitives we need (so our code can't be used), but it also doesn't seem to be generating the expected instructions directly (as claimed). Commenting out to un-break tests; issue has been reported to wasm/llvm team. 17 April 2021, 17:46:20 UTC
9cdb4aa Simplify and improve cuda_mat_mul schedule (#5909) * Simplify and improve cuda_mat_mul schedule 16 April 2021, 22:23:30 UTC
a41cce7 Basic support of predicated loads/stores in C++ backend (#5908) * Basic support of predicated load/stores in C++ backend * Fix formatting and maybe build * Fix * trigger buildbots Co-authored-by: Steven Johnson <srj@google.com> 16 April 2021, 20:47:16 UTC
3531167 Drop LLVM10 support from master (#5740) * Drop LLVM10 support from master Update build files to require LLVM11+ in master branch. (Since we only regularly test master with 12 and 13 this is conservative.) Remove all code that is specialized for LLVM < 11.0. * Update CodeGen_ARM.cpp * Update CodeGen_LLVM.cpp 15 April 2021, 18:34:37 UTC
780ebd2 Add an error for realize with a different number of outputs than defined for pipeline. (#5906) * Add an error for calling realize with a different number of outputs than the pipeline was compiled with. * Forgot to add test. * A readability scarifice to the clang deity. * Add CMake file. * Minor change to error text. * Fix logic to handle Funcs returning Tuples. * Formatting. 15 April 2021, 16:19:21 UTC
da02c0d Add missing "struct" before halide_type_t. (#5904) This allows it to compile as pure C instead of C++. Co-authored-by: Jiawen Chen <jiawen@adobe.com> 14 April 2021, 22:17:01 UTC
ccde965 Enable some more wasm simd tests that are now working with top-of-tree LLVM. (#5903) 14 April 2021, 21:32:29 UTC
3ac277b Rewrite double and triple narrowing on ARM (#5896) * Rewrite double and triple narrowing on ARM. * clang-format. Co-authored-by: Steven Johnson <srj@google.com> 14 April 2021, 17:23:02 UTC
ce9b324 Fix UB in halide_buffer_t::size_in_bytes (#5898) Just a port of https://github.com/halide/Halide/pull/4389 to the equivalent methods in HalideRuntime.h, since offset-from-a-null-pointer is UB in C++. 14 April 2021, 16:18:45 UTC
1ff3e3f CMake build: Add more user control (#5859) * packaging/CMakeLists.txt: Allow users to override RPATH (i.e. for packaging Halide) * CMakeLists.txt: Allow users to override the C++ standard 12 April 2021, 20:50:02 UTC
9cc17b4 Add fuzzer to bounds_of_expr_in_scope + fix discovered overflow bugs (#5895) * add interval bounds fuzzer * correct overflow checks in bounds inference * catch uint32->int32 overflow in simplifier and revert bounds change 12 April 2021, 17:23:57 UTC
687c7d8 Use guarded versions of vars if they exist in bounds inference (#5890) 09 April 2021, 05:04:11 UTC
cf40bc8 Improve wasm_threads documentation (#5843) * Improve wasm_threads documentation * Update HalideRuntime.h 08 April 2021, 17:14:26 UTC
71b895e Fix existing presets (remove -O2 stuff, typos) 07 April 2021, 22:51:53 UTC
bd16b37 Add shebang line to autotune_loop.sh 07 April 2021, 22:51:53 UTC
efea7a2 Remove WITH_APPS from README_cmake.md 07 April 2021, 22:51:53 UTC
69011bc Fix spelling mistakes and Doxygen references 07 April 2021, 22:51:53 UTC
b9cd9f2 Require LLD_DIR in zip/package.bat (#5887) 07 April 2021, 22:37:12 UTC
79fd0c9 [cmake] Fix and reorganize warnings for building Halide (#5885) 07 April 2021, 19:12:23 UTC
7473402 error_run_with_large_stack_throws should compile without exceptions (#5884) (1) Some downstream environments compile C++ without exceptions by default; this won't compile on those. (2) We should check that assert-fail also errors out as expected. 07 April 2021, 02:23:25 UTC
ea76214 Improve ClangCL support by disabling, fixing warnings (#5876) Co-authored-by: Mario Emmenlauer <memmenlauer@biodataanalysis.de> 07 April 2021, 00:53:11 UTC
85816e4 Add explicit cast to remove ambiguous operator== (Fixes #5329) (#5879) 06 April 2021, 20:56:47 UTC
e877e5b Fix natural_vector_size for wasm 64-bit types (#5880) In the original spec, wasm-simd128 didn't have int64 or float64; the final spec adds these types, so this bit of code is outdated and incorrect. 06 April 2021, 16:27:09 UTC
7825d48 Enable i64x2 comparisons in simd_op_check (#5881) * Enable i64x2 comparisons in simd_op_check * More drive-by fixes 06 April 2021, 16:25:21 UTC
9944dda Fix typos in tutorial lesson_08 (#5875) 06 April 2021, 16:21:21 UTC
525e246 Try to vectorize inner statement of else branch of likely (#5874) * Try to vectorize inner statement of scalarize * Extend test to check for other scalarized loop * Add more details to the comment * make format * Remove note 03 April 2021, 01:29:55 UTC
59a04e4 Use fibers to guarantee stack size on Windows (#5873) * Use fibers for lowering. * Move fibers to Util * Wrap compile_func call in call_with_stack_requirement * Rename call_with_stack_requirement -> run_with_large_stack * Appease clang_format * Add exception handling to run_with_large_stack * clang-format * Fix 32-bit? * Fix error wording for Makefile * Improve naming in run_with_large_stack 02 April 2021, 17:53:49 UTC
42092e3 Fix an issue in Halide's float16 compilation support. Add tests. (#5872) In EmulateFloat16Math.cpp, conversion from 32-bit float to 16-bit float could produce a NaN value when and infinity is correct. This is because for numbers larger than the exact infinity value, the mantissa could be non zero. Add tests to cover this case, and float16 infinities in general. Couple small style/comment cleanups. 01 April 2021, 19:13:01 UTC
cb78a6b Don't strip strict_float() from lets (#5871) * Don't strip strict_float() from lets Bug injected in #5856: the change in Simplify_Let.cpp was inadvertently stripping `strict_float()` calls that wrapped the RHS of a Let-expr, which can change results nontrivially in some cases. I don't think a new test for this fix is practical -- it would be a little fragile, as it would rely on the specifics of simplification that could change over time. As a drive-by, also added an explicit rule to Simplify_Call to ensure that strict_float(strict_float(x)) -> strict_float(x) in *all* cases. (The existing rule didn't do this in all cases.) 31 March 2021, 22:30:55 UTC
896b260 Add some not rules. (#5870) 31 March 2021, 15:08:33 UTC
3e59294 Add TailStrategy::Predicate (#5856) * Add TailStrategy::Predicate * Add some tests for TailStrategy::Predicate. * Fix missing override. * Fix comment. * Tweak target behavior. * Remove all heuristics * clang-format. * clang-tidy. * TailStrategy::GuardWithIf isn't always faster than scalar code :( * Use TailStrategy::Predicate in the predicated store/load test. * What is this test * Fix test bug. * Revert x86 behavior. * Move predicate to Internal namespace. * Recursively strip tags. * trigger buildbots * strip_tags -> unwrap_tags * Fix comment. Co-authored-by: Steven Johnson <srj@google.com> 30 March 2021, 23:26:22 UTC
7bbe2fd Add wasm support for int32->f64 and f32->f64 simd ops (#5863) * Add wasm support for int32->f64 and f32->f64 simd ops At top-of-tree LLVM, the wasm backend never seems to emit the vector version of these ops; pattern-match to target them specifically. 30 March 2021, 23:00:23 UTC
e7eec5c Add support for wasm dot-product instruction (#5861) * Add support for wasm dot-product instruction 30 March 2021, 22:45:32 UTC
f2143bf Add a way to set a GeneratorInput's type in code (#5868) * Add a way to set a GeneratorInput's type in code Currently, if you want to vary the type of a Generator's inputs or outputs, you have to specify the types in the makefile. This can be awkward for things with complex logic. This PR proposes adding a way to do this: a new `set_type()` method which can only be called from the rarely-used Generator::configure() method. It only allows setting the type for an input or output that has no type specified. I'm not 100% sure if this is a good idea, but for certain rare corner cases, it may be quite handy. (Note that extending this to allow specifying dimensions and/or array size in the same way might be handy, but is omitted from this PR.) * Update Generator.h * Also add set_dimensions, set_array_size 30 March 2021, 19:29:32 UTC
2dd7a6b Add support for AVX-512 VNNI saturating dot products (#5807) * Add support for AVX-512 VNNI saturating dot products This commit adds support to Intel VNNI saturating dot product instructions vpdpbuds and vpdpwssd This was accomplished by adding a new VectorReduce operation to perform the saturating_add and exposing a new inline reduction saturaring_sum. Users can then write RDom r(0, 4); f(x) = saturating_sum(i32(0), i16(i8(g(x + r)) * u8(h(x + r)))) bool override_associativity_test = true; int vector_width = 4; Var xo, xi; f.update() .split(x, xo, xi, vector_width) .atomic(override_associativity_test) .vectorize(r) .vectorize(xi); To lower the expression into a call to vpdpbuds. Note that override_associativity_test is set to true or halide will fail to prove the associativity of the saturating_add operation Add support for VectorReduce::SaturatingAdd in CodeGen_LLVM Code is correctly generated when no intrinsic is available to perform a saturating dot product. Add vpdpbusds,vpdpwssd tests to simd_op_check Test if the saturating dot product instructions are being generated for AVX512_SapphireRapids targets * Improve code according to report from clang-tidy * Make init_val a const ref since it only used that way inside saturating_sum * clang-format * Revert removal of clang-format tag in CodeGen_X86.cpp * Add SaturatingAdd case Monotonic VectorReduce visit * Bail out in Bounds when dealing with a SaturatingAdd VectorReduce * Move saturating_mul to Simplify_Internal.h so it can be used in Simplify_Exprs.cpp * Remove init_val from the saturating_sum inline reduction * Unconditionally override the associativity test in the simd_op_check tests * Remove annonymous namespace from saturating_mul utility Co-authored-by: Thales Sabino <thales@codeplay.com> 30 March 2021, 19:00:21 UTC
5b238e7 Use a varying seed for random test data in simd_op_check (#5864) * Use a varying seed for random test data in simd_op_check We currently use `123` as a hardcoded seed, so we may sometimes be getting lucky with test patterns that happen to match scalar and vector. Let's vary the seed in the same way we do for (eg) fuzz_simplify to slightly broaden test coverage. 30 March 2021, 17:18:45 UTC
602cbac [NFC] LLVM trunk is now called main (#5866) Reference - https://foundation.llvm.org/docs/branch-rename/ 30 March 2021, 16:56:13 UTC
b7bc8e2 Add support for wasm-simd saturating-narrow ops. (#5854) * Add support for wasm-simd saturating-narrow ops. 30 March 2021, 16:48:14 UTC
e0461e9 Add support for i16x8.q15mulr_sat_s in wasm (#5853) * Add support for i16x8.q15mulr_sat_s in wasm Also, some drive-by clarifications to other wasm-simd instructions in simd_op_check -- some of the yet-to-be-implemented ones are of dubious use in Halide and may not be worth implementing. 30 March 2021, 03:01:20 UTC
07f880e Add support for pairwise_widening_add in wasm (#5850) * Add support for widening_mul in wasm 29 March 2021, 23:37:23 UTC
e8085bd Add simplifier rules helpful for specialization (#5836) * Add simplifier rules helpful for specialization. * clang-format * Revert sketchy select simplification. * Add different rules. 29 March 2021, 17:09:15 UTC
4f152f3 Add align_extent(), to align extent but not min (#5829) * Allow align_bounds() to align extent but not min This can be handy when you have an intermediate Func that is being tiled inside an outer Func and you want to ensure that it fits an exact multiple of tiles. * Add separate align_extent() method 27 March 2021, 23:16:45 UTC
bc42da9 Add support for widening_mul in wasm (#5849) * Add support for widening_mul in wasm 25 March 2021, 16:40:28 UTC
9a8ddf7 Remove buggy deinterleave misfeature (#5844) 24 March 2021, 18:52:17 UTC
92dfc82 Enable sliding window in registers (#5815) * Sliding in registers * Fix some failure cases. * Handle if_then_else in loop partitioning. * Add rebase_loops_to_zero pass. * Use select instead of if_then_else. * Add select comparison simplifications. * Don't rewrite lets * Rebase producer loops of register slides to 0, and don't overwrite realization bounds. * Add rules for ramp < broadcast * Put the likely on the old value instead of the new value. * New rules for comparing ramps and broadcasts * Switch back to if_then_else * Update comments. * Don't try to fold dimensions with a constant min or max. * More comments. * Make the vectorized register sliding window test tighter. * Remove debug helper. * Fix tests broken by loop rebasing. * Move rebasing after loop partitioning * clang-format * clang-tidy * Also put MemoryType::Register on the stack. * Expand arg before substitute. Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com> Co-authored-by: Steven Johnson <srj@google.com> 24 March 2021, 17:56:58 UTC
28dd74f Upgrade WABT to 1.0.22 and do some minimal update to codegen and simd_op_check for LLVM13. (#5841) * Upgrade WABT to 1.0.22 and do some minimal update to codegen and simd_op_check for LLVM13. * tickle * trigger buildbots 24 March 2021, 16:30:16 UTC
602d15a Fix missed pattern matching due to cast optimization. (#5834) 22 March 2021, 21:39:49 UTC
8aa778c Enable targeting broadcasting dot products on ARM (#5833) * Enable targeting broadcasting dot products on ARM. * Add to comment. 22 March 2021, 19:19:44 UTC
80307ec Update README.md (#5831) 21 March 2021, 23:07:23 UTC
e92f05d Upgrade pybind11 to 2.6.2 (#5821) * Upgrade pybind11 to 2.6.2 Released January 2021 with various bug fixes, see https://github.com/pybind/pybind11/releases/tag/v2.6.2 * Update requirements.txt 18 March 2021, 16:58:27 UTC
8d5c7cd In fast_sine_cosine, fix message, relax threshold (#5820) 18 March 2021, 02:06:03 UTC
1a61c4b Use print_type function when printing vector type definitions, which can (#5819) be overridden in derived classes if needed. 17 March 2021, 23:42:41 UTC
b549d18 Grab-bag of minor fixes (#5813) * All TraceViz scripts should set pipefail (at least) * Use ".ldscript" for linker version scripts * More TraceViz fixes 16 March 2021, 21:05:33 UTC
e1c0fd3 Conform to CMP0116 when using CMake 3.20+ (#5810) 16 March 2021, 20:19:05 UTC
5aa1a65 Add Halide_CCACHE_BUILD option for CMake (#5804) * Add Halide_CCACHE_BUILD option for CMake This replicates the approach LLVM already has of baking a use-cache option directly into the CMake options, without having to futz with changing CC/CXX/etc. * Update CMakeLists.txt * Add CCACHE_SLOPPINESS=pch_defines,time_macros * Update CMakeLists.txt 16 March 2021, 03:16:33 UTC
b061a32 Avoid printing the statement when it is unchanged (#5809) * Only print statement if it changed. * Move simplification after unroll from lower to after unrolling a loop. * Avoid making new IR when not necessary. * Use a small helper class instead. * clang-format. Co-authored-by: Steven Johnson <srj@google.com> 15 March 2021, 21:58:31 UTC
c49b4af support building for m1 with only AARCH target (#5802) move test for ARM + metal to AARCH64 Co-authored-by: Steven Johnson <srj@google.com> 15 March 2021, 20:12:57 UTC
28c742f Set CMAKE_CROSSCOMPILING_EMULATOR in toolchain.linux-arm32.cmake (#5808) Also add comments 15 March 2021, 19:21:36 UTC
d523b83 Fix deprecation warnings for trunk LLVM (#5803) (1) Both the 'deprecated' and new, non-deprecated variants existed back to at least LLVM10, and the deprecated variant was commented as deprecated at that point as well; the change in LLVM13 is that they are now annotated with LLVM_ATTRIBUTE_DEPRECATED so we get compiler warnings (and thus errors). (2) The fixes are simply replicating what the old, deprecated methods did internally. 13 March 2021, 00:54:23 UTC
c3882a5 Change warmup strategy for sliding window (#5755) * Implement sliding window warmups by backing up the loop min. * Fix indirect sliding windows. * Improve is_monotonic. * Small cleanups. * Avoid generating vector valued bounds. * Fix build error on some compilers. * Fix loop bounds. * Don't try to slide things that should just be compute_at the store_at location. * Print condition when printing boxes. * Less things broken. * Add/fix comments. * Comments * Fix async by moving if inside consume (and so inside acquires). * Fix division. * This doesn't work on master either. * Add TODO * Acquire is not a no-op. * Add comment about unfortunate simplification. * Remove debug(0) * Add simplification of for { acquire { noop } } * Fix folding factors finally! * Update storage_folding test. * Fix bug when cloning a semaphore used more than once. * Disable failing test. * Work around bad complexity in is_monotonic. * Fix sub bug * Significantly faster schedule for blur. * Update tracing test. * New simplifications that help with upsampled and downsampled sliding windows. * This doesn't need explicit folding any more. * Fix new simplifier rules. * Fix simplifier div rule * Remove ancient brittle test. * Fix simplify rule again * More LT -> EQ rules for mod * Fix nested sliding windows with upsamples. * Replace hack with better solution. * Add missing override * Don't rewrite loop variable if the min doesn't change. * Refactor sliding window lowering. * Fixed bounds growing redundantly for independent producers. * Don't take the union unless possibly needed. * Respect conditional provide/required. * Add missing overrides * Much better schedule. * Use a smaller image for blur benchmarking so that different schedules have different perf * Replace Interval with ConstantInterval for is_monotonic. * Don't try to handle unsigned deltas. * Add failing test. * Remove unused new code. * Remove weird debugging code. * Avoid expanding bounds of split producers * Remove stray likely_if_innermost. * Remove old autotune tests. * Update test for guarded producers. * Reenable test. * Update trace for guarding producers. * Don't overwrite required.used * Handle LE/LT in bounds of lanes in vectorize * Fix acquire and release of warmups * Earlier fix for multiply cloned acquires was wrong. * Handle nested vectorization. * clang-format * Remove autotune_bug_* tests * Fix shadowing error on some compilers. * Appease overzealous clang-tidy warning. * clang-format * Don't use silly hack. * clang-tidy... * It's no longer safe to assume monotonic means bounds_of_expr_in_scope is exact * Address review comments * Add comment * Add missing override. * Fix constant interval issues. * Revert and remove empty interval * Fix multiply!? * Reduce need for simplifications. * Simplifications from dsharletg/sliding-window branch * Don't learn likely(x) and x. * Add comment * Add some min/max rules. * Also substitute facts from asserts * Remove is_empty from header too. * More rules * Add double stairstep rule. * Disable rule that uncovers bugs. * Consider anded expressions as if they were independent nested ifs. * Add promise_clamped to producer guards. * Revert "Consider anded expressions as if they were independent nested ifs." This reverts commit 03efb3f784b3078b64961c98edde383f4de04fb4. * Don't combine ifs, split them instead. * Update trace * clang-tidy/clang-format * Remove splitting of ifs, it breaks brittle tests. * Safer check on old conditions. * Fix producer guard condition. * Interval fixes. * Handle sliding backwards * Handle transitive dependencies. * Backport abadams' fix from abadams/slide_over_split_loop * Fix select visitor. * More simplifier rules. * Bring back old logic as a fallback. * Avoid specializations corrupting sliding * Fix boneheaded rule errors. * Fix slightly conservative bounds at the max for split case. * This pattern is too sensitive to the simplifier. In a real use case, it's just a sum, and the result can be subtracted after doing a reduction. * Add missing clamp rule * Don't count unlikely loops as inner loops for likely_if_innermost * Use <= instead of == to solve for the new loop min Useful when the warmup is a partial vector or something * Verify simplifier changes and add variants as suggested by synthesizer * Make implicit assumption explicit, for clarity * Use find_constant_bounds * Guard against expanded bounds more effectively. * Update tracing test * Small cleanup. * Don't simplify/prove using lets that might change value. * Stronger solving without expanding lets. * New simplifier rule for alignment * Fix case where no warmup needed * Add some useful rules. * Add safety check on when we can use the new loop min. * Better proof to avoid hacky condition that is hard to prove. * Small cleanup and use the nice new folding factors. * Bring back unrolled producer test. * clang-format * Expand comment. * Fix sliding backwards condition. * min(new_loop_min, loop_min) isn't needed any more. * We need that min, but we can be more conservative about it. * Stronger handling of previous loop mins. * Remove unused is_monotonic_strong. * Remove ConstantInterval::make_intersection. * Avoid need to handle uint specially. * Add cache for depends_on. * Reduce unnecessarily large cache scope * The first part of the key is always the same Co-authored-by: Andrew Adams <andrew.b.adams@gmail.com> 11 March 2021, 23:14:36 UTC
c2a0db1 Fix correctness_memoize on arm32 (#5799) Conversion from a pointer to an integer is "implementation defined"; in general, conversion to `uintptr_t` is reliable, but other conversions aren't. It turns out that for our arm32 compiler, casting a pointer to a `uint64_t` sign-extends, rather than zero-extends, causing unexpected behavior in memoize cache eviction *if* the pointer is in the top half of memory. The fix here is simple (cast to `uintptr_t` directly), but it brings up the question of where else in our codebase we might be doing direct conversions elsewhere in our code without noticing the potential UB. 10 March 2021, 23:39:27 UTC
7a8c771 Fix wasm-interp ucon error (#5797) This is a subtle error that only shows up in builds with assertions enabled in wabt; the issue is that we ask for an int64 value from a wabt `Value` struct, but that struct only has an int32, so an assertion can fail. (Note that there is always storage for both, and the values are constrained and unused inside the JIT anyway, so this is mostly just a cosmetic fix.) Also added a .gitignore entry. 10 March 2021, 22:53:40 UTC
34c402f Fix bug found by asan from #5784 (#5798) 10 March 2021, 21:54:51 UTC
c67f486 Move where intrinsic function attributes are set (#5795) * Make declare_intrin_overload return LLVM function * Make names same as elsewhere * Remove unneeded enum name * Set moved attributes in Hexagon backend * Use declare_intrin_overload for ARM vabdl * Fix ARM vabdl intrinsic types * Format and clang-tidy * Rename intrinsic to widening_absd 10 March 2021, 18:51:33 UTC
78ff307 Display the GPU device code as a string in the C/C++ backend (#5757) * Added support for a OpenCL backend through the C backend No correctly handles assert of kernel call Fixed clang-formatter Clang-tidy fixes * Remove references to alternative OpenclHost code * Only initialize GPU context once (removes name conflicts) squash commit * (Pretty) Print the kernels in the C backend clang formatting remove virtual * Fixes after review fixes after review 2.0 fixes 10 March 2021, 18:35:50 UTC
e75d9fb Fix out of bounds reads in strided ARM loads (#5784) * Safer version of vldN code generation. * Only be more conservative with alignment for external buffers. * Add tolerance to allocation size tests. * Remove old comments. * Improve ARM alignment and vldN code generation. * Remove merge straggler * Fix alignment condition (again). * Fix alignment. * Avoid divide by zero. * Move CodeGen_ARM's logic for strided loads to CodeGen_LLVM. * Fix comment. * clang-format. * Remove sketchy alignment check. 09 March 2021, 22:16:21 UTC
a83ab23 Simplifier rules for nested broadcasts (#5794) * Handle some reassociation when simplifying nested broadcasts. * clang-format. 08 March 2021, 19:24:07 UTC
89f5ee7 Add missing min/max/+/- rules (#5788) These are almost all of the rules in <= four in terms of min/max/add/sub ops leaves that simplify to something with <= three leaves. I left out things of the form: max(max(x, -x), 0) -> max(x - x) While correct, that transformation actually hurts our ability to analyze that expression. 05 March 2021, 20:00:57 UTC
199b873 Upgrade WABT version to 1.0.21 (#5782) 05 March 2021, 17:45:48 UTC
06b208f Move codegen backends into anonymous namespaces in source files and don't build them if not enabled (#5776) * Remove unused vertex buffer parameters. * Offload GPU code in a lowering pass instead of via CodeGen_GPU_Host. Fixes #5650, fixes #2797, fixes #2084, now #1971 is more relevant. * clang-format. * clang-format sorting is case sensitive!? * clang-tidy * Move codegen backends into anonymous namespaces in source files. * clang-format * Pass type arguments correctly. * Update OffloadGPULoops.cpp * trigger buildbots * trigger buildbots * Hack around tests that rely on the IR for offloaded GPU loops. * Fix missing include. * Remove unused include. * clang-tidy * Use custom lowering pass to see code before GPU offloading * Speculative fix for segfault * Fix const correctness * Fix error on unused variables in generated code. Co-authored-by: Steven Johnson <srj@google.com> 04 March 2021, 18:11:57 UTC
abf0f69 cmake: respect find_package QUIET option (#5785) Co-authored-by: Steven Johnson <srj@google.com> 04 March 2021, 08:16:21 UTC
a0c5380 Fixes for macos on arm (#5787) * Remove type checking on ARM-64 instructions in simd op check * Makefile fixes for M1 * Don't assume OSX is x86 * Change xml2 linking flag * M1 has a really fast div instruction 04 March 2021, 06:29:04 UTC
74f40fd Track time spent in malloc/free when profiling (#5763) * Track time spent in malloc/free when profiling * Appease clang tidy * Remove unnecessary asserts 03 March 2021, 20:26:03 UTC
acebd50 Various simplifier improvements from dsharletg/sliding-window (#5771) * Pull simplifier changes from dsharletg/sliding-window * Bring over test changes too. * Fix typo * Remove done TODO. * trigger buildbots * This pattern is too sensitive to the simplifier. In a real use case, it's just a sum, and the result can be subtracted after doing a reduction. Co-authored-by: Steven Johnson <srj@google.com> 03 March 2021, 20:14:29 UTC
5da8044 Various bug fixes and improvements from dsharletg/sliding-window (#5772) * Fix bug when a semaphore is cloned more than once. * (Originally by abadams) Don't count unlikely loops as inner loops for likely_if_innermost. * Ignore promise_clamped when solving. * Acquires are not no-ops. * Fix test name * Handle nested vectors in bounds_of_lanes and (by abadams) Handle LE/LT in bounds of lanes in vectorize * Fix test name. * Allow any level of nested vectorization. * trigger buildbots * Grammar Co-authored-by: Steven Johnson <srj@google.com> 03 March 2021, 20:14:11 UTC
7493c09 Move CodeGen_GPU_Host to a lowering pass (#5775) * Remove unused vertex buffer parameters. * Offload GPU code in a lowering pass instead of via CodeGen_GPU_Host. Fixes #5650, fixes #2797, fixes #2084, now #1971 is more relevant. * clang-format. * clang-format sorting is case sensitive!? * clang-tidy * Pass type arguments correctly. * Update OffloadGPULoops.cpp * trigger buildbots * Hack around tests that rely on the IR for offloaded GPU loops. * clang-tidy * Use custom lowering pass to see code before GPU offloading * Speculative fix for segfault * Fix const correctness * Fix error on unused variables in generated code. * Remove unnecessary space * Use helper. Co-authored-by: Steven Johnson <srj@google.com> 02 March 2021, 21:07:14 UTC
01f5e73 Update simd_op_check for the final wasm simd128 spec (#5779) The final revision of the wasm simd128 spec (https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md) added some ops and tweaked some others. This just augments the wasm section of simd_op_check so that all the ops are referenced, with the new (or still-unimplemented) ops commented out with TODOs. Most of the new ops will likely be implemented via pattern matching in Codegen_WebAssembly, but before that can happen in any efficient way, WABT needs to be updated to recognize all the ops in the final spec (it doesn't currently, and so we can't even load code with those ops without cratering). See https://github.com/WebAssembly/wabt/issues/1617 for tracking bug. (Also: drive-by fix in CodegenLLVM to fix prettyprinting of some debug output) 02 March 2021, 18:06:11 UTC
47d0594 Fix for trunk LLVM (#5778) 28 February 2021, 19:35:27 UTC
fdfb393 Fix for trunk LLVM (#5774) 26 February 2021, 18:05:34 UTC
d48fbde Fix for top-of-tree LLVM (#5768) * Fix for top-of-tree LLVM * oops 25 February 2021, 00:35:34 UTC
6bf0c0a Fix autoscheduler breakage from #5766 (Fix #5769) (#5770) 25 February 2021, 00:35:15 UTC
14bab78 Constrain calling convention for PyStub (#5761) There are two calling conventions that are sensible when calling a Generator from Python: - Inputs are specified via keyword arguments (verbose but more readable) - Inputs are specified via positional arguments (terse but more like C++) However, the current PyStub implementation also allows for mixing positional and keyword forms of input (as long as no input is specified multiple times). This change removes that possibility (requiring either all-keyword or all-positional for inputs). I'm not sure why I thought this was a good option originally, but upon reflection (and examination of existing code), calls written in this way tend to be a confusing mess that require too much care when reading, and I think we'd be better off just forbidding this entirely. Note that this technically is a breaking API change; any user code that used this technique previously would now throw an exception and need a (trivial) update. That said, this is (AFAIK) a very rarely used API, and I rather suspect that existing code that relies on being able to mix positional and keyword inputs in this way is likely to be doing so inadvertently rather than deliberately. 24 February 2021, 19:14:54 UTC
1be92c2 Grab-bag of minor Generator-related cleanups (#5766) * Grab-bag of minor Generator-related cleanups * Appease clang-tidy; rename local 'cerr' * Update PyStubImpl.cpp * Update PyStub.cpp * appease clang-tidy 23 February 2021, 00:27:18 UTC
a6ba311 Ensure that PyStub handles dynamically-added inputs and outputs, and add test for it (#5760) 22 February 2021, 23:26:13 UTC
b7da2df Fix misspelling of an ABI name (#5764) named ABIs are defined in https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#named-abis 22 February 2021, 18:20:38 UTC
4394fa2 Fix a few warnings from lgtm.com (#5765) 21 February 2021, 20:19:05 UTC
5545e61 Add initial support for RISCV RVV features (#5758) 1. `mabi` is introduced because target triple doesn't encode ABI info. 2. Use "+m,+a,+f,+d,+c" as default RISCV mattrs if it is not explicitly speicified. It is equivalent to "rv[32|64]gc" configuration. 3. HL_LLVM_ARGS="-riscv-v-vector-bits-min 128" is required to enable fixed-length vectors to RVV codegen. 19 February 2021, 18:03:40 UTC
a0fde42 Eradicate reinterpret() from runtime_internal.h (#5748) * Eradicate reinterpret() from runtime_internal.h The reinterpret<>() function in runtime_internal.h is dangerous and should not be allowed to exist: it copies from one type to another, copying the minimum of the two sizes, but with no allowance for ensuring that any "extra" bits in the destination are filled in with, well, anything. I have no evidence of a bug specifically caused by this, but a usage such as `reinterpret<uint64>t>(some_ptr)` on a 32-bit runtime will leave the upper 32 bits of the result undefined. Maybe they'll never get used, but this function is a bug waiting to happen. Fortunately, the only usages of this evil thing are all in hexagon_host.cpp, and all are used to convert between a uint64_t and an ion_device_handle* (which is sometimes represented as a void*). Replacing the handful of usages with bespoke functions to do these conversions seems much safer. 17 February 2021, 22:48:03 UTC
be8c727 Enable bugprone-macro-parentheses in clang-tidy, adding parens or annotating exceptions with NOLINT where necessary. (#5749) 17 February 2021, 22:16:39 UTC
75f2da2 Enable bugprone-incorrect-roundings for clang-tidy (#5750) * Enable bugprone-incorrect-roundings for clang-tidy, and fix the offending code. * Fix * lround -> llround in a couple of places 17 February 2021, 22:16:31 UTC
back to top