Skip to content

ANN_BENCH: AnnGPU::uses_stream() for optional algo GPU sync - #2314

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:branch-24.06from
achirkin:fea-ann-bench-optional-gpu-sync
May 15, 2024
Merged

ANN_BENCH: AnnGPU::uses_stream() for optional algo GPU sync#2314
rapids-bot[bot] merged 2 commits into
NVIDIA:branch-24.06from
achirkin:fea-ann-bench-optional-gpu-sync

Conversation

@achirkin

Copy link
Copy Markdown
Contributor

Introduce a new virtual member uses_stream() for the AnnGPU class. Overriding this allows an algorithm inform the benchmark whether the stream synchronization is needed between benchmark iterations.

This is relevant for a potential persistent kernel where the CPU threads use an independent mechanics to synchronize and get the results from the GPU.
This is different from just not implementing AnnGPU for an algorithm in that it allows the algorithm to decide whether the synchronization is needed (depending on input parameters at runtime), while still providing the get_sync_stream() functionality.

@achirkin achirkin added enhancement New feature or request 3 - Ready for Review non-breaking Non-breaking change labels May 14, 2024
@achirkin
achirkin requested a review from a team as a code owner May 14, 2024 12:06
@github-actions github-actions Bot added the cpp label May 14, 2024
@achirkin achirkin added feature request New feature or request and removed enhancement New feature or request cpp labels May 14, 2024
@github-actions github-actions Bot added the cpp label May 15, 2024

@tfeher tfeher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@achirkin

Copy link
Copy Markdown
Contributor Author

/merge

@achirkin
achirkin requested a review from tfeher May 15, 2024 12:59
@rapids-bot
rapids-bot Bot merged commit 6cc7134 into NVIDIA:branch-24.06 May 15, 2024
loulankxh pushed a commit to loulankxh/raft that referenced this pull request Oct 14, 2025
)

Introduce a new virtual member `uses_stream()` for the `AnnGPU` class. Overriding this allows an algorithm inform the benchmark whether the stream synchronization is needed between benchmark iterations.

This is relevant for a potential persistent kernel where the CPU threads use an independent mechanics to synchronize and get the results from the GPU.
This is different from just not implementing `AnnGPU` for an algorithm in that it allows the algorithm to decide whether the synchronization is needed (depending on input parameters at runtime), while still providing the `get_sync_stream()` functionality.

Authors:
  - Artem M. Chirkin (https://github.com/achirkin)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: NVIDIA#2314
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for Review cpp feature request New feature or request non-breaking Non-breaking change

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants