dpctl.memory.MemoryIPCDevice

class dpctl.memory.MemoryIPCDevice

Class representing memory object backed by an IPC-mapped USM device pointer.

This class is not intended to be instantiated directly.

Methods

copy_from_device(sycl_usm_ary)

Copy SYCL memory underlying the argument object into the memory of the instance

copy_from_host(obj)

Copy content of Python buffer provided by obj to instance memory.

copy_to_host([obj])

Copy content of instance's memory into memory of obj, or allocate NumPy array of obj is None.

get_usm_type([syclobj])

Returns the type of USM allocation using dpctl.SyclContext carried by syclobj keyword argument.

get_usm_type_enum([syclobj])

get_usm_type(syclobj=None)

memset([val])

Populates this USM allocation with given value.

tobytes()

Constructs bytes object populated with copy of USM memory.

Attributes

is_closed

Whether the IPC mapping has been closed.

nbytes

Extent of this USM buffer in bytes.

reference_obj

Reference to the Python object owning this USM buffer.

size

Extent of this USM buffer in bytes.

sycl_context

dpctl.SyclContext the USM pointer is bound to.

sycl_device

dpctl.SyclDevice the USM pointer is bound to.

sycl_queue

dpctl.SyclQueue with dpctl.SyclContext the USM allocation is bound to and dpctl.SyclDevice it was allocated on.

__sycl_usm_array_interface__

Dictionary encoding information about USM allocation.