Skip to content

feat(example): add CUDA notification-strategies example#342

Merged
sgerbino merged 1 commit into
cppalliance:develop-2from
sgerbino:pr/cuda-notification-strategy-examples
Jun 29, 2026
Merged

feat(example): add CUDA notification-strategies example#342
sgerbino merged 1 commit into
cppalliance:develop-2from
sgerbino:pr/cuda-notification-strategy-examples

Conversation

@sgerbino

Copy link
Copy Markdown
Collaborator

Demonstrate that the IoAwaitable protocol is independent of the GPU-completion notification mechanism. One GPU pipeline is awaited three structurally different ways, each satisfying capy::IoAwaitable, all producing identical results at runtime:

  • callback_awaitable: a cudaLaunchHostFunc host callback
  • poll_awaitable: a service thread looping cudaEventQuery
  • deferred_sync_awaitable: a service thread running blocking cudaStreamSynchronize

Each awaitable owns its continuation as a member and hands the notification source a pointer, honoring the executor's stable-address contract. Mirrors example/cuda/datamovement conventions but is run, not just compiled: identical checksums across the three mechanisms plus a zero exit code is the pass condition. The README documents the multi-threaded scaling tradeoff with an attributed citation.

Demonstrate that the IoAwaitable protocol is independent of the
GPU-completion notification mechanism. One GPU pipeline is awaited three
structurally different ways, each satisfying capy::IoAwaitable, all
producing identical results at runtime:

- callback_awaitable: a cudaLaunchHostFunc host callback
- poll_awaitable: a service thread looping cudaEventQuery
- deferred_sync_awaitable: a service thread running blocking
  cudaStreamSynchronize

Each awaitable owns its continuation as a member and hands the
notification source a pointer, honoring the executor's stable-address
contract. Mirrors example/cuda/datamovement conventions but is run, not
just compiled: identical checksums across the three mechanisms plus a
zero exit code is the pass condition. The README documents the
multi-threaded scaling tradeoff with an attributed citation.
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop-2@1559c4f). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             develop-2     #342   +/-   ##
============================================
  Coverage             ?   98.39%           
============================================
  Files                ?       83           
  Lines                ?     4237           
  Branches             ?        0           
============================================
  Hits                 ?     4169           
  Misses               ?       68           
  Partials             ?        0           
Flag Coverage Δ
linux 98.39% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1559c4f...9768717. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cppalliance-bot

Copy link
Copy Markdown

An automated preview of the documentation is available at https://342.capy.prtest3.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2026-06-29 21:23:20 UTC

@sgerbino sgerbino merged commit a226b79 into cppalliance:develop-2 Jun 29, 2026
37 checks passed
@sgerbino sgerbino deleted the pr/cuda-notification-strategy-examples branch June 29, 2026 21:32
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.

2 participants