dpnp.ndarray.__usm_ndarray__

property

property ndarray.__usm_ndarray__

Property to support __usm_ndarray__ protocol.

It assumes to return dpctl.tensor.usm_ndarray instance corresponding to the content of the object.

This property is intended to speed-up conversion from dpnp.ndarray to dpctl.tensor.usm_ndarray passed into dpctl.tensor.asarray() function. The input object that implements __usm_ndarray__ protocol is recognized as owner of USM allocation that is managed by a smart pointer, and asynchronous deallocation will not involve GIL.