Skip to content

When to specify stream for an operation? #2083

Answered by awni
lbench asked this question in Q&A
Discussion options

You must be logged in to vote

The primary use cases are:

  • If you want to specify a device (like CPU or GPU) you can use the stream kwarg for that.
  • If you want to run operations in parallel (CPU or GPU) you can use multiple streams. For really compute bound workloads it won't help much to use multiple streams on the GPU.

In general specifying a stream is a more advanced use case and OI would always start by running everything on the default stream of the default device (the GPU on Apple silicon), profile and optimize from there.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lbench
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants