3
I4W^Õ  ã               @   sX   d dl mZmZmZmZ d dlZd dlmZ d dlm	Z
 ejjedƒ ejje
dƒ dS )é    )Úabsolute_importÚdivisionÚprint_functionÚunicode_literalsN)Ú_from_dlpack)Ú
_to_dlpackzófrom_dlpack(dlpack) -> Tensor

Decodes a DLPack to a tensor.

Args:
    dlpack: a PyCapsule object with the dltensor

The tensor will share the memory with the object represented
in the dlpack.
Note that each dlpack can only be consumed once.
zÍto_dlpack(tensor) -> PyCapsule

Returns a DLPack representing the tensor.

Args:
    tensor: a tensor to be exported

The dlpack shares the tensors memory.
Note that each dlpack can only be consumed once.
)Ú
__future__r   r   r   r   ZtorchZtorch._Cr   Zfrom_dlpackr   Z	to_dlpackZ_CZ_add_docstr© r	   r	   ú3/tmp/pip-build-e66j97b2/torch/torch/utils/dlpack.pyÚ<module>   s   
	