You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exports the array for consumption by :func:`~array_api.from_dlpack` as a DLPack capsule.
@@ -299,11 +299,6 @@ def __dlpack__(
299
299
----------
300
300
self: array
301
301
array instance.
302
-
max_version: Optional[tuple[int, int]]
303
-
The maximum DLPack version that the consumer (i.e., the caller of
304
-
``__dlpack__``) supports, in the form ``(major, minor)``.
305
-
This method may return that maximum version (recommended if it does
306
-
support that), or a different version.
307
302
stream: Optional[Union[int, Any]]
308
303
for CUDA and ROCm, a Python integer representing a pointer to a stream, on devices that support streams. ``stream`` is provided by the consumer to the producer to instruct the producer to ensure that operations can safely be performed on the array (e.g., by inserting a dependency between streams via "wait for event"). The pointer must be a positive integer or ``-1``. If ``stream`` is ``-1``, the value may be used by the consumer to signal "producer must not perform any synchronization". The ownership of the stream stays with the consumer. On CPU and other device types without streams, only ``None`` is accepted.
309
304
@@ -335,6 +330,11 @@ def __dlpack__(
335
330
(ROCm) is preferred. ``None`` is a safe default for developers who do
336
331
not want to think about stream handling at all, potentially at the
337
332
cost of more synchronization than necessary.
333
+
max_version: Optional[tuple[int, int]]
334
+
The maximum DLPack version that the consumer (i.e., the caller of
335
+
``__dlpack__``) supports, in the form ``(major, minor)``.
336
+
This method may return that maximum version (recommended if it does
0 commit comments