legate.core.PhysicalStore.__dlpack__#
- PhysicalStore.__dlpack__(
- self,
- *,
- stream: int | Any | None = None,
- tuple max_version: tuple[int,
- int] | None = None,
- tuple dl_device: tuple[Enum,
- int] | None = None,
- copy=None,
Exports the store for consumption by from_dlpack() as a DLPack capsule.
For all of the parameters listed below, please consult the Python array API standard for __dlpack__() for further discussion on their meaning and semantics.
- Parameters:
stream (int | Any | None, optional) – The stream to export the store on, if any.
max_version (tuple[int, int] | None, optional) – The maximum DLPack version that the exported capsule should support.
dl_device (tuple[Enum, int] | None, optional) – The device to export the store to.
copy (bool | None, optional) – Whether to copy the underlying data or not.
- Returns:
The DLPack capsule.
- Return type:
PyCapsule
- Raises:
BufferError – If the store cannot be exported as a DLPack capsule with the given options.
See also
https
//data-apis.org/array-api/latest/API_specification/generated/array_api.array.__dlpack__.html#array_api.array.__dlpack__