U
    yâhâ  ã                   @   s   d dl Zdd„ Zdd„ ZdS )é    Nc                 C   s   t jj | ¡S )z”Return a text dump of the LTC IR graph in dot format for the tensors.
    The text can be processed by tools like dot to be rendered in pdf,png etc.)ÚtorchÚ_CÚ_lazyZ_get_tensors_dot)Útensors© r   úC/var/www/html/venv/lib/python3.8/site-packages/torch/_lazy/debug.pyÚrender_ir_graph   s    r   c                 C   s>   |dkrt jj | ¡S |dkr,t jj | ¡S td|› ƒ‚dS )z‘Return a dump of the tensors in the specified format.
    Valid format are
    - text: for LTC IR
    - backend: for the activate backend IR
    ÚtextÚbackendzUnrecognized IR format: N)r   r   r   Z_get_tensors_textZ_get_tensors_backendÚRuntimeError)r   Z	ir_formatr   r   r   Údump_ir   s
    r   )Ztorch._C._lazyr   r   r   r   r   r   r   Ú<module>   s   