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

Sort experiment #31

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Sort experiment #31

wants to merge 17 commits into from

Commits on Dec 24, 2023

  1. Update to wgpu 0.18

    Updates dependencies to latest published crates, including wgpu 0.18 and winit 0.28.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    d928fee View commit details
    Browse the repository at this point in the history
  2. Start fidelityfx impl

    WIP
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    646199e View commit details
    Browse the repository at this point in the history
  3. Checkpoint

    Have written reduce and scan but not tested
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    43e632b View commit details
    Browse the repository at this point in the history
  4. Checkpoint shaders written

    The shaders are mostly written, with some TODOs, but haven't been tested.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    9ae99d6 View commit details
    Browse the repository at this point in the history
  5. Checkpoint

    Starting to wire up sizes, buffer bindings, etc., in preparation for actually running the pipeline.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    74eadb4 View commit details
    Browse the repository at this point in the history
  6. Checkpoint correct counting

    The count stage seems to be generating correct output. Next step is wiring up sums.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    968f52d View commit details
    Browse the repository at this point in the history
  7. Checkpoint reduce

    It seems like reduce works.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    a833f11 View commit details
    Browse the repository at this point in the history
  8. Checkpoint working reduce and scan

    Fix some sizing issues, seems to get to top-level scan correctly now.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    48957c3 View commit details
    Browse the repository at this point in the history
  9. Checkpoint scans

    The prefix sum stages seem to be generating correct output.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    3a1c094 View commit details
    Browse the repository at this point in the history
  10. Checkpoint scatter

    This seems to be a working scatter, which means that the core of the algorithm is done. Also just starting to look at performance characteristics. That's why there's a simpler count stage, the huge shared array seemed to be a problem.
    raphlinus committed Dec 24, 2023
    Configuration menu
    Copy the full SHA
    9d79a07 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2023

  1. Checkpoint almost working sort

    The sort pipeline is wired up, and results are close to being sorted, but there are zero elements in the output.
    raphlinus committed Dec 26, 2023
    Configuration menu
    Copy the full SHA
    063e936 View commit details
    Browse the repository at this point in the history
  2. Checkpoint sorts medium sized arrays

    This sorts up to 2^16, but fails at 2^17.
    raphlinus committed Dec 26, 2023
    Configuration menu
    Copy the full SHA
    8a920e7 View commit details
    Browse the repository at this point in the history

Commits on Dec 27, 2023

  1. Checkpoint non-working WLMS

    raphlinus committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    3eee575 View commit details
    Browse the repository at this point in the history
  2. Seemingly working WLMS

    Multisplit appears to work in isolation, we'll see whether that holds up.
    raphlinus committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    f10ddca View commit details
    Browse the repository at this point in the history
  3. Checkpoint working WLMS sort

    It works (and doesn't seem to have the same problem as the scatter from Fidelity), but seems to be a bit slower than that. Perhaps that can be improved (subgroups would obviously help a lot), and it's also possible it would unlock going to 8 bits per pass.
    raphlinus committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    38de0be View commit details
    Browse the repository at this point in the history
  4. Checkpoint simpler ballot

    Just iterate all the keys, it's faster. Also suggests a substantial fraction of all time is going into the ballot.
    raphlinus committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    00a3079 View commit details
    Browse the repository at this point in the history
  5. Checkpoint variable warp size

    We can use either 16 or 32 for warp size. The former is faster (on M1 Max). 8 is also a possibility but then the size of the histogram array would exceed the workgroup, so threads would need to deal with multiple histogram values.
    
    Quick experiments with ELEMENTS_PER_THREAD show no gains for values other than 4.
    raphlinus committed Dec 27, 2023
    Configuration menu
    Copy the full SHA
    9f882d8 View commit details
    Browse the repository at this point in the history