Skip to content

Do not pool failed CUDA streams - #2236

Merged
ericniebler merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/stream-pool-failed-creation
Aug 31, 2026
Merged

Do not pool failed CUDA streams#2236
ericniebler merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/stream-pool-failed-creation

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

When CUDA stream creation fails, stream_provider still engages own_stream_ with the null handle. Its destructor then returns that handle to the pool, and a later borrower can receive it with cudaSuccess.

  • Keep own_stream_ disengaged when stream acquisition fails.
  • Add a CUDA API interception regression test in an isolated executable.
  • Avoid returning failed handles to the stream pool.

Tests

  • cmake --build build --target test.nvexec.stream_pool --parallel 4
  • ./build/test/nvexec/test.nvexec.stream_pool
  • cmake --build build --target test.exec test.stdexec --parallel 4
  • ./build/test/test.stdexec
  • ./build/test/exec/test.exec

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 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.

@fallintoplace
fallintoplace force-pushed the fix/stream-pool-failed-creation branch from c71b031 to d8a004c Compare August 26, 2026 10:05
@ericniebler

Copy link
Copy Markdown
Collaborator

/ok to test d8a004c

@ericniebler
ericniebler merged commit 7f6a1a4 into NVIDIA:main Aug 31, 2026
69 of 70 checks passed
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