dpctl.memory.as_usm_memory¶
- dpctl.memory.as_usm_memory(obj)¶
Converts Python object with
__sycl_usm_array_interface__property to one ofMemoryUSMShared,MemoryUSMDevice, orMemoryUSMHostinstances depending on the type of USM allocation they represent.- Raises:
ValueError – When object does not expose the
__sycl_usm_array_interface__, or it is malformedTypeError – When unexpected types of entries in the interface are encountered
SyclQueueCreationError – When a
dpctl.SyclQueuecould not be created from the information given by the interface