torch.utils.dlpack
torch.utils.dlpack.from_dlpack(ext_tensor) -> Tensor
Converts a tensor from an external library into a "torch.Tensor".
The returned PyTorch tensor will share the memory with the input
   tensor (which may have come from another library). Note that in-
   place operations will therefore also affect the data of the input
   tensor. This may lead to unexpected issues (e.g., other libraries
   may have read-only flags or immutable data structures), so the user
   should only do this if they know for sure that this is fine.
Parameters:
      ext_tensor (object with "dlpack" attribute, or a DLPack
      capsule) --
  The tensor or DLPack capsule to convert.

  If "ext_tensor" is a tensor (or ndarray) object, it must support
  the "__dlpack__" protocol (i.e., have a "ext_tensor.__dlpack__"
  method). Otherwise "ext_tensor" may be a DLPack capsule, which
  is an opaque "PyCapsule" instance, typically produced by a
