Skip to content

Commit

Permalink
Update docs about CUDA stream priority (pytorch#41364)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#41364

Reviewed By: malfet

Differential Revision: D22962856

Pulled By: ngimel

fbshipit-source-id: 47f65069516cb555579455e8680deb937fc1f544
  • Loading branch information
zasdfgbnm authored and facebook-github-bot committed Aug 6, 2020
1 parent ddb8849 commit c14fbc3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions torch/cuda/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ class Stream(torch._C._CudaStreamBase):
device(torch.device or int, optional): a device on which to allocate
the stream. If :attr:`device` is ``None`` (default) or a negative
integer, this will use the current device.
priority(int, optional): priority of the stream. Lower numbers
represent higher priorities.
priority(int, optional): priority of the stream. Can be either
-1 (high priority) or 0 (low priority). By default, streams have
priority 0.
.. note:: Although CUDA versions >= 11 support more than two levels of
priorities, in PyTorch, we only support two levels of priorities.
"""

def __new__(cls, device=None, priority=0, **kwargs):
Expand Down

0 comments on commit c14fbc3

Please sign in to comment.