fix(example): report stream faults from callback-based CUDA awaitables - #386
Merged
sgerbino merged 1 commit intoAug 26, 2026
Merged
Conversation
cudaLaunchHostFunc passes no completion status to its host function, so a callback-based IoAwaitable could not observe a stream fault and resumed with success. Query the stream with cudaStreamQuery in await_resume, back on a worker thread where CUDA calls are permitted, and surface the sticky error through the awaitable's normal error path. Apply this to callback_awaitable in notification-strategies and to cuda_stream / cuda_device_stream in datamovement. Add a --fault mode to notification-strategies that launches a null-pointer kernel and awaits it via one mechanism per process under a watchdog; all three now resume with cudaErrorIllegalAddress, where the callback previously resumed with success. Poll and deferred-sync were already correct because cudaEventQuery and cudaStreamSynchronize return the status.
|
An automated preview of the documentation is available at https://386.capy.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-08-26 18:13:55 UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #386 +/- ##
========================================
Coverage 98.09% 98.09%
========================================
Files 130 130
Lines 6291 6291
========================================
Hits 6171 6171
Misses 120 120
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cudaLaunchHostFunc passes no completion status to its host function, so a callback-based IoAwaitable could not observe a stream fault and resumed with success. Query the stream with cudaStreamQuery in await_resume, back on a worker thread where CUDA calls are permitted, and surface the sticky error through the awaitable's normal error path.
Apply this to callback_awaitable in notification-strategies and to cuda_stream / cuda_device_stream in datamovement. Add a --fault mode to notification-strategies that launches a null-pointer kernel and awaits it via one mechanism per process under a watchdog; all three now resume with cudaErrorIllegalAddress, where the callback previously resumed with success. Poll and deferred-sync were already correct because cudaEventQuery and cudaStreamSynchronize return the status.