Skip to content

Commit c06270c

Browse files
authored
apply review suggestions
1 parent 9780a34 commit c06270c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cuda_core/docs/source/interoperability.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ Current device/context
1313
The :meth:`Device.set_current` method ensures that the calling host thread has
1414
an active CUDA context set to current. This CUDA context can be seen and accessed
1515
by other GPU libraries without any code change. For libraries built on top of
16-
the CUDA runtime (``cudart``), this is as if ``cudaSetDevice`` is called.
16+
the `CUDA runtime <https://docs.nvidia.com/cuda/cuda-runtime-api/index.html>`_,
17+
this is as if ``cudaSetDevice`` is called.
1718

1819
Since CUDA contexts are per-thread constructs, in a multi-threaded program each
1920
host thread should call this method.
2021

21-
Conversely, if any GPU library already set a device (or context) to current, this
22+
Conversely, if any GPU library already sets a device (or context) to current, this
2223
method ensures that the same device/context is picked up by and shared with
2324
``cuda.core``.
2425

@@ -34,7 +35,7 @@ exposing their own stream types.
3435
To address this issue, we propose the ``__cuda_stream__`` protocol (currently version
3536
0) as follows: For any Python objects that are meant to be interpreted as a stream, they
3637
should add a ``__cuda_stream__`` attribute that returns a 2-tuple: The version number
37-
(``0``) and the address of ``cudaStream_t``:
38+
(``0``) and the address of ``cudaStream_t`` (both as Python `int`):
3839

3940
.. code-block:: python
4041

0 commit comments

Comments
 (0)