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

[PROTOTYPE] partition, unique families and ranges API #1708

Conversation

danhoeflinger
Copy link
Contributor

@danhoeflinger danhoeflinger commented Jul 17, 2024

Adds partition, unique families as well as the ranges API to use two pass scan.

There is some refactoring to the generalized helpers, to simplify sharing between families of scan-like algorithms using this.
Otherwise, this just adds other entry points to use two pass scan.

This also standardizes / adds some zero element short circuits in the ranges API

Note: for the ranges API, I try to hook in to the path to re-use what we have in the main APIs. Specifically, this enables ranges API copy_if to be able to use single workgroup copy_if as well, where it was not previously exposed to that.

Tentative performance results for these families of algorithms are similar to what we have seen with copy_if.

@danhoeflinger danhoeflinger force-pushed the dev/dhoeflin/two_pass_partition_and_unique branch from b737f56 to 6c03803 Compare July 18, 2024 20:43
@danhoeflinger danhoeflinger force-pushed the dev/dhoeflin/two_pass_partition_and_unique branch from 6c03803 to 964a9d2 Compare July 22, 2024 14:05
@adamfidel adamfidel force-pushed the dev/shared/reduce_then_scan_impl branch from 189ff05 to 23f7886 Compare July 24, 2024 18:26
@danhoeflinger danhoeflinger force-pushed the dev/dhoeflin/two_pass_partition_and_unique branch from d55c1d2 to 6c9c8a4 Compare July 24, 2024 22:03
Copy link
Contributor

@mmichel11 mmichel11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've had a pass over this PR and have a few comments.

@danhoeflinger danhoeflinger force-pushed the dev/dhoeflin/two_pass_partition_and_unique branch from 91923bc to a008e90 Compare July 29, 2024 19:59
@mmichel11 mmichel11 force-pushed the dev/shared/reduce_then_scan_impl branch from 5337317 to 0a58980 Compare July 31, 2024 15:19
danhoeflinger and others added 4 commits August 1, 2024 13:02
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Unique Optimization and specializing n==1

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>

fixes for previous commit (squash)

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
…changes)

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger danhoeflinger force-pushed the dev/dhoeflin/two_pass_partition_and_unique branch from 33a46c1 to 838d2af Compare August 2, 2024 16:57
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Copy link
Contributor

@mmichel11 mmichel11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First pass over the recent changes. I marked a few of the places where we touched the code and left ::std. There are a few more but I didn't want to pollute the review comments with them.

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
… cleanup

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Copy link
Contributor

@mmichel11 mmichel11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
@danhoeflinger danhoeflinger merged commit 1481aaa into dev/shared/reduce_then_scan_impl Aug 2, 2024
@danhoeflinger danhoeflinger deleted the dev/dhoeflin/two_pass_partition_and_unique branch August 2, 2024 21:03
danhoeflinger added a commit that referenced this pull request Aug 5, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency


---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 6, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 6, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 7, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 7, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 8, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 8, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 8, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
danhoeflinger added a commit that referenced this pull request Aug 14, 2024
Enabling partition and unique family of scan-like algorithms includes ranges API
Making legacy scan user `__result_and_scratch_storage` to match future type for return to compile
Refactoring of `__pattern` / `__parallel` structure for scan-like algorithms for consistency

---------

Signed-off-by: Dan Hoeflinger <dan.hoeflinger@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants