Rust-GPU / Rust-GPU/rust-cuda

Sequencing tasks on multiple streams w/ Events

Open
#81 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.4k
Forks
249
PR merge metrics
No merged PRs in 30d

Description

The following doc snippets seem to indicate that this is not yet supported:

Events can also be used to sequence tasks on multiple streams within the same context by specifying dependent tasks (not supported yet by cust).
~ https://docs.rs/cust/latest/cust/event/index.html

and

Sequencing between multiple streams can be achieved using events, which are not currently supported by cust.
~ https://docs.rs/cust/latest/cust/stream/index.html

However, the following bit makes it seem as though it is indeed supported, even across different devices/contexts.

Make the stream wait on an event.

All future work submitted to the stream will wait for the event to complete. Synchronization is performed on the device, if possible. The event may originate from different context or device than the stream.
~ https://docs.rs/cust/latest/cust/stream/struct.Stream.html#method.wait_event

Just wondering what the state of cross-stream/cross-context Event-based synchronization is. I'm happy to just go ahead and test, but I figured I would ask. This seems to be something supported on the Cuda level, not necessarily something which would need to be implemented in cust, but I could be wrong.

Also, if this needs to be implemented, I'm wondering if folks might have some thoughts on current blockers and such?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the cust event and stream documentation linked in the issue, especially Stream::wait_event, and determine which cross-stream and cross-context cases are actually supported. Define the missing behavior and its blockers before identifying the implementation and test scope; done means the support status or required change is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.