U
    Ç9%e|  ã                   @   s,   d dl Zd dlZdd„ Zdd„ Zdd„ ZdS )é    Nc                 C   s   t jj | ¡S )zæReturn tensor ids and eager tensors for DeviceData nodes in the
    IR for the passed in lazy tensors.

    TODO: This API is currently ts backend specific. We are working on
    generalizing it to all backends including XLA.
    )ÚtorchÚ_CÚ_lazy_ts_backendZ _get_tensors_ts_device_data_node©Ztensors© r   úV/var/www/html/Darija-Ai-API/env/lib/python3.8/site-packages/torch/_lazy/computation.pyÚget_tensors_ts_device_data_node   s    r   c                 C   s   t jj | ¡S )z4Return the graph hash for the passed in lazy tensors)r   r   Z_lazyZ_get_graph_hashr   r   r   r   Úget_graph_hash   s    r	   c                 C   s   t jj | |¡S )zºRunning the cached computation graph with the given inputs

    TODO: This API is currently ts backend specific. We are working on
    generalizing it to all backends including XLA.
    )r   r   r   Z_run_cached_graph)Zhash_strZgraph_inputsr   r   r   Úrun_cached_graph   s    r
   )Ztorch._C._lazyr   Ztorch._C._lazy_ts_backendr   r	   r
   r   r   r   r   Ú<module>   s   
