Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for CUDA Streams #1751

Open
michaeleisel opened this issue Feb 23, 2024 · 4 comments
Open

Support for CUDA Streams #1751

michaeleisel opened this issue Feb 23, 2024 · 4 comments

Comments

@michaeleisel
Copy link

I'm looking to leverage more of my GPU when running multiple models in parallel. It'd be great if candle had some sort of support for running multiple concurrent streams at once, whether through changing the stream used internally to CUDA's per-thread default stream, or allowing the user to run closures in different streams (with_stream(|| { })), or something else.

@michaeleisel
Copy link
Author

Here's a discussion I've opened for it on cudarc: coreylowman/cudarc#209

@xnorpx
Copy link
Contributor

xnorpx commented Aug 11, 2024

I was also looking into this, looks like cudarc now supports create a device_with_stream have you tested this yet @michaeleisel ?

@michaeleisel
Copy link
Author

I haven't, but it appears sufficient

@LaurentMazare
Copy link
Collaborator

Indeed this seems to be sufficient as all cudarc operations now use the appropriate stream based on the cudarc::driver::CudaDevice so I've just merged #2532 which adds a Device::new_cuda_with_stream based on this.

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

No branches or pull requests

3 participants