dpctl.memory

Data Parallel Control Memory provides Python objects for untyped USM memory container of bytes for each kind of USM pointers: shared pointers, device pointers and host pointers.

Shared and host pointers are accessible from both host and a device, while device pointers are only accessible from device.

Python objects corresponding to shared and host pointers implement Python simple buffer protocol. It is therefore possible to use these objects to maniputalate USM memory using NumPy or bytearray, memoryview, or array.array classes.

Classes

MemoryUSMDevice

An object representing allocation of SYCL USM-device memory.

MemoryUSMHost

An object representing allocation of SYCL USM-host memory.

MemoryUSMShared

An object representing allocation of SYCL USM-shared memory.

Exceptions

USMAllocationError

An exception raised when Universal Shared Memory (USM) allocation call returns a null pointer, signaling a failure to perform the allocation.