Skip to content

[REVIEW] Add count_if count_outer_if retrieve_if and retrieve_outer_if functions to static_multiset - #846

Open
MaybeWilli wants to merge 11 commits into
NVIDIA:devfrom
MaybeWilli:retrieve-count-if
Open

MaybeWilli wants to merge 11 commits into
NVIDIA:devfrom
MaybeWilli:retrieve-count-if

Conversation

@MaybeWilli

@MaybeWilli MaybeWilli commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #800.

Adds if and outer_if functions for count and retrieve functions in static_multiset, to reduce unnecessary hash table lookups when the predicate is false.

Possible future update (left out of this PR for scope):
-Benchmark using

auto const always_true = cuda::constant_iterator<bool>{true};
cuda::std::identity{}

alongside count_if and retrieve_if, similar to how insert_if_n is being used, so that count and retrieve in kernels.cuh can be removed.

@copy-pr-bot

copy-pr-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@MaybeWilli
MaybeWilli force-pushed the retrieve-count-if branch 2 times, most recently from c24a72d to ea3d382 Compare September 18, 2026 16:39
@MaybeWilli
MaybeWilli marked this pull request as ready for review September 20, 2026 20:16
@MaybeWilli MaybeWilli changed the title [WIP] Add count_if count_outer_if retrieve_if and retrieve_outer_if functions to static_multiset [REVIEW] Add count_if count_outer_if retrieve_if and retrieve_outer_if functions to static_multiset Sep 20, 2026
@PointKernel

Copy link
Copy Markdown
Member

@MaybeWilli Thanks for the contribution. There are a few cleanups I need to take care of first before we can move forward with this. Given how our downstream use cases have evolved, we probably no longer need to support the “outer” logic on the cuco side. I’ll let you know once this is ready to move forward.

@PointKernel PointKernel added the type: feature request New feature request label Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature request New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT]: Add count_if and retrieve_if APIs to static_multiset

2 participants