Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move parallel/async lowering from LLVM codegen to a standard Halide IR lowering pass. #6195

Merged
merged 85 commits into from
Dec 14, 2021

Commits on Jul 22, 2021

  1. First cut at factoring parallel task compilation, including closure

    generating and calling, into a normal IR to IR lowering pass.
    
    Includes adding struct handling intrinsics to LLVM and C++ backends.
    
    Still a work in progress.
    Z Stern committed Jul 22, 2021
    Configuration menu
    Copy the full SHA
    0b7bd25 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2021

  1. Fix formating that got munged by emacs somehow.

    Z Stern committed Jul 23, 2021
    Configuration menu
    Copy the full SHA
    e3a14b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e06a2a8 View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2021

  1. Checkpoint progress.

    Z Stern committed Jul 30, 2021
    Configuration menu
    Copy the full SHA
    7e90c97 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2021

  1. Small fixes.

    Z Stern committed Jul 31, 2021
    Configuration menu
    Copy the full SHA
    c9ab059 View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2021

  1. Checkpoint progress.

    Z Stern committed Aug 1, 2021
    Configuration menu
    Copy the full SHA
    a6d9f1d View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2021

  1. Checkpoint preogress.

    Z Stern committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    a2a92a4 View commit details
    Browse the repository at this point in the history
  2. Checkpoint progress.

    Z Stern committed Aug 2, 2021
    Configuration menu
    Copy the full SHA
    8375961 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2021

  1. Configuration menu
    Copy the full SHA
    fbb05ab View commit details
    Browse the repository at this point in the history
  2. Try a fix for make_typed_struct in C++ codegen.

    Z Stern committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    f8de53e View commit details
    Browse the repository at this point in the history
  3. Another attempt to fix C++ codegen.

    Z Stern committed Aug 3, 2021
    Configuration menu
    Copy the full SHA
    c5d902e View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2021

  1. Another C codegen fix.

    Z Stern committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    b1f8c6c View commit details
    Browse the repository at this point in the history
  2. Checkpoint progress.

    Z Stern committed Aug 4, 2021
    Configuration menu
    Copy the full SHA
    5eef291 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3391b6d View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2021

  1. Use make_typed_struct rather than make_struct to construct

    closure. Ensure all types are carried through exactly the same to both
    make_struct_type and make_typed_struct.
    Z Stern committed Aug 6, 2021
    Configuration menu
    Copy the full SHA
    ade53a2 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2021

  1. Checkpoint.

    Z Stern committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    980c447 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7071d40 View commit details
    Browse the repository at this point in the history
  3. Small formatting cleanups.

    Fixes to call graph checker. Disable tests related to this while
    Andrew and I figure out how to get it to work across closures.
    Z Stern committed Aug 11, 2021
    Configuration menu
    Copy the full SHA
    9b5c399 View commit details
    Browse the repository at this point in the history

Commits on Aug 12, 2021

  1. Get generated C++ to compile via a combination of fixing types and

    bludgeoning types into submission via subterfuge.
    Z Stern committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    ffb2887 View commit details
    Browse the repository at this point in the history
  2. Typo fix to a typo fix.

    Z Stern committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    91d7130 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6785903 View commit details
    Browse the repository at this point in the history
  4. Restore inadvertently deleted code.

    Z Stern committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    c711bb1 View commit details
    Browse the repository at this point in the history
  5. Rename make_struct_type to declare_struct_type.

    Z Stern committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    d6ac3e9 View commit details
    Browse the repository at this point in the history
  6. Add new file to CMake.

    Z Stern committed Aug 12, 2021
    Configuration menu
    Copy the full SHA
    f157165 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2021

  1. Add fixes for Hexagon offload and any passes that might add additional

    LoweredFunctions in the future.
    Z Stern committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    3c33517 View commit details
    Browse the repository at this point in the history
  2. Add comment with a bit of info for the future..

    Z Stern committed Aug 13, 2021
    Configuration menu
    Copy the full SHA
    c4f517b View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2021

  1. Typo fix.

    Z Stern committed Aug 14, 2021
    Configuration menu
    Copy the full SHA
    69db2ad View commit details
    Browse the repository at this point in the history
  2. Don't duplicate the closure call to test the error return.

    Don't declare halide_buffer_t type if there are no buffers in closure.
    Z Stern committed Aug 14, 2021
    Configuration menu
    Copy the full SHA
    b5fd7f9 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2021

  1. Configuration menu
    Copy the full SHA
    2e3660d View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. Configuration menu
    Copy the full SHA
    b8272fc View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2021

  1. Change resolve_function_name intrinsic to use a Call node to designate

    the function. This makes generating the C++ declaration in the C++
    backend trivial.
    
    Few more changes to type handling and naming.
    Z Stern committed Aug 18, 2021
    Configuration menu
    Copy the full SHA
    4f345e0 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2021

  1. Small C++ backend output formating change.

    Don't generate For loops with no variable.
    
    Update internal test for C++ output.
    Z Stern committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    ea9fa9a View commit details
    Browse the repository at this point in the history
  2. Add halide_semaphore_acquire_t as a well known type for use inside co…

    …mpiler.
    Z Stern committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    9cdb347 View commit details
    Browse the repository at this point in the history
  3. Add handling for halide_semaphore_t allocation.

    Formating fixes.
    Z Stern committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    147f381 View commit details
    Browse the repository at this point in the history
  4. Fix type for halide_semaphore_t.

    Z Stern committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    a71ecf1 View commit details
    Browse the repository at this point in the history
  5. Reapply C++ backend formatting fix.

    Z Stern committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    d68ca8c View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2021

  1. Configuration menu
    Copy the full SHA
    f00a4e5 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2021

  1. Add support for calling legacy halide_do_par_for runtime routine in

    cases where it is valid.
    Z Stern committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    c0526eb View commit details
    Browse the repository at this point in the history
  2. Formatting fixes.

    Z Stern committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    739a358 View commit details
    Browse the repository at this point in the history
  3. Format and tidy fixes.

    Z Stern committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    dd0f8ed View commit details
    Browse the repository at this point in the history
  4. Attempt to pass formatting check.

    Z Stern committed Aug 28, 2021
    Configuration menu
    Copy the full SHA
    1fe603b View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2021

  1. Configuration menu
    Copy the full SHA
    e8f87ac View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. Configuration menu
    Copy the full SHA
    71e5612 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2021

  1. Fix last set of test failures.

    Z Stern committed Sep 17, 2021
    2 Configuration menu
    Copy the full SHA
    2f24967 View commit details
    Browse the repository at this point in the history
  2. Formatting whitespace fixes.

    Z Stern committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    430cab2 View commit details
    Browse the repository at this point in the history
  3. Update comments.

    Z Stern committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    d37a16c View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2021

  1. Configuration menu
    Copy the full SHA
    6cefab2 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2021

  1. Configuration menu
    Copy the full SHA
    9a3d926 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2021

  1. Configuration menu
    Copy the full SHA
    1aac285 View commit details
    Browse the repository at this point in the history
  2. Another iteration.

    Z Stern committed Sep 29, 2021
    Configuration menu
    Copy the full SHA
    e8e296b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2da926b View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2021

  1. 1 Configuration menu
    Copy the full SHA
    3946ccd View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2021

  1. Configuration menu
    Copy the full SHA
    687b71b View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2021

  1. Configuration menu
    Copy the full SHA
    c87399c View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2021

  1. Configuration menu
    Copy the full SHA
    00a0715 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2021

  1. Comment typo fixes.

    Z Stern committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    5d93f1e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f49f800 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2021

  1. Configuration menu
    Copy the full SHA
    5733306 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2021

  1. Configuration menu
    Copy the full SHA
    114d209 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    df247f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b9ac7d6 View commit details
    Browse the repository at this point in the history
  4. clang-tidy

    steven-johnson committed Nov 23, 2021
    Configuration menu
    Copy the full SHA
    6528ba6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2fd4c9f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    e71bb81 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Configuration menu
    Copy the full SHA
    e64651b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7d2c2c6 View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2021

  1. Configuration menu
    Copy the full SHA
    e02571b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7eb9f5f View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2021

  1. Configuration menu
    Copy the full SHA
    f02b1e9 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2021

  1. Fix hvx lock/unlock semantics for PR #6457 (#6462)

    Fix qurt_hvx_lock issues
    steven-johnson authored Dec 2, 2021
    Configuration menu
    Copy the full SHA
    0faca07 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d180598 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9af64ae View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    25b7b77 View commit details
    Browse the repository at this point in the history
  5. Minor hygiene in LowerParallelTasks

    - normalize local functions to snake_case
    - put all local functions & classes in anon namespace
    - move MinThreads visitor to file scope to reduce nestedness of code
    steven-johnson committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    387c58f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    24a6eb2 View commit details
    Browse the repository at this point in the history
  7. use Closure::include

    steven-johnson committed Dec 2, 2021
    Configuration menu
    Copy the full SHA
    a1d267e View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2021

  1. Switch to PureIntrinsics per review feedback.

    Z Stern committed Dec 3, 2021
    Configuration menu
    Copy the full SHA
    c21e701 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2021

  1. Minor cleanup of parallel refactor intrinsics (#6465)

    * Minor cleanup of parallel refactor intrinsics
    
    - Renamed `load_struct_member` to `load_typed_struct_member` to make it more clear that it is intended for use only with the results of `make_typed_struct`.
    - Split `declare_struct_type` into two intrinsics, `define_typed_struct` and `forward_declare_typed_struct`, removing the need for the underdocumented `mode` argument and hopefully making usage clearer
    - Added / clarified comments for the intrinsics modified above
    
    * Update comments
    
    * Fix comments
    steven-johnson authored Dec 6, 2021
    Configuration menu
    Copy the full SHA
    b6ba514 View commit details
    Browse the repository at this point in the history
  2. Update CodeGen_C.cpp

    steven-johnson committed Dec 6, 2021
    Configuration menu
    Copy the full SHA
    2923246 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2021

  1. Configuration menu
    Copy the full SHA
    5764d12 View commit details
    Browse the repository at this point in the history
  2. Remove 'foo.buffer' from Closure entirely

    This is a direct adaptation of what #6481 does for the old LLVM-based code, and allows elimination of one use of `get_pointer_or_null()`. PR is meant to be merged into factor_parallel_codegen, not master.
    steven-johnson committed Dec 8, 2021
    Configuration menu
    Copy the full SHA
    64db40f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bdd7857 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2021

  1. Keep track of task_parent inside LowerParallelTasks; remove no-longer…

    …-needed get_pointer_or_symbol() intrinsic (#6486)
    steven-johnson authored Dec 9, 2021
    Configuration menu
    Copy the full SHA
    5cf15ea View commit details
    Browse the repository at this point in the history
  2. Fix potential issue with additional LoweredFuncs (#6490)

    I think this is the right fix for this case; that said, I can't find a single instance in any of our test cases that actually triggers this.
    steven-johnson authored Dec 9, 2021
    Configuration menu
    Copy the full SHA
    57412df View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2021

  1. factor parallel codegen with fewer intrinsics (#6487)

    * Rework some of parallel closure lowering to avoid some intrinsics
    
    This version relies more heavily on the existing make_struct, and puts
    function names in the Variable namespace as globals.
    
    Co-authored-by: Steven Johnson <srj@google.com>
    abadams and steven-johnson authored Dec 13, 2021
    Configuration menu
    Copy the full SHA
    c70badd View commit details
    Browse the repository at this point in the history