+
    &j`
                        ^ RI Ht ^ RIHt ^ RIt]]]3,          tR R lt ! R R]P                  P                  4      t ! R R	4      t. R
OtR# )    )annotations)SelfNc                   V ^8  d   QhRR/#    return_POOL_HANDLE )formats   "m/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/mtia/mtia_graph.py__annotate__r      s     , ,< ,    c                 >    \         P                  P                  4       # )zD
Return an opaque token representing the id of a graph memory pool.
)torch_C_mtia_graphPoolHandler
   r   r   graph_pool_handler      s    
 88))++r   c                     a  ] tR t^tRtRR V 3R llltR V 3R lltR V 3R lltR V 3R	 lltR
 V 3R llt	R V 3R llt
R V 3R lltRtV ;t# )	MTIAGraphz
Wrapper around a MTIA graph.
c                    V ^8  d   QhRRRR/# )r   
keep_graphboolr   r   r
   )r   s   "r   r   MTIAGraph.__annotate__   s     0 0 0$ 0r   c                	"   < \         SV `  W4      # N)super__new__)clsr   	__class__s   &&r   r   MTIAGraph.__new__   s    ws//r   c                    V ^8  d   QhRRRR/# )r   poolr	   r   Noner
   )r   s   "r   r   r      s     $ $, $4 $r   c                &   < \         SV `  V4       R# )z
Begin capturing a MTIA graph.
N)r   capture_begin)selfr"   r   s   &&r   r%   MTIAGraph.capture_begin   s     	d#r   c                   V ^8  d   QhRR/# r   r   r#   r
   )r   s   "r   r   r   "         T r   c                $   < \         SV `  4        R# )z"
End the capture of a MTIA graph.
N)r   capture_endr&   r   s   &r   r,   MTIAGraph.capture_end"        	r   c                   V ^8  d   QhRR/# r)   r
   )r   s   "r   r   r   (   r*   r   c                $   < \         SV `  4        R# )z&
Instantiate the captured MTIA graph.
N)r   instantiater-   s   &r   r2   MTIAGraph.instantiate(   r/   r   c                   V ^8  d   QhRR/# r)   r
   )r   s   "r   r   r   .   s       r   c                $   < \         SV `  4        R# )z!
Replay the captured MTIA graph.
N)r   replayr-   s   &r   r6   MTIAGraph.replay.   s     	r   c                   V ^8  d   QhRR/# r)   r
   )r   s   "r   r   r   4   s      t r   c                $   < \         SV `  4        R# )z2
Destroy the captured graph and reset the states.
N)r   resetr-   s   &r   r:   MTIAGraph.reset4   s     	r   c                   V ^8  d   QhRR/# r   r
   )r   s   "r   r   r   :   s      l r   c                    < \         SV `  4       # )zH
Return an opaque token representing the id of this graph's memory pool
)r   r"   r-   s   &r   r"   MTIAGraph.pool:   s     w|~r   r
   )F)__name__
__module____qualname____firstlineno____doc__r   r%   r,   r2   r6   r:   r"   __static_attributes____classcell__)r   s   @r   r   r      sN    0 0$ $     r   r   c                  N    ] tR t^At$ RtR]R&   RR R lltR R ltR R	 ltR
t	R# )graphNtorch.mtia.Stream | Nonedefault_capture_streamc               $    V ^8  d   QhRRRRRR/# )r   
mtia_graphr   r"   z_POOL_HANDLE | NonestreamrH   r
   )r   s   "r   r   graph.__annotate__D   s(     % %% "% )	%r   c                	   V P                   P                  f.   \        P                  P	                  4       V P                   n        Vf   RMV3V n        Ve   TMV P                   P                  V n        V P                  f   \        R4      h\        P                  P                  V P                  4      V n	        Wn
        R # )Nzcapture_stream must not be Noner
   )r   rI   r   mtiacurrent_streamr"   capture_streamAssertionErrorrL   
stream_ctxrK   )r&   rK   r"   rL   s   &&&&r   __init__graph.__init__D   s     >>00849JJ4M4M4ODNN1;?<RdW	(Fdnn.S.S 	 & !BCC**++D,?,?@$r   c                   V ^8  d   QhRR/# r)   r
   )r   s   "r   r   rM   V   s     0 04 0r   c                	6   \         P                  P                  4        \         P                  P                  4        V P                  P                  4        V P                  '       d   V P                  ^ ,          MRpV P                  P                  V4       R# )r   N)r   r   )	r   rO   synchronizeempty_cacherS   	__enter__r"   rK   r%   )r&   pool_args   & r   rZ   graph.__enter__V   s[    

 

 !!##'999499Q<&%%h/r   c                    V ^8  d   QhRRRR/# )r   argsobjectr   r#   r
   )r   s   "r   r   rM   _   s     ( (f ( (r   c                	n    V P                   P                  4        V P                  P                  ! V!   R # r   )rK   r,   rS   __exit__)r&   r^   s   &*r   ra   graph.__exit___   s$    ##%  $'r   )rQ   rK   r"   rS   )NN)
r?   r@   rA   rB   rI   __annotations__rT   rZ   ra   rD   r
   r   r   rG   rG   A   s"    7;4;%$0( (r   rG   )r   rG   r   )
__future__r   typing_extensionsr   r   tupleintr	   r   r   
_MTIAGraphr   rG   __all__r
   r   r   <module>rj      sK    " "  S#X,*## *Z (  (Fr   