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
diff --git a/torch/cuda/streams.py b/torch/cuda/streams.py
index 94a973f..14345ba 100644
--- a/torch/cuda/streams.py
+++ b/torch/cuda/streams.py
@@ -20,8 +20,12 @@
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):