24e2bca | Steven Johnson | 19 February 2021, 22:18:22 UTC | wip | 19 February 2021, 22:18:22 UTC |
2e619a4 | Steven Johnson | 19 February 2021, 22:08:10 UTC | Update Generator.cpp | 19 February 2021, 22:08:10 UTC |
b7c15d1 | Steven Johnson | 19 February 2021, 00:56:47 UTC | wip | 19 February 2021, 00:56:47 UTC |
c27f47f | Steven Johnson | 18 February 2021, 22:44:42 UTC | WIP | 18 February 2021, 22:44:42 UTC |
a0fde42 | Steven Johnson | 17 February 2021, 22:48:03 UTC | 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 | Steven Johnson | 17 February 2021, 22:16:39 UTC | 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 | Steven Johnson | 17 February 2021, 22:16:31 UTC | 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 |
df28da9 | Andrew Adams | 17 February 2021, 18:58:29 UTC | Allow device copies inside a loop (#5741) Enable schedules that do device copies inside loops inside the compute_at location, for example due to sliding windows. | 17 February 2021, 18:58:29 UTC |
4f10827 | Steven Johnson | 17 February 2021, 18:21:11 UTC | Enable modernize-redundant-void-arg in clang-tidy and apply autofixes (#5752) | 17 February 2021, 18:21:11 UTC |
703531d | Andrew Adams | 17 February 2021, 17:43:58 UTC | Workaround for issue #5738 (#5739) * Don't run test on flaky bot * Add TODO | 17 February 2021, 17:43:58 UTC |
9586b93 | Steven Johnson | 17 February 2021, 17:30:47 UTC | Enable modernize-use-bool-literals for clang-tidy and apply automatic fixes. (#5751) | 17 February 2021, 17:30:47 UTC |
d053463 | Alex Reinking | 17 February 2021, 06:12:43 UTC | Fix subsetted build issues with arm32/64, hexagon. Fixes #5744. Fixes #5628 (#5745) | 17 February 2021, 06:12:43 UTC |
5a8432b | Steven Johnson | 17 February 2021, 01:58:38 UTC | Fix clang-tidy warnings in src/autoschedulers (#5746) * Upgrade clang-tidy rules to use v11 rather than v10. * Fix clang-tidy warnings in src/autoschedulers A handful of minor fixes allows us to remove the custom .clang-tidy for src/autoschedulers entirely. (Note that this PR is additive to https://github.com/halide/Halide/pull/5743, which must land first.) | 17 February 2021, 01:58:38 UTC |
336a623 | Steven Johnson | 17 February 2021, 01:57:36 UTC | Upgrade clang-tidy rules to use v11 rather than v10. (#5743) | 17 February 2021, 01:57:36 UTC |
2daef0c | Steven Johnson | 16 February 2021, 23:27:55 UTC | Upgrade clang-format rules to use v11 rather than v10. Reformat code as necessary due to trivial differences in v10 vs v11. (#5742) | 16 February 2021, 23:27:55 UTC |
11e7946 | Dillon Sharlet | 16 February 2021, 18:52:10 UTC | Fix downsample boundary condition, optimize schedule, generate other outputs. (#5737) | 16 February 2021, 18:52:10 UTC |
222776f | Andrew Adams | 16 February 2021, 06:04:08 UTC | Do something like sqrt-free Cholesky for BGU (#5281) * Do something like sqrt-free Cholesky for BGU This produces fewer update definitions and less total math in the solve step, saving some code size. No significant impact on performance for this app, because the solve step is done at low res, but it's theoretically more satisfying, and it's nice to have the symmetric version of the matrix solve available as a reference. | 16 February 2021, 06:04:08 UTC |
b4c4c73 | Andrew Adams | 15 February 2021, 21:10:27 UTC | Fix goofy local laplacian upsample (#5736) | 15 February 2021, 21:10:27 UTC |
f819d73 | Andrew Adams | 14 February 2021, 17:37:18 UTC | Better handling of sparse blurs using udot/sdot (#5735) Tweak vector deinterleaving to recognize a new pattern that comes up when you want to use udot/sdot in sparse convolution | 14 February 2021, 17:37:18 UTC |
dfbe346 | Dillon Sharlet | 13 February 2021, 00:10:30 UTC | A few small debug output improvements (#5732) * A few small debug output improvements. * Fix dumb mistake * clang-format * Trying to avoid wiping out my compiler cache is a bad idea | 13 February 2021, 00:10:30 UTC |
39e81fd | Steven Johnson | 11 February 2021, 22:32:51 UTC | Simplify some Generator code (#5731) * Simplify some Generator code * fix typo | 11 February 2021, 22:32:51 UTC |
584a1f4 | Steven Johnson | 11 February 2021, 17:37:18 UTC | Remove unnecessary .PHONY from python_bindings/Makefile (#5729) * Remove unnecessary .PHONY from python_bindings/Makefile * Silence compiler warning | 11 February 2021, 17:37:18 UTC |
fa92b83 | Steven Johnson | 11 February 2021, 01:42:45 UTC | Minor refactoring in Generator code (#5728) | 11 February 2021, 01:42:45 UTC |
d92ad17 | John Lawson | 11 February 2021, 00:57:16 UTC | Add support for AV512 VNNI instructions (#5725) | 11 February 2021, 00:57:16 UTC |
c8ca344 | Andrew Adams | 10 February 2021, 22:23:51 UTC | Treat the cost of a mux as just the cost of evaluating the args. (#5727) This pessimistically assumes the mux doesn't get unrolled. | 10 February 2021, 22:23:51 UTC |
d9cd751 | Dillon Sharlet | 10 February 2021, 20:37:12 UTC | Fix regression in 32d5f71cef5ecea883c6fc26305181e555716d01 (#5726) | 10 February 2021, 20:37:12 UTC |
935b91e | cimes-isi | 10 February 2021, 18:06:18 UTC | runtime: fix pointer calculations to avoid overflows. Fixes #5713. (#5716) * runtime: fix pointer calculations to avoid overflows. Fixes #5713. * HalideBuffer: add explicit parenthesis in pointer arithmetic Not needed for correctness, but @dsharletg feels it adds clarity. | 10 February 2021, 18:06:18 UTC |
aa67665 | Steven Johnson | 10 February 2021, 07:26:02 UTC | Fix apps/HelloPyTorch (#5722) | 10 February 2021, 07:26:02 UTC |
4f61b2e | Steven Johnson | 10 February 2021, 04:53:04 UTC | Add more debug output to mul_div_mod in hopes of tracking down #5634) (#5724) | 10 February 2021, 04:53:04 UTC |
fe0888b | Steven Johnson | 09 February 2021, 18:00:58 UTC | Refactor code for dealing with default values of scalar Params (#5720) The "default" value for a scalar param is rarely used -- it's currently only possible to specify foran Input in a Generator, and that value only shows up in the generated metadata for AOT compilation. This PR refactors this so that instead of being maintained solely as a hack in Generator data structures, it's moved into Parameter as its own field. This seems like a lot of work some something of marginal use, but I'm reluctant to suggest removing it entirely (it's possible it could break someone's code), and refactoring it in this way will make some subsequent Generator refactoring easier to understand and review. | 09 February 2021, 18:00:58 UTC |
3fbb12a | John Lawson | 09 February 2021, 18:00:02 UTC | Add support for AVX512 BF16 dot product (#5712) * Add support for AVX512 BF16 dot product * Match on f32*f32 * Remove f32 check | 09 February 2021, 18:00:02 UTC |
3e034d6 | Steven Johnson | 08 February 2021, 23:05:30 UTC | Remove unnecessary #include from RDom.cpp (#5718) | 08 February 2021, 23:05:30 UTC |
1b22dfe | John Lawson | 05 February 2021, 20:06:34 UTC | Add support for AVX512 f32x32 to bf16x32 conversion (#5711) The vcvtne2ps2bf16 instruction combines two f32x16 vectors and converts them to one bf16x32 vector. We can use this to support converting a f32x32 vector to bf16x32 vector by splitting the input vector into two. | 05 February 2021, 20:06:34 UTC |
8ee7f4c | Andrew Adams | 05 February 2021, 20:01:32 UTC | Add mux intrinsic (#5707) Add mux intrinsic | 05 February 2021, 20:01:32 UTC |
27be859 | Steven Johnson | 05 February 2021, 19:58:54 UTC | Deprecate old-style realize() methods (#5676) * Deprecate old-style realize() methods We had 5 extra variants of realize() (for 0-dim thru 4-dim cases); these are a holdover from both having a limit of 4 dimensions (ie, pre-halide_buffer_t) and also from pre-C++11 (ie, passing in initializer-lists of int was less convenient). Let's deprecated these for Halide 12 and remove them in Halide 13. | 05 February 2021, 19:58:54 UTC |
32d5f71 | Andrew Adams | 05 February 2021, 00:44:07 UTC | Don't make new IR nodes if nothing changed when simplifying (#5698) * Don't make new IR nodes if nothing changed Some statements and expressions get crafted anew each time when repeatedly resimplified. This PR fixes all the cases I could find. | 05 February 2021, 00:44:07 UTC |
3c0b9e4 | John Lawson | 04 February 2021, 18:43:22 UTC | Provide wrapper around 128 bit cvtneps2bf16 (#5704) * Provide wrapper around 128bit cvtneps2bf16 * Include module with AVX512 feature Co-authored-by: Steven Johnson <srj@google.com> | 04 February 2021, 18:43:22 UTC |
793b7f6 | cimes-isi | 04 February 2021, 17:40:41 UTC | HalideBuffer: cast offset operand to ptrdiff_t to avoid overflow (#5706) * HalideBuffer: cast offset operand to ptrdiff_t to avoid overflow * HalideBuffer: cast offset_of operand to ptrdiff_t to avoid overflow * HalideRuntime: ptrdiff_t casts to avoid overflow | 04 February 2021, 17:40:41 UTC |
a0fc7fa | Alexander Root | 04 February 2021, 01:13:53 UTC | Add fixes to overflow analysis in bounds inference (#5618) * add fixes to overflow analysis in bounds inference Co-authored-by: Steven Johnson <srj@google.com> | 04 February 2021, 01:13:53 UTC |
dadbcbf | John Lawson | 03 February 2021, 21:58:00 UTC | Check Sapphire Rapids AVX512BF16 support in runtime (#5702) The Sapphire Rapids target feature controls whether BF16 and VVNI X86 instructions are emitted. Support for both of these is checked in the Halide compiler, but BF16 is not checked in the runtime as it required extending the cpuid functionality. Now we have that cpuid functionality we can add the BF16 check. | 03 February 2021, 21:58:00 UTC |
f64525e | aankit-ca | 03 February 2021, 19:29:29 UTC | [HVX] Correct simd-op-check-hvx (#5703) Add "+hvxv6x" to mattrs Correct isa_version in simd_op_check_hvx Co-authored-by: Ankit Aggarwal <aankit@quicinc.com> | 03 February 2021, 19:29:29 UTC |
d8c95dd | Andrew Adams | 03 February 2021, 17:38:21 UTC | Capture Exprs by ref in IRMatch (#5696) * Capture Exprs by ref in IRMatch * Forbid rvalue Exprs passed to IRMatcher nodes * Clarify what is_const refers to * Fix min int constant * Add explanatory comment * Remove assert that was blowing up simplifier stack frames | 03 February 2021, 17:38:21 UTC |
c3cb54b | Volodymyr Kysenko | 03 February 2021, 16:49:38 UTC | Add missing headers (#5700) | 03 February 2021, 16:49:38 UTC |
bdfa994 | Volodymyr Kysenko | 03 February 2021, 16:47:16 UTC | async deserves its own line (#5701) | 03 February 2021, 16:47:16 UTC |
3ba8691 | Alexander Root | 03 February 2021, 00:21:48 UTC | fix lens_blur estimates (#5694) | 03 February 2021, 00:21:48 UTC |
265f2c7 | John Lawson | 02 February 2021, 22:04:41 UTC | Add initial support for Sapphire Rapids AVX512 features (#5677) * Add Sapphire Rapids target feature * Add initial avx512_sr test * Guard against earlier LLVM versions * Move feature to other AVX512 features * Set earlier features when SapphireRapids selected * trigger buildbots * Add SapphireRapids to get_runtime_compatible_target * Add issue link to TODO comments * Add user errors if using unsupported feature | 02 February 2021, 22:04:41 UTC |
89329d3 | Steven Johnson | 02 February 2021, 19:36:21 UTC | Disable generator_aot_gpu_multi_context_threaded under wasm (#5692) Re-enabled wasm testing, which revealed breakage of the generator_aot_gpu_multi_context_threaded target (the runtime isn't being linked properly). Since this test isn't useful under wasm at the present time anyway (relies on GPU support), just skipping it entirely for those targets. | 02 February 2021, 19:36:21 UTC |
99c5583 | Alexander Root | 02 February 2021, 17:49:31 UTC | [adams2019] Restructure autoscheduler + add timer (#5654) * add feature caching and block caching to adams2019 autoscheduler * added caching verification for feautures * clean up TODOs and commented out src * add docstring * clean up final TODOs * rm double declaration * make clang format happy * rm stats that caused linker error * fix cmake * fix clang format too * remove caching from adams2019 restructuring * move unnecessary member functions + add descriptions for State member functions * fix clang tidy in LoopNest.* * add top level comment to State struct | 02 February 2021, 17:49:31 UTC |
100bc76 | John Lawson | 02 February 2021, 17:47:34 UTC | Add ecx support for runtime X86 cpuid (#5684) * Add ecx support for runtime X86 cpuid Some newer X86 extensions require setting ecx when calling cpuid, for example AVX512BF16 support is queried using cpuid(eax=7, ecx=1). * trigger buildbots Co-authored-by: Steven Johnson <srj@google.com> | 02 February 2021, 17:47:34 UTC |
f941376 | Volodymyr Kysenko | 02 February 2021, 04:12:21 UTC | Lower halving_* intrinsics without widening (#5686) * Lower halving_* intrinsics without widening * Fix typo * Extend the test to check for correctness of the halving_* lowering * Change vector to array | 02 February 2021, 04:12:21 UTC |
25eeea1 | Steven Johnson | 01 February 2021, 23:11:24 UTC | ScopedFile in write_debug_image needs sanity check (#5689) Specifically, don't call fclose() on a null ptr, as that can crash. Also added some code to avoid implicit int->bool conversions. | 01 February 2021, 23:11:24 UTC |
a471e59 | Andrew Adams | 01 February 2021, 21:01:56 UTC | Add a spin before the cond_wait in the thread pool (#5408) * Add a spin before the cond_wait in the thread pool * Spin on a mutex even if someone is parked | 01 February 2021, 21:01:56 UTC |
9743fca | Zalman Stern | 01 February 2021, 19:50:40 UTC | Make GPU kernel compilation caching consistent across GPU backends. (#5546) Make GPU context handling more consistent and use a common compilation cache for kernels. Introduces a finalization routine for kernel compilation to indicate when kernels are not strictly required to be defined. Thus allowing them to be unloaded or discarded, but not when they are needed. Co-authored-by: Steven Johnson <srj@google.com> Co-authored-by: Marcos Slomp <slomp@adobe.com> | 01 February 2021, 19:50:40 UTC |
e517946 | Steven Johnson | 01 February 2021, 19:27:24 UTC | Delete llvm_builder.yml (#5685) | 01 February 2021, 19:27:24 UTC |
1155bda | Steven Johnson | 29 January 2021, 21:31:06 UTC | Avoid bogus out-of-memory error for multiple_scatter under wasm (#5681) | 29 January 2021, 21:31:06 UTC |
6118a62 | Steven Johnson | 29 January 2021, 17:27:30 UTC | Disable a few more wasm-simd ops in simd_op_check (#5679) Recent changes to the final wasm-simd spec means that some instructions aren't being generated (and may not even exist in the same form). Commented out for now; we need to revisit this once the LLVM backend for wasm gets closer to up-to-date with the final spec. | 29 January 2021, 17:27:30 UTC |
288526c | Dillon Sharlet | 28 January 2021, 17:52:16 UTC | Encapsulate a few more symbols (#5672) * Encapsulate more symbols. | 28 January 2021, 17:52:16 UTC |
f427ad1 | Steven Johnson | 28 January 2021, 17:51:11 UTC | Remove deprecated variants of infer_input_bounds() in the Python bindings (#5673) * Remove deprecated variants of infer_input_bounds() in the Python bindings The C++ versions were removed for Halide 12 already, but I missed the Python wrappers. * trigger buildbots | 28 January 2021, 17:51:11 UTC |
813eadc | Alex Reinking | 28 January 2021, 09:41:44 UTC | Fix target detection for i686 (#5675) | 28 January 2021, 09:41:44 UTC |
a8299b5 | Steven Johnson | 27 January 2021, 21:22:40 UTC | Allow LLVM-13 and Clang-13 (#5674) | 27 January 2021, 21:22:40 UTC |
6e3fb56 | Steven Johnson | 26 January 2021, 04:09:53 UTC | FIx intermittent OSX Python crash (#5667) * FIx intermittent OSX Python crash The OSX buildbot has been crashing intermittently on some python tests; debugging showed that in some situations, Introspection's calls to `backtrace()` include bogus addresses (eg 0x08), which cause segfaults when you try to inspect memory near them. The reasons for this aren't entirely clear -- for instance, it only seems to repeat reliably when using the Makefile rather than CMake, and only when doing an 'out-of-tree' build. Rather than try to run this to ground further, this PR just checks for address fields that seem obviously unreasonable (first 256 bytes of address space) and ignore them. * Add -fno-omit-frame-pointer, update sanity check * Update Introspection.cpp | 26 January 2021, 04:09:53 UTC |
d4c27ca | Dillon Sharlet | 25 January 2021, 21:51:57 UTC | Lower saturating arithmetic without widening (#5662) * Lower saturating arithmetic without widening, and handle it in lower_intrinsic. * clang-format, fix saturating sub * cout -> cerr * trigger buildbots Co-authored-by: Alex Reinking <alex.reinking@gmail.com> Co-authored-by: Steven Johnson <srj@google.com> | 25 January 2021, 21:51:57 UTC |
38be3e3 | aankit-ca | 23 January 2021, 01:06:20 UTC | Add rounding shift right instructions (#5664) Co-authored-by: Ankit Aggarwal <aankit@quicinc.com> | 23 January 2021, 01:06:20 UTC |
7cff481 | Dillon Sharlet | 22 January 2021, 21:18:47 UTC | Fix VSX min/max intrinsics. Fixes #5661. (#5663) | 22 January 2021, 21:18:47 UTC |
6b398a3 | Andrew Adams | 22 January 2021, 18:23:48 UTC | Better codegen for switch-statement-like if-else chains (#5595) Better codegen for switch-statement-like if-else chains And added a test that demonstrates writing a little interpreter in Halide and scheduling it. | 22 January 2021, 18:23:48 UTC |
8c57a1a | Steven Johnson | 21 January 2021, 22:07:20 UTC | Use linker tools on OSX & Linux to limit exports (#4651) (#5659) * Use linker scripts on OSX & Linux to limit exports * Write script to detect appropriate linker flags. Co-authored-by: Alex Reinking <alex.reinking@gmail.com> | 21 January 2021, 22:07:20 UTC |
be7a6a3 | Alexander Root | 21 January 2021, 21:23:43 UTC | is_positive_const and is_negative_const broken for (some) casts (#5615) * let signed_const checkers fail for non-widening integral casts Co-authored-by: Steven Johnson <srj@google.com> | 21 January 2021, 21:23:43 UTC |
0ca0415 | Steven Johnson | 21 January 2021, 01:59:10 UTC | Remove all deprecated methods for Halide 12 (#5656) * Remove all deprecated methods for Halide 12 These were all marked as deprecated in Halide 11 (and probably Halide 10 too); let's go ahead and remove them in Halide 12. * Remove function bodies too | 21 January 2021, 01:59:10 UTC |
a785b53 | Steven Johnson | 20 January 2021, 02:25:51 UTC | Add Lambda.cpp (#5651) Functions/methods that are part of the Halide public API should (generally) not be inline, to ensure the function instantiation is always in libHalide. | 20 January 2021, 02:25:51 UTC |
7713b3a | Steven Johnson | 20 January 2021, 02:25:27 UTC | Add Python & PyBind version checking to PyStubImpl.cpp (#5653) It's built separately from the rest of the Python bindings and could get out of sync separately. | 20 January 2021, 02:25:27 UTC |
57083e4 | Andrew Adams | 19 January 2021, 17:44:27 UTC | Fix cuda warp shuffle issue for narrow types (#5624) * Fix cuda warp shuffle issue for narrow types In the case where no shuffle was necessary, we were upcasting the type to 32-bits needlessly and causing chaos. | 19 January 2021, 17:44:27 UTC |
8a12c43 | Alex Reinking | 18 January 2021, 18:53:20 UTC | Upgrade pybind11 to 2.6.x (#5644) * Use pybind11 2.6.0, which fixes Python-finding bugs. * Update Generator.cpp * Update Generator.cpp * Update PyHalide.cpp * 2.6.0 -> 2.6.1 Co-authored-by: Steven Johnson <srj@google.com> | 18 January 2021, 18:53:20 UTC |
42c5182 | Alex Reinking | 15 January 2021, 19:34:45 UTC | Shrink tile size to fit in Mac Mini GPU memory. (#5647) * Shrink tile size to fit in Mac Mini GPU memory. * Fix comment per Shoaib's correction. | 15 January 2021, 19:34:45 UTC |
bb1ca3c | Steven Johnson | 14 January 2021, 22:57:28 UTC | correctness_vector_math: skip hypot() test for LLVM10 (#5643) | 14 January 2021, 22:57:28 UTC |
722b93e | Steven Johnson | 13 January 2021, 20:27:12 UTC | Add 11.1 as an acceptable LLVM version (#5640) * Add 11.1 as an acceptable LLVM version Apparently 11.1 was released but our Makefile only allows for 11.0. * Update Makefile | 13 January 2021, 20:27:12 UTC |
61ca4d2 | Steven Johnson | 13 January 2021, 20:12:26 UTC | Simplify CodeGen_OpenGLCompute_C (#5636) * Simplify CodeGen_OpenGLCompute_C Combines CodeGen_GLSLBase and CodeGen_OpenGLCompute_C into one class, removing unnecessary stuff from the OpenGL support code. | 13 January 2021, 20:12:26 UTC |
0dfdc0d | Alexander Root | 13 January 2021, 08:11:56 UTC | fix typo on assert in lerp() (#5638) | 13 January 2021, 08:11:56 UTC |
6620563 | Steven Johnson | 13 January 2021, 01:06:52 UTC | Add TARGET_OPENGLCOMPUTE (#5637) Inadvertently removed code for properly enabling/disabling OGLC in #5626, this restores it properly | 13 January 2021, 01:06:52 UTC |
4ed4db8 | Steven Johnson | 12 January 2021, 23:09:16 UTC | Remove CodeGen_OpenGL_Dev (#5635) 5626 removed OpenGL support, but didn't remove this no-longer-needed class; removed it here. Moved CodeGen_GLSLBase into CodGen_OpenGLCompute_Dev.cpp (which is now the only subclass), but didn't yet attempt to consolidate them into a single class. | 12 January 2021, 23:09:16 UTC |
3defb66 | Dillon Sharlet | 12 January 2021, 23:02:59 UTC | Pattern match intrinsics in a target independent lowering pass (#5531) * Simplify intrinsics of broadcasts to broadcasts of intrinsics. * Add pattern matching of intrinsics lowering pass. * Fix broadcast elementwise simplifications for nested broadcasts. * More target independent pattern matching. * Progress on pattern matching for ARM and Hexagon. * broadcasted -> broadcast. * Broken pattern matching. * Fix broken build. * Match without patterns. * Try to match saturating_add. * Pattern matching working for some intrinsics. * x86 simd_op_check passing. * Most x86 and Hexagon patterns working. * Rename subtract -> sub, multiply -> mul. * Add widening_left_shift. * Remove bad simplification. * Fix some missed pattern issues. * Hexagon patterns mostly working. * Fix pmaddwd patterns * Start on ARM intrinsics. * Use shift intrinsics. * Revert formatting of Hexagon intrinsic table * Revert one extra find and replace. * Add table of instructions for ARM. * Add more patterns for rounding_halving_add. * Remove unused unsigned widening subtracts * Add intrinsics test * Remove bogus patterns. * Match lanes in shifts. * Progress on multiply-add Hexagon pattern matching. * Fix multiply-subtracts * Enable constant folding of broadcasted constants. * Fix some widening patterns * Fix double widening lossless casts * Use widen/narrow helpers * All Hexagon and x86 patterns working * Fix return type of widening subtracts. * Fix rounding shift right patterns * WIP simd op check * Add CodeGen_LLVM::Intrinsic and related helpers. * Use call_elementwise_intrinsic for more patterns. * Clean up intrinsics a bit. * Use call_elementwise_intrinsic for x86. * More clean-up and comments. * Add comment * Use call_elementwise_intrinsic for pmaddwd * Remove stray comment. * Move a few more things to overloaded intrinsics * Remove unused runtime functions. * Fix some corner case target flags * ssse... * Run clang-format * Replace introspection test. * Remove x86_avx512 initmod * clang-tidy * Remove x86_avx512 from makefile too * Revert simd_op_check * clang-format off on tables * Fix merge conflicts * Add abs and absd support * Pattern match some absd patterns * Clean up dead logic. * Remove duplicate merge content. * Update Generator.cpp * Update Generator.cpp * Also check one sided saturating add. * Fix requirement for abs_i8x32 * Fix some saturating add/sub patterns. * More ways to express rounding halving add/sub * Add widening_shift_right * Use lower_intrinsic to handle unknown calls. * Use pattern match results. * Fix incorrect patterns * All(?!) ARM shifts working * Remove unused declarations * Don't substitute all lets * Reduce code duplication in tables * Simplify negated shifts. * Handle possible pmaddwd overload resolution failures. * Fix some overflow cases. * Small cleanups. * Review fixes * Fix some broken patterns * Don't hardcode 4 * PatternMatchIntrinsics -> FindIntrinsics * Re-enable uhsub patterns * Add useful simplication to lower_int_uint_mod * Lower unknown intrinsics. * Also check for bitwise_and * Simplify bitwise_and(x, -1). * Add back some necessary simplifications. * Fix incorrect narrowing of widening add/sub. * Fix boneheaded add/sub swap. * Skip finding intrinsics for scalar types. * Add accidentally removed break. * Improve comments. * clang-format, clang-tidy, and other fixes * Try to fix compiler-specific errors, more clang-tidy. * More clang-tidy fixes. * Tweak comments on rounding_shift_left/right. * Move default mulhi_shr and sorted_avg lowering to lower_intrinsics. * Argh clang-format. * Better coverage of shift correctness. * Fix unknown intrinsic visitor. * Add comments to rounding shifts. * Add TODO for C++14 * Use pattern matching for vector reduce. * Simplify pattern matching a little. * Remove stray newline in vectorreduce ops. * Add HL_SIMD_OP_CHECK_FILTER env variable * Fix and refactor vector reduce codegen * clang-format * pmulhrsw doesn't exist until sse3! * Fix incorrect lack of fall-through * Don't lower int/uint division in FindIntrinsics. * Fix missing check of op type. * Don't handle Mod at all. * Programmatically generate split argument intrinsic wrappers. * clang-format * More clang-format * Clean up IRMatch helpers. * Small cleanups/review comments. * Fix boneheaded bug. * Fix addp * Fix float addp * Fix incorrect rounding shift saturation patterns. * Update Hexagon vector reductions. * clang-format * Small cleanups. * clang-tidy * Fix sign of shifts on arm32 * Fix LLVM10 workaround * Work around opaque LLVM failures. * Pattern match dp4a/dp2a * clang-format * Don't try to use shift_right_narrow patterns on invalid shifts. * Don't rely on mul visitor to produce shifts. * Fix arm32 * Address some review comments. * Speculatively fix non-locally-reproducing dot product failures * Fix CUDA dot products. * clang-format * Remove debugging code. * clang-tidy * Put needed check back. * Bring back some tests/patterns. * Renable saturating_add pattern. * Bring back a few more tests. * Fix mixed sign swapped ops case. * Better implementation of handling mixed signs. * Fix some issues. * Avoid ADL fights with common user helper functions. * Don't try to find intrinsics for bool operations. * Remove redundant patterns. * Bring back div/mod lowering. * Update PowerPC to use pattern matched intrinsics. Co-authored-by: Steven Johnson <srj@google.com> | 12 January 2021, 23:02:59 UTC |
27f55dd | Steven Johnson | 12 January 2021, 17:55:36 UTC | Remove OpenGL support (part 1) (#5626) * Remove OpenGL support (part 1) Fixes #5475 This removes the OpenGL backend (but *not* the OpenGLCompute backend) from public use: - Remove Target::OpenGL - remove DeviceAPI::GLSL - remove Func::glsl() and Func::shader() - remove all OpenGL-specific apps and tests - remove HalideRuntimeOpenGL.h - remove some internal code that is OpenGL-only Note that there is still internal code that needs trimming; since the OpenGLCompute backend uses some of the same code, and some of the same build deps, and some of the same runtime shared-library loading, I tried to err on the side of leaving code/buildrules/etc in place for now, with the plan to clean that up in subsequent PRs. Note also that feature Target::EGL is still present, as I believe it is still useful in conjunction with OpenGLCompute. | 12 January 2021, 17:55:36 UTC |
9b99acb | Dillon Sharlet | 11 January 2021, 21:25:36 UTC | Clean up includes (#5584) * Remove unused wildcard/type info. * Use std::unique_ptr to avoid sketchy lifetime management. * Clean up includes * Pull some changes from small-cleanups3 * clang-format * Add missing include. * Add missing include. * clang-format. * Fix function type * clang-format * Add missing include Co-authored-by: Steven Johnson <srj@google.com> | 11 January 2021, 21:25:36 UTC |
cc03c9c | Andrew Adams | 09 January 2021, 00:28:07 UTC | Prototype of multiple scattering update definitions (#5553) Add "gather" and "scatter" intrinsics, which let you write update definitions which store multiple values at once to different computed locations. Useful for doing things like swapping or permuting elements in-place. See comments in IROperator.h for more details. | 09 January 2021, 00:28:07 UTC |
9c59d94 | Alex Reinking | 09 January 2021, 00:22:40 UTC | Set version to 12.0.0. Fixes #5259 (#5289) | 09 January 2021, 00:22:40 UTC |
2e5f1e0 | xndcn | 09 January 2021, 00:06:05 UTC | Fix issues in OpenGL backend (#5545) Co-authored-by: Alex Reinking <alex_reinking@berkeley.edu> Co-authored-by: Steven Johnson <srj@google.com> Co-authored-by: Alex Reinking <alex.reinking@gmail.com> | 09 January 2021, 00:06:05 UTC |
392b53e | Steven Johnson | 08 January 2021, 23:21:24 UTC | Check error results from all egl calls (#5619) * Check error results from all egl calls We were ignoring the result from a couple of calls. * Update opengl_egl_context.cpp * Update Generator.cpp * Update Generator.cpp | 08 January 2021, 23:21:24 UTC |
2b3aaa8 | xndcn | 08 January 2021, 19:46:56 UTC | Add max threads checking for Metal (#5588) * Add max threads checking for Metal Originally, this checking will be asserted by Metal API Validation in Xcode, otherwise the program will crash or output wrong results. * Disable the max threads checking for Metal in non-debug runtime * Disable error/metal_threads_too_large test for non-OSX target | 08 January 2021, 19:46:56 UTC |
081f472 | xndcn | 07 January 2021, 22:49:08 UTC | Add CLDoubles feature check for OpenCL double type (#5610) Similar to CLHalf feature check for half type. | 07 January 2021, 22:49:08 UTC |
46fc56a | Steven Johnson | 07 January 2021, 18:29:38 UTC | Don't allow CUDACapability80 on LLVM10 (#5617) LLVM10 can't handle that version of Cuda; we never noticed till now because we didn't have a buildbot with a GPU that could handle it. Modify the sniffers to cap capability at 75 for LLVM10 builds, and fail with user errors if that capability is explicitly requested. | 07 January 2021, 18:29:38 UTC |
f38801e | Dillon Sharlet | 06 January 2021, 17:52:38 UTC | Use std::unique_ptr to manage CodeGen classes (#5583) * Remove unused wildcard/type info. * Use std::unique_ptr to avoid sketchy lifetime management. * Pull some changes from small-cleanups3 * Use auto for some loops. * clang-tidy | 06 January 2021, 17:52:38 UTC |
8063879 | prdelgado | 05 January 2021, 21:50:53 UTC | replaced indentation in line 20 with spaces to show proper error message (#5580) * replaced indentation in line 20 with spaces to show proper error message * added error message detail with alternative solution based on PR feedback | 05 January 2021, 21:50:53 UTC |
8383cc9 | Andrew Adams | 28 December 2020, 23:49:45 UTC | Delete lane extraction code in vectorization (#5596) | 28 December 2020, 23:49:45 UTC |
890a519 | pkubaj | 23 December 2020, 01:15:44 UTC | Fix build on FreeBSD/powerpc64 (#5572) * Fix build on FreeBSD/powerpc64 FreeBSD doesn't use getauxval, but elf_aux_info. * Make the conditional only work Linux and FreeBSD * Make the conditional only for FreeBSD and Linux | 23 December 2020, 01:15:44 UTC |
8a0f4a1 | Dillon Sharlet | 22 December 2020, 01:54:36 UTC | Fix sketchy shadowing that breaks on some compilers. Fixes #5581 (#5587) * Fix sketchy shadowing that breaks on some compilers. Fixes #5581 * Fix another sketchy shadowing. | 22 December 2020, 01:54:36 UTC |
b22598c | Dillon Sharlet | 21 December 2020, 22:56:00 UTC | Remove unused wildcard/type info. (#5582) | 21 December 2020, 22:56:00 UTC |
5ac8808 | Dillon Sharlet | 21 December 2020, 21:54:37 UTC | Fix several bugs on Hexagon and some cleanup (#5570) * Fix several bugs on Hexagon. * clang-format actually found a bug | 21 December 2020, 21:54:37 UTC |
1dbcf19 | Steven Johnson | 21 December 2020, 17:08:20 UTC | Decouple wasm's +bulk-memory from wasm_threads (#5574) * Decouple wasm's +bulk-memory from threads When `wasm_threads` was added, `+bulk-memory` codegen was enabled in conjunction with this feature, due to some inscrutable error which apparently didn't get recorded. From inspection of the spec for bulk-memory, and experimentation with the most recent version of Emscripten (2.0.10), I can't find any reason that this actually needs to be enabled, so I've moved it into its own new feature flag. Also: drive-by fix in Target to format the tables in `get_runtime_compatible_target()` better, and to remove some wasm-related entries from the 'must match' table that didn't actually need to match. * Create .gitignore | 21 December 2020, 17:08:20 UTC |
ef45c87 | Steven Johnson | 19 December 2020, 00:45:34 UTC | Fix for trunk LLVM (#5576) | 19 December 2020, 00:45:34 UTC |
83b040d | Zalman Stern | 17 December 2020, 21:40:16 UTC | Add a feature to name cached memoizations and to evict them by name. (#5510) This PR adds an optional ```EvictionKey``` parameter to the ```memoize``` scheduling option. EvictionKeys are user provided labels of up to 64-bits that can be used to request that labeled items in the cache be removed to free up space. Co-authored-by: Steven Johnson <srj@google.com> | 17 December 2020, 21:40:16 UTC |
590b253 | Marcos Slomp | 17 December 2020, 19:22:09 UTC | D3D12: refactoring of kernel argument constant buffer packing (#5569) * initial setup for Direct3D 12 support for Windows-on-ARM * fixing runtime modules for Windows on ARM 64 * typo * wrapping windows_clock for Windows on ARM support * temporarily disabling windows_clock_[x86/arm] * wip * Set -fshort-wchar on generic Windows runtime target. * removing windows_clock specializations * replacing accidental tabs * addressing code review comments * Hoist fpic in CMakeFile. Mirror CMake changes to Makefile. * Add explanatory comment to Makefile * Add arm64-windows and -windows-d3d12compute targets to correctness_cross_compilation * fixed kernel parameter packing * Run clang-format * handling Bool -- UInt(1), and Int(1) as well just in case * Add previously-failing D3D12 test * Add new test to CMake Co-authored-by: Marcos Slomp <slomp@adobe.com> Co-authored-by: Shoaib Kamil <kamil@adobe.com> Co-authored-by: Shoaib Kamil <shoaibkamil@gmail.com> Co-authored-by: Steven Johnson <srj@google.com> | 17 December 2020, 19:22:09 UTC |