Skip to content

Add stream pool to avoid cuStreamCreate overhead #2012

Description

@simonbyrne

Describe the bug

I tried adding multithreading to our code, and now we see occasional pauses due to CuStreamCreate:
Screenshot 2023-07-29 at 5 27 06 PM

Could be fixed by adding a Stream pool?

To reproduce

Available on request

Expected behavior

No pauses

Version info

Not sure exactly, I think it was Julia 1.8.5 with CUDA.jl 3.13.1 and CUDA 11.2.

Once our cluster upgrades the drivers, I can rerun with CUDA 12.

Additional context

cc @lcw

Activity

  1. changed the title [-]CuStreamCreate overhead when using multiple tasks[/-] [+]Add stream pool to avoid cuStreamCreate overhead[/+] on Aug 11, 2023
  2. added
    runtimeHost runtime: devices, contexts, streams, synchronization, memory management, multi-GPU, profiling.
    and removed on Oct 19, 2026
  3. maleadt commented on Oct 19, 2026

    @maleadt
    Member

    Fixed by #3317: the streams of finished tasks are now kept in a per-context pool and handed to new tasks, so spawning tasks no longer calls cuStreamCreate every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceRuntime performance.runtimeHost runtime: devices, contexts, streams, synchronization, memory management, multi-GPU, profiling.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions