Skip to content

Commit

Permalink
clarify CPU-only version of the protocol in case of non-CPU data
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Jun 20, 2024
1 parent 0e94a00 commit 4c5c8b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/source/format/CDataInterface/PyCapsuleInterface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ protocol (e.g. only add ``__arrow_c_device_array__``, and not add ``__arrow_c_ar
Producers that have data structures that can live both on CPU or non-CPU devices
can implement both versions of the protocol, but the CPU-only versions
(:meth:`__arrow_c_array__` and :meth:`__arrow_c_stream__`) should be guaranteed
to contain valid pointers for CPU memory.
to contain valid pointers for CPU memory (thus, when trying to export non-CPU data,
either raise an error or make a to CPU memory).

Producing the ``ArrowDeviceArray`` and ``ArrowDeviceArrayStream`` structures
is expected to not involve any cross-device copying of data.
Expand Down

0 comments on commit 4c5c8b5

Please sign in to comment.