From c14fbc36edd2acb92850ac523626b4cd9d523d96 Mon Sep 17 00:00:00 2001 From: Xiang Gao Date: Wed, 5 Aug 2020 19:58:41 -0700 Subject: [PATCH] Update docs about CUDA stream priority (#41364) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/41364 Reviewed By: malfet Differential Revision: D22962856 Pulled By: ngimel fbshipit-source-id: 47f65069516cb555579455e8680deb937fc1f544 --- torch/cuda/streams.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/torch/cuda/streams.py b/torch/cuda/streams.py index 94a973f0a31a8..14345baf6abdd 100644 --- a/torch/cuda/streams.py +++ b/torch/cuda/streams.py @@ -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):