Skip to content
Snippets Groups Projects

Array to prod

Merged Aaron Councilman requested to merge array-to-prod into main
All threads resolved!

Array to prod optimization for constant sized arrays.

  • To identify arrays that can be converted, we start from constant sized constant arrays and identify all users (including users of users) and all the arrays used by those users and ensure that all of those nodes can be converted.
    • Constructing these sets uses a custom union-find structure since I didn't find a good crate for it
  • Converts multi-dimensional arrays into nested products as it makes the transformations easier, SROA can then eliminate these products entirely.
  • The optimization can handle partial selections of a function and also has an optional argument for setting a maximum size of array (i.e. total number of elements) that it will convert.
  • To allow optional arguments/variable number of arguments in the scheduler, some small tweaks to the scheduler.

We should make sure to test this once forkify is fixed to handle the sorting loop, but if we manually unroll that loop this optimization is able to convert the median entirely into a tower of selects.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • rarbore2 added 5 commits

    added 5 commits

    Compare with previous version

  • rarbore2 added 1 commit

    added 1 commit

    • 664daa17 - fully unroll / predicate median window

    Compare with previous version

  • rarbore2 resolved all threads

    resolved all threads

  • rarbore2 approved this merge request

    approved this merge request

  • rarbore2 mentioned in commit 145a016c

    mentioned in commit 145a016c

  • merged

  • Please register or sign in to reply
    Loading