+
    ˜°³j«V  ã                  ó–  a € 0 t $ ^ RIHt ^ RIt^ RIHt ^ RIHtHtHt ^ RI	H
t
HtHt ^ RIt^ RIHt ]'       d   ^ RIHt ^RIHt . R!Ot]! R4      t]
! R4      t]! ]P.                  R4      '       g^   ]! R4      ]P.                  P0                  R&   ]! R4      ]P.                  P0                  R&   ]! R4      ]P.                  P0                  R&   ^ RIHtHtHt R R ltR R lt ! R R	]4      t ! R R
4      t ]PB                  PD                  ]R]#3,          ,          t$R]%R&   ]R"R R ll4       t&]R"R R ll4       t&R"R R  llt&R# )#é    )ÚannotationsN)ÚCallable)ÚoverloadÚTYPE_CHECKINGÚ	TypeAlias)Ú	ParamSpecÚSelfÚTypeVar)ÚTensor)Ú_POOL_HANDLE)Ú_dummy_typeÚXPUGraphÚgraphÚ_RÚ_PÚ_XpuStreamBaseÚ	_XPUGraphÚ_xpu_graph_pool_handleÚ_xpu_isCurrentStreamCapturing)r   r   r   c               ó   € V ^8„  d   QhRR/# )é   ÚreturnÚbool© )Úformats   "ÚQ/home/luca/screen-checking/.venv/lib/python3.14/site-packages/torch/xpu/graphs.pyÚ__annotate__r   (   s   € ÷ +ñ + Tñ +ó    c                 ó   € \        4       # )zÁReturn True if XPU graph capture is underway on the current XPU stream, False otherwise.

If a XPU context does not exist on the current device, returns False without initializing the context.
)r   r   r   r   Úis_current_stream_capturingr    (   s   € ô
 )Ó*Ð*r   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   r   0   s   € ÷ <ñ <˜<ñ <r   c                 óP   € \         P                  P                  \        4       4      # )zBReturn an opaque token representing the id of a graph memory pool.)ÚtorchÚxpur   r   r   r   r   Úgraph_pool_handler&   0   s   € ä�9‰9×!Ñ!Ô"8Ó":Ó;Ð;r   c                  óî   a € ] tR t^5tRtRR V 3R lll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 V 3R lltR V 3R lltR V 3R lltRtV ;t# )r   aÔ  Wrapper around a XPU graph.

Arguments:
    keep_graph (bool, optional): If ``keep_graph=False``, the
        executable command graph will be instantiated on GPU at the end of
        ``capture_end`` and the underlying modifiable command graph will be
        destroyed. Note that the executable command graph will not be
        instantiated at the end of ``capture_end`` in this
        case. Instead, it will be instantiated via an explicit called
        to ``instantiate`` or automatically on the first call to
        ``replay`` if ``instantiate`` was not already called. Calling
        ``instantiate`` manually before ``replay`` is recommended to
        prevent increased latency on the first call to ``replay``.

c               ó    € V ^8„  d   QhRRRR/# )r   Ú
keep_graphr   r   r	   r   )r   s   "r   r   ÚXPUGraph.__annotate__F   s   € ÷ 0ñ 0 ð 0°$ñ 0r   c                	ó"   <€ \         SV `  W4      # ©N)ÚsuperÚ__new__)Úclsr)   Ú	__class__s   &&€r   r.   ÚXPUGraph.__new__F   s   ø€ Ü‰w‰˜sÓ/Ð/r   c               ó    € V ^8„  d   QhRRRR/# )r   Úpoolú_POOL_HANDLE | Noner   ÚNoner   )r   s   "r   r   r*   I   s   € ÷ )ñ )Ð"5ð )Àñ )r   c                ó(   <€ \         SV `  VR7       R# )a¡  Begin capturing XPU work on the current xpu stream.

Typically, you shouldn't call ``capture_begin`` yourself.
Use :class:`~torch.xpu.graph`, which call ``capture_begin`` internally.

Arguments:
    pool (optional): Token (returned by :func:`~torch.xpu.graph_pool_handle` or
        :meth:`other_Graph_instance.pool()<torch.xpu.XPUGraph.pool>`) that hints this graph may share memory
        with the indicated pool.
©r3   N)r-   Úcapture_begin)Úselfr3   r0   s   &&€r   r8   ÚXPUGraph.capture_beginI   s   ø€ ô 	‰Ñ 4ÐÖ(r   c               ó   € V ^8„  d   QhRR/# ©r   r   r5   r   )r   s   "r   r   r*   V   s   € ÷ ñ ˜Tñ r   c                ó$   <€ \         SV `  4        R# )zïEnd XPU graph capture on the current stream.

After ``capture_end``, ``replay`` may be called on this instance.

Typically, you shouldn't call ``capture_end`` yourself.
Use :class:`~torch.xpu.graph`, which call ``capture_end`` internally.
N)r-   Úcapture_end©r9   r0   s   &€r   r>   ÚXPUGraph.capture_endV   s   ø€ ô 	‰ÑÖr   c               ó   € V ^8„  d   QhRR/# r<   r   )r   s   "r   r   r*   `   s   € ÷ ñ ˜Tñ r   c                ó$   <€ \         SV `  4        R# )a  Instantiate the XPU graph. Will be called by
``capture_end`` if ``keep_graph=False``, or by ``replay`` if
``keep_graph=True`` and ``instantiate`` has not already been
explicitly called. Does not destroy the xpu modify command graph returned
by ``raw_xpu_graph``.
N)r-   Úinstantiater?   s   &€r   rC   ÚXPUGraph.instantiate`   s   ø€ ô 	‰ÑÖr   c               ó   € V ^8„  d   QhRR/# r<   r   )r   s   "r   r   r*   i   s   € ÷ ñ ˜ñ r   c                ó$   <€ \         SV `  4        R# )z+Replay the XPU work captured by this graph.N)r-   Úreplayr?   s   &€r   rG   ÚXPUGraph.replayi   s   ø€ ä‰‰Ör   c               ó   € V ^8„  d   QhRR/# r<   r   )r   s   "r   r   r*   m   s   € ÷ ñ �tñ r   c                ó$   <€ \         SV `  4        R# )z1Delete the graph currently held by this instance.N)r-   Úresetr?   s   &€r   rK   ÚXPUGraph.resetm   s   ø€ ä‰‰Žr   c               ó   € V ^8„  d   QhRR/# r"   r   )r   s   "r   r   r*   q   s   € ÷ ñ �lñ r   c                ó    <€ \         SV `  4       # )zÌReturn an opaque token representing the id of this graph's memory pool.

This id can optionally be passed to another graph's ``capture_begin``,
which hints the other graph may share the same memory pool.
)r-   r3   r?   s   &€r   r3   ÚXPUGraph.poolq   s   ø€ ô ‰w‰|‹~Ðr   c               ó   € V ^8„  d   QhRR/# r<   r   )r   s   "r   r   r*   y   s   € ÷ +ñ + 4ñ +r   c                ó    <€ \         SV `  4       # )z.Enable debugging mode for XPUGraph.debug_dump.)r-   Úenable_debug_moder?   s   &€r   rR   ÚXPUGraph.enable_debug_modey   s   ø€ ä‰wÑ(Ó*Ð*r   c               ó    € V ^8„  d   QhRRRR/# )r   Ú
debug_pathÚstrr   r5   r   )r   s   "r   r   r*   }   s   € ÷ .ñ . Sð .¨Tñ .r   c                ó"   <€ \         SV `  V4      # )z­
Arguments:
    debug_path (required): Path to dump the graph to.

Calls a debugging function to dump the graph if the debugging is
enabled via XPUGraph.enable_debug_mode()
)r-   Ú
debug_dump)r9   rU   r0   s   &&€r   rX   ÚXPUGraph.debug_dump}   s   ø€ ô ‰wÑ! *Ó-Ð-r   c               ó   € V ^8„  d   QhRR/# ©r   r   Úintr   )r   s   "r   r   r*   ‡   s   € ÷ 'ñ '˜sñ 'r   c                ó    <€ \         SV `  4       # )zuReturns the underlying xpuGraph_t. ``keep_graph`` must be True.

XPU doesn't provide APIs to manipulate this object.
)r-   Úraw_xpu_graphr?   s   &€r   r^   ÚXPUGraph.raw_xpu_graph‡   s   ø€ ô
 ‰wÑ$Ó&Ð&r   c               ó   € V ^8„  d   QhRR/# r[   r   )r   s   "r   r   r*   Ž   s   € ÷ ,ñ , Cñ ,r   c                ó    <€ \         SV `  4       # )až  Returns the underlying xpuGraphExec_t. ``instantiate`` must have been called if ``keep_graph`` is True, or ``capture_end`` must have been called if ``keep_graph`` is False. If you call ``instantiate()`` after ``raw_xpu_graph_exec()``, the previously returned xpuGraphExec_t will be destroyed. It is your responsibility not to use this object after destruction.

XPU doesn't provide APIs to manipulate this object.
)r-   Úraw_xpu_graph_execr?   s   &€r   rb   ÚXPUGraph.raw_xpu_graph_execŽ   s   ø€ ô
 ‰wÑ)Ó+Ð+r   r   )Fr,   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r.   r8   r>   rC   rG   rK   r3   rR   rX   r^   rb   Ú__static_attributes__Ú__classcell__)r0   s   @r   r   r   5   sv   ø† ñ÷ 0ò 0÷)ò )÷ð ÷ð ÷ð ÷ð ÷ð ÷+ð +÷.ð .÷'ð '÷,ö ,r   c                  óR   € ] tR t^–t$ RtRtR]R&   RR R lltR R ltR	 R
 lt	Rt
R# )r   a^  Context-manager that captures XPU work into a :class:`torch.xpu.XPUGraph` object for later replay.

Arguments:
    xpu_graph (torch.xpu.XPUGraph): Graph object used for capture.
    pool (optional): Opaque token (returned by a call to :func:`~torch.xpu.graph_pool_handle()` or
        :meth:`other_Graph_instance.pool()<torch.xpu.XPUGraph.pool>`) hinting this graph's capture
        may share memory from the specified pool.
    stream (torch.xpu.Stream, optional): If supplied, will be set as the current stream in the context.
        If not supplied, ``graph`` sets its own internal side stream as the current stream in the context.

.. note::
    For effective memory sharing, if you pass a ``pool`` used by a previous capture and the previous capture
    used an explicit ``stream`` argument, you should pass the same ``stream`` argument to this capture.

Nútorch.xpu.Stream | NoneÚdefault_capture_streamc               ó$   € V ^8„  d   QhRRRRRR/# )r   Ú	xpu_graphr   r3   r4   Ústreamrl   r   )r   s   "r   r   Úgraph.__annotate__©   s(   € ÷ #ñ #àð#ð "ð#ð (ñ	#r   c                	óN  € 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V P                  V n        Wn	        R # )Nzcapture_stream must not be Noner   )
r0   rm   r$   r%   ÚStreamr3   Úcapture_streamÚAssertionErrorÚ
stream_ctxro   )r9   ro   r3   rp   s   &&&&r   Ú__init__Úgraph.__init__©   s„   € ð �>‰>×0Ñ0Ò8Ü49·I±I×4DÑ4DÓ4FˆD�N‰NÔ1à;?º<±RÈdÈWˆŒ	àÒ(‰F¨d¯n©n×.SÑ.Sð 	Ôð ×ÑÒ&Ü Ð!BÓCÐCØ×-Ñ-ˆŒØ"Žr   c               ó   € V ^8„  d   QhRR/# r<   r   )r   s   "r   r   rq   ¾   s   € ÷ 1ñ 1˜4ñ 1r   c                	óú   € \         P                  P                  4        \         P                  P                  4        V P                  P                  4        V P                  P                  ! V P                  !   R # r,   )	r$   r%   ÚsynchronizeÚempty_cacherv   Ú	__enter__ro   r8   r3   )r9   s   &r   r}   Úgraph.__enter__¾   sH   € ä�	‰	×ÑÔä�	‰	×ÑÔØ�‰×!Ñ!Ô#à�‰×$Ò$ d§i¡iÔ0r   c               ó    € V ^8„  d   QhRRRR/# )r   ÚargsÚobjectr   r5   r   )r   s   "r   r   rq   Ç   s   € ÷ (ñ (˜fð (¨ñ (r   c                	ón   € V P                   P                  4        V P                  P                  ! V!   R # r,   )ro   r>   rv   Ú__exit__)r9   r€   s   &*r   rƒ   Úgraph.__exit__Ç   s$   € Ø�‰×"Ñ"Ô$Ø�‰× Ò  $Ô'r   )rt   r3   rv   ro   )NN)rd   re   rf   rg   rh   rm   Ú__annotations__rw   r}   rƒ   ri   r   r   r   r   r   –   s)   ‡ ñð  7;ÐÐ3Ó:÷#õ*1÷(ñ (r   .r   Ú_ModuleOrCallablec               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r   Ú	callablesr†   Úsample_argsútuple[Tensor, ...]Únum_warmup_itersr\   Úallow_unused_inputr   r3   r4   r   r   )r   s   "r   r   r   Ð   sD   € ÷ ñ Ø ðà#ðð ðð ð	ð
 ðð ñr   c                ó   € R # r,   r   ©rˆ   r‰   r‹   rŒ   r3   s   &&&&&r   Úmake_graphed_callablesr�   Ï   s   € ñ r   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r   rˆ   ztuple[_ModuleOrCallable, ...]r‰   ztuple[tuple[Tensor, ...], ...]r‹   r\   rŒ   r   r3   r4   r   r   )r   s   "r   r   r   Ú   sD   € ÷ (ñ (Ø,ð(à/ð(ð ð(ð ð	(ð
 ð(ð #ñ(r   c                ó   € R # r,   r   rŽ   s   &&&&&r   r�   r�   Ù   s   € ñ %(r   c               ó0   € V ^8„  d   QhRRRRRRRRR	R
RR/# )r   rˆ   z1_ModuleOrCallable | tuple[_ModuleOrCallable, ...]r‰   z3tuple[Tensor, ...] | tuple[tuple[Tensor, ...], ...]r‹   r\   rŒ   r   r3   r4   r   r   )r   s   "r   r   r   ã   sL   € ÷ nñ nØ@ðnàDðnð ðnð ð	nð
 ðnð 7ñnr   c                ó  € \         P                  ! R4      '       d'   \         P                  ! 4       '       d   \        R4      hRp\	        V \
        4      '       g0   RpV 3p \        P                  ! \
        \        R3,          V4      3pM5\        P                  ! \
        \
        \        R3,          R3,          V4      p. p\        W4       EFq  w  r‰\	        V\         P                  P                  4      '       d»   \        VP                  4      ^ 8X  d5   \        VP                  4      ^ 8X  d   \        VP                  4      ^ 8X  g   \        R4      h\         ;QJ d*    R VP#                  4        4       F  '       d   K   RM	  RM! R VP#                  4        4       4      '       g   \        R4      h\         P$                  P&                  P(                  ! V	!  p
VP+                  \        V
4      4       \         ;QJ d    R V
 4       F  '       d   K   RM	  RM! R V
 4       4      '       d   EKi  \-        R4      h	  V U	u. uF  p	\        V	4      NK  	  pp	V  Uu. uFH  p\	        V\         P                  P                  4      '       d   \        VP/                  4       4      MRNKJ  	  pp\1        \        V 4      4       Uu. uF  pW},          WÍ,          ,           NK  	  pp\1        \        V 4      4       Uu. uF!  p\         P2                  P5                  4       NK#  	  pp\1        \        V 4      4       Uu. uF!  p\         P2                  P5                  4       NK#  	  ppVf   \7        4       MTp\         P2                  P9                  4        \         P2                  P;                  \         P2                  P=                  4       4      ;_uu_ 4        \        WV4       EF  w  pp	pRRRppp\1        V4       Fæ  p\         P$                  P&                  P?                  V! V	!  4      p\
        ;QJ d    . R	 V 4       F  NK  	  5M! R	 V 4       4      p\        V4      ^ 8”  g   Kn  \         P@                  PC                  T\
        ;QJ d    . R
 V 4       F  NK  	  5M! R
 V 4       4      \
        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      RVR7      pKè  	  VVV3 F  p?K  	  EK  	  RRR4       \         P2                  P9                  4        . p. p\        WV4       F–  w  pp	p\         P2                  PE                  VVR7      ;_uu_ 4        V! V	!  pRRR4       \         P$                  P&                  PG                  X4      w  ppVP+                  \        V4      4       VP+                  V4       K˜  	  . p. p \        \I        V4      \I        V4      \I        V4      4       EF   w  pp!p"\
        ;QJ d    . R V! 4       F  NK  	  5M! R V! 4       4      p#\
        ;QJ d    . R V! 4       F  NK  	  5M! R V! 4       4      pRp\        V4      ^ 8”  d«   \         P2                  PE                  V"VR7      ;_uu_ 4        \         P@                  PC                  T\
        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      \
        ;QJ d    . R V# 4       F  NK  	  5M! R V# 4       4      RVR7      pRRR4       . p$^ p%V FM  p&V&PJ                  '       d(   Ve$   V$P+                  VV%,          4       V%^,          p%K<  V$P+                  R4       KO  	  \        V$4      p$VP+                  V#4       V P+                  V$4       EK£  	  VPM                  4        V PM                  4        R R lp'. p(\O        V 4       FÊ  w  ppV'! VV,          VV,          WÍ,          W½,          VV,          Wí,          VV,          VV,          V V,          4	      p)\	        V\         P                  P                  4      '       d>   R R lp*V*! VVPP                  V)VPR                  4      Vn)        V(P+                  V4       K¹  V(P+                  V)4       KÌ  	  V'       d
   V(^ ,          # \        V(4      # u up	i u upi u upi u upi u upi   + '       g   i     ELà; i  + '       g   i     EL‡; i  + '       g   i     ELø; i)aë  Accept callables (functions or :class:`nn.Module<torch.nn.Module>`\ s) and returns graphed versions.

Each graphed callable's forward pass runs its source callable's
forward XPU work as a XPU graph inside a single autograd node.

The graphed callable's forward pass also appends
a backward node to the autograd graph. During backward, this node runs the
callable's backward work as a XPU graph.

Therefore, each graphed callable should be a drop-in replacement for its source callable
in an autograd-enabled training loop.

See :ref:`Partial-network capture<partial-network-capture>` for detailed use and constraints.

If you pass a tuple of several callables, their captures will use the same memory pool.

Arguments:
    callables (torch.nn.Module or Python function, or tuple of these): Callable or callables to graph.
        If you pass a tuple of callables, their order in the tuple must be the same order they'll run
        in the live workload.
    sample_args (tuple of Tensors, or tuple of tuples of Tensors): Samples args for each callable.
        If a single callable was passed, ``sample_args`` must be a single tuple of argument Tensors.
        If a tuple of callables was passed, ``sample_args`` must be tuple of tuples of argument Tensors.
    num_warmup_iters (int): The number of warmup iterations. Currently, ``DataDistributedParallel`` needs
        11 iterations for warm up. Default: ``3``.
    allow_unused_input (bool): If False, specifying inputs that were not used when computing outputs
        (and therefore their grad is always zero) is an error. Defaults to False.
    pool (optional): Token (returned by :func:`~torch.xpu.graph_pool_handle` or
        :meth:`other_Graph_instance.pool()<torch.xpu.XPUGraph.pool>`) that hints this graph may share memory
        with the indicated pool.
.. note::
    The ``requires_grad`` state of each Tensor in ``sample_args`` must match the state
    that's expected for the corresponding real input in the training loop.

.. warning::
    This API is in beta and may change in future releases.

.. warning::
    ``sample_args`` for each callable must contain only Tensors. Other types are not allowed.

.. warning::
    Returned callables do not support higher order differentiation (e.g., double backward).

.. warning::
    In any :class:`~torch.nn.Module` passed to :func:`~make_graphed_callables`, only parameters
    may be trainable. Buffers must have ``requires_grad=False``.

.. warning::
    After you pass a :class:`torch.nn.Module` through :func:`~make_graphed_callables`,
    you may not add or remove any of that Module's parameters or buffers.

.. warning::
    :class:`torch.nn.Module`\s passed to :func:`~torch.xpu.make_graphed_callables` must not have module hooks
    registered on them at the time they are passed. However, registering hooks on modules *after* passing them
    through :func:`~torch.xpu.make_graphed_callables` is allowed.

.. warning::
    When running a graphed callable, you must pass its arguments in the same order and format
    they appeared in that callable's ``sample_args``.

.. warning::
    The automatic mixed precision is supported in :func:`~torch.xpu.make_graphed_callables` only with disabled
    caching. The context manager `torch.amp.autocast()` must have `cache_enabled=False`.
r%   z_make_graphed_callables does not support the autocast caching. Please set `cache_enabled=False`.FT.c              3  ó<   "  € T F  qP                   R J x € K  	  R# 5i)FN©Úrequires_grad©Ú.0Úbs   & r   Ú	<genexpr>Ú)make_graphed_callables.<locals>.<genexpr>F  s   é € ÐE¹°A—‘¨%Õ/»ùs   ‚c              3  óV   "  € T F  p\        V\        P                  4      x € K!  	  R # 5ir,   )Ú
isinstancer$   r   )r˜   Úargs   & r   rš   r›   N  s   é € ÐH¹K°S”:˜c¤5§<¡<×0Ð0»Kùs   ‚')Nc              3  óL   "  € T F  qP                   '       g   K  Vx € K  	  R # 5ir,   r•   ©r˜   Úos   & r   rš   r›   n  s   é € Ð$K±¨1¿?½?§Q¢Q³ùó   ‚$š
$c              3  óL   "  € T F  qP                   '       g   K  Vx € K  	  R # 5ir,   r•   ©r˜   Úis   & r   rš   r›   r  s   é € ð %Ù'; !¿½ŸAšAÓ';ùr¢   c              3  ót   "  € T F.  qP                   '       g   K  \        P                  ! V4      x € K0  	  R # 5ir,   ©r–   r$   Ú
empty_liker    s   & r   rš   r›   u  s(   é € ð +Ù9@°AÇOÅOÔ/œE×,Ò,¨Q×/Ð/»ùs   ‚8š8)ÚoutputsÚinputsÚgrad_outputsÚonly_inputsÚallow_unusedr7   c              3  ót   "  € T F.  qP                   '       d   \        P                  ! V4      MR x € K0  	  R # 5ir,   r§   r    s   & r   rš   r›   ”  s)   é € ð $
ÙFTÀ§?§? ?ŒE×Ò˜QÔ¸Ô<Ãnùs   ‚68c              3  óL   "  € T F  qP                   '       g   K  Vx € K  	  R # 5ir,   r•   r    s   & r   rš   r›   ˜  s   é € ÐJ© 1¿/½/ŸQšQ«ùr¢   c              3  óL   "  € T F  qP                   '       g   K  Vx € K  	  R # 5ir,   r•   r¤   s   & r   rš   r›   ž  s   é € Ð TÑ,@ qÇOÅO§¢Ó,@ùr¢   c              3  ó0   "  € T F  qf   K  Vx € K  	  R # 5ir,   r   r    s   & r   rš   r›   Ÿ  s   é € Ð&WÑ2E¨Q§q¢qÓ2Eùs   ‚Œ
c               ó@   € V ^8„  d   QhRRRRRRRRRR	R
RRRRRRRRR/
# )r   Ú	fwd_graphr   Ú	bwd_graphÚmodule_paramsztuple[torch.nn.Parameter, ...]Úlen_user_argsr\   Úoutput_unflatten_specztorch.utils._pytree.TreeSpecÚstatic_input_surfacerŠ   Ústatic_outputsÚstatic_grad_outputsztuple[Tensor | None, ...]Ústatic_grad_inputsr   zCallable[..., object]r   )r   s   "r   r   Ú,make_graphed_callables.<locals>.__annotate__µ  sl   € ÷ 2ñ 2Øð2àð2ð 6ð2ð ð	2ð
  <ð2ð 1ð2ð +ð2ð 7ð2ð /ð2ð 
ñ2r   c	           	     óˆ   a aaaaaaaaa
€  ! VV VVVVV3R  lR\         P                  P                  4      o
R V
VV3R llp	V	# )c                  ó    <€ ] tR tRt]R VVVV3R ll4       t]]P                  P                  P                  R V VV3R ll4       4       t
RtR# )ÚOmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.GraphediÀ  c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úctxr�   rª   r   r   rŠ   r   )r   s   "r   r   Ú\make_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.__annotate__Ã  s'   € ÷ Añ A˜Vð A¨fð AÐ9Kñ Ar   c                	ó‚  <€ \        S4       FS  pSV,          P                  4       W,          P                  4       8w  g   K5  SV,          P                  W,          4       KU  	  SP                  4        \	        S\
        4      '       g   \        R 4      h\
        ;QJ d    . R S 4       F  NK  	  5# ! R S 4       4      # )zstatic_outputs must be a tuplec              3  ó@   "  € T F  qP                  4       x € K  	  R # 5ir,   ©Údetachr    s   & r   rš   Újmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.forward.<locals>.<genexpr>Ë  s   é € Ð@±¨AŸX™XŸZ˜Z³ùs   ‚)ÚrangeÚdata_ptrÚcopy_rG   r�   ÚtupleÚRuntimeError)rÁ   rª   r¥   r³   r¶   r¸   r¹   s   &* €€€€r   ÚforwardÚWmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.forwardÁ  s“   ø€ ô ˜}Ö-�AØ+¨AÕ.×7Ñ7Ó9¸V½Y×=OÑ=OÓ=QÖQØ,¨QÕ/×5Ñ5°fµiÖ@ñ .ð × Ñ Ô"Ü! .´%×8Ò8Ü&Ð'GÓHÐHß”uÑ@±Ó@—uÐ@�uÑ@±Ó@Ó@Ð@r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rÁ   r�   Úgradsr   r   rŠ   r   )r   s   "r   r   rÂ   Ð  s"   € ÷ ñ ˜fð ¨fð Ð9Kñ r   c                	óØ  <€ \        V4      \        S4      8w  d$   \        R \        S4       R\        V4       24      h\        SV4       FA  w  r#Vf   K  VP                  4       VP                  4       8w  g   K0  VP	                  V4       KC  	  SP                  4        \        S\        4      '       g   \        R4      h\        ;QJ d    . R S 4       F  NK  	  5# ! R S 4       4      # )z	Expected z gradients but got z"static_grad_inputs must be a tuplec              3  óL   "  € T F  qe   VP                  4       MTx € K  	  R # 5ir,   rÅ   r—   s   & r   rš   Úkmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.backward.<locals>.<genexpr>Ý  s!   é € ð Ù@R¸1¢-�A—H‘H”J°QÔ6Ó@Rùs   ‚"$)ÚlenrÌ   ÚziprÉ   rÊ   rG   r�   rË   )rÁ   rÐ   ÚgÚgradr´   r»   rº   s   &*  €€€r   ÚbackwardÚXmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.backwardÍ  sØ   ø€ ô �u“:¤Ð%8Ó!9Ô9Ü&Ø#¤CÐ(;Ó$<Ð#=Ð=PÔQTÐUZÓQ[ÐP\Ð]óð ô  #Ð#6¸Ö>‘G�AØ”}ØŸ:™:›<¨4¯=©=«?Ö:ØŸG™G DžMñ  ?ð × Ñ Ô"ä!Ð"4´e×<Ò<Ü&Ð'KÓLÐLß”uñ Ù@Ró—uð �uñ Ù@Róó ð r   r   N)rd   re   rf   rg   ÚstaticmethodrÍ   r$   ÚautogradÚfunctionÚonce_differentiablerØ   ri   )r´   r³   r¶   r»   rº   r¸   r¹   s   €€€€€€€r   ÚGraphedr¿   À  sN   ø† Ø÷Aò Aó ðAð Ø�^‰^×$Ñ$×8Ñ8÷ñ ó 9ó ôr   rÞ   c               ó    € V ^8„  d   QhRRRR/# )r   Ú	user_argsr�   r   r   )r   s   "r   r   ÚTmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.__annotate__á  s   € ÷ 	Rñ 	R vð 	R°&ñ 	Rr   c                 óè   <€ \         P                  P                  P                  ! V !  pSP                  ! \        V4      S,           !  p\         P                  P                  P                  VS4      # r,   )r$   ÚutilsÚ_pytreeÚarg_tree_leavesÚapplyrË   Útree_unflatten)rà   Úflatten_user_argsÚoutrÞ   rµ   r·   s   *  €€€r   ÚfunctionalizedÚVmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.functionalizedá  sU   ø€ ä %§¡× 3Ñ 3× CÒ CÀYÑ OÐØ—-’-¤%Ð(9Ó":¸]Õ"JÑLˆCÜ—;‘;×&Ñ&×5Ñ5°cÐ;PÓQÐQr   )r$   rÛ   ÚFunction)r³   r´   rµ   r¶   r·   r¸   r¹   rº   r»   rê   rÞ   s   fffffffff @r   Úmake_graphed_autograd_functionÚ>make_graphed_callables.<locals>.make_graphed_autograd_functionµ  s4   ÿù€ ÷	õ 	”e—n‘n×-Ñ-ô 	÷B	Rò 	Rð Ðr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   Úfuncztorch.nn.ModuleÚgraph_training_stater   ÚgraphedzCallable[_P, _R]Úorig_fwdr   r   )r   s   "r   r   r¼   ù  s:   € ÷ ñ Ø%ðà&*ðð *ðð +ð	ð
 "ñr   c                ó&   a aaa€ R  V VVV3R llpV# )c               ó$   € V ^8„  d   QhRRRRRR/# )r   rà   z_P.argsÚuser_kwargsz	_P.kwargsr   r   r   )r   s   "r   r   ÚJmake_graphed_callables.<locals>.make_graphed_forward.<locals>.__annotate__ÿ  s&   € ÷ Cñ C¨ð CÀ	ð CÈbñ Cr   c                 óF   <€ SP                   S8X  d	   S! V / VB # S! V / VB # r,   )Útraining)rà   rö   rð   rñ   rò   ró   s   *,€€€€r   Únew_fwdÚEmake_graphed_callables.<locals>.make_graphed_forward.<locals>.new_fwdÿ  s0   ø€ Ø—}‘}Ð(<Ô<Ù&¨	ÐA°[ÑAÐAá'¨ÐB°kÑBÐBr   r   )rð   rñ   rò   ró   rú   s   ffff r   Úmake_graphed_forwardÚ4make_graphed_callables.<locals>.make_graphed_forwardù  s   û€ ÷Có Cð �r   z§Modules must not have hooks registered at the time they are passed. However, registering hooks on modules after passing them through make_graphed_callables is allowed.zœIn any :class:`~torch.nn.Module` passed to :func:`~make_graphed_callables`, only parameters may be trainable. All buffers must have ``requires_grad=False``.zfIn the beta API, sample_args for each callable must contain only Tensors. Other types are not allowed.r   )*r$   Úis_autocast_enabledÚis_autocast_cache_enabledrÌ   r�   rË   ÚtypingÚcastr   rÕ   ÚnnÚModulerÔ   Ú_backward_hooksÚ_forward_hooksÚ_forward_pre_hooksÚallÚbuffersrã   rä   rå   ÚappendÚ	TypeErrorÚ
parametersrÈ   r%   r   r&   r{   rp   rs   Útree_leavesrÛ   r×   r   Útree_flattenÚreversedr–   ÚreverseÚ	enumeraterù   rÍ   )+rˆ   r‰   r‹   rŒ   r3   Újust_one_callableÚ_sample_argsÚflatten_sample_argsÚcr€   Úflatten_argÚper_callable_len_user_argsÚper_callable_module_paramsr¥   Ú"per_callable_static_input_surfacesÚ_Ú
fwd_graphsÚ
bwd_graphsÚmempoolrð   r¸   Úgrad_inputsr©   Úoutputs_gradÚvÚper_callable_static_outputsÚ"per_callable_output_unflatten_specr³   Úfunc_outputsÚflatten_outputsÚspecÚ per_callable_static_grad_outputsÚper_callable_static_grad_inputsr¹   r´   rº   r»   Úgrad_idxrž   rí   Úretrò   rü   s+   &&&&&                                      r   r�   r�   ã   sm  € ôN × Ò  ×'Ò'¬E×,KÒ,K×,MÒ,MÜØmó
ð 	
ð Ðô �i¤×'Ò'Ø ÐØ�Lˆ	ÜŸš¤E¬&°#¨+Õ$6¸ÓDÐF‰ä—{’{¤5¬¬v°s¨{Õ);¸SÐ)@Õ#AÀ;ÓOˆàÐä�y×/‰ˆÜ�aœŸ™Ÿ™×)Ò)ä�A×%Ñ%Ó&¨!Ô+Ü˜×(Ñ(Ó)¨QÔ.Ü˜×,Ñ,Ó-°Ô2ä"ðaóð ÷ “3ÑE¸¿¹¼ÓE—3—3’3ÑE¸¿¹¼ÓE×EÒEÜ"ð1óð ô
 —k‘k×)Ñ)×9Ò9¸4Ñ@ˆØ×"Ñ"¤5¨Ó#5Ô6ß‹sÑH¹KÓH�s�sŠsÑH¹KÓH×HÕHÜð^óð ñ) 0ñ6 9LÓ!LÑ8K°¤# d¦)Ñ8KÐÐ!Lñ ó"áˆAô ",¨A¬u¯x©x¯©×!?Ò!?Œˆa�l‰l‹nÔÀRÒGÙð ð "ô ”s˜9“~Ô&ó*á&ˆAð 	ÕÐ!;Õ!>×>Ð>Ù&ð 'ð *ô
 16´c¸)³nÔ0EÓFÑ0E¨1”%—)‘)×$Ñ$Ö&Ñ0E€JÐFÜ05´c¸)³nÔ0EÓFÑ0E¨1”%—)‘)×$Ñ$Ö&Ñ0E€JÐFà%)¢\ÔÔ!°t€Gô 
‡I�I×ÑÔÜ	�‰×	Ñ	œ%Ÿ)™)×*Ñ*Ó,×	-Õ	-Ü03ØÐ%G÷1
Ñ,ˆD�$Ð,ð 26°t¸T ,˜ˆKÜÐ+Ö,�ÜŸ+™+×-Ñ-×9Ñ9¹$À¹+ÓF�ß$œuÑ$K±Ó$KŸu™uÑ$K±Ó$KÓK�Ü�|Ó$ qÖ(Ü"'§.¡.×"5Ñ"5Ø ,ß$œuñ %Ù';ó%Ÿu™uñ %Ù';ó%ó  ÷ &+¤Uñ +Ù9@ó+§U¡Uñ +Ù9@ó+ó &ð %)Ø%7ð #6ó 
#’Kñ	 -ð ˜|¨[Ó9�Úô :ñ'1
÷ 
.ô. 
‡I�I×ÑÔð #%ÐØ)+Ð&Ü!$ Y¸jÖ!IÑˆˆd�Iä�Y‰Y�_‰_˜Y¨Wˆ_×5Õ5Ù ™;ˆL÷ 6ô !&§¡× 3Ñ 3× @Ñ @ÀÓ NÑˆ˜Ø#×*Ñ*¬5°Ó+AÔBØ*×1Ñ1°$Ö7ñ "Jð (*Ð$Ø&(Ð#Ü;>ÜÐ3Ó4ÜÐ,Ó-Ü�Ó÷<Ñ7Ð˜n¨i÷
 $œeñ $
ÙFTó$
Ÿe™eñ $
ÙFTó$
ó 
Ð÷ ”uÑJ©ÓJ—u‘uÑJ©ÓJÓJˆØˆÜˆ|Ó˜qÔ Ü—‘—‘ °�×9Õ9Ü#Ÿn™n×1Ñ1Ø(ß œ5Ñ TÑ,@Ó TŸ5™5Ñ TÑ,@Ó TÓTß!&¤Ñ&WÑ2EÓ&W§¡Ñ&WÑ2EÓ&WÓ!WØ $Ø!3ð 2ó �÷ :ð  ÐØˆÛ'ˆCØ× × Ð  [Ò%<Ø"×)Ñ)¨+°hÕ*?Ô@Ø˜A•’à"×)Ñ)¨$Ö/ñ (ô #Ð#5Ó6Ðà(×/Ñ/Ð0CÔDØ'×.Ñ.Ð/A×BñA<ðF %×,Ñ,Ô.Ø#×+Ñ+Ô-õ2ðh $&€CÜ˜YÖ'‰ˆˆ4Ù0Ø�q�MØ�q�MØ&Õ)Ø&Õ)Ø.¨qÕ1Ø.Õ1Ø'¨Õ*Ø,¨QÕ/Ø+¨AÕ.ó

ˆô �dœEŸH™HŸO™O×,Ò,õñ 0Ø�d—m‘m W¨d¯l©lóˆDŒLð �J‰J�tÖà�J‰J�wÖñE (÷H Ø�1�vˆä�‹:Ðùòw "Mùò"ùò*ùò
 GùÚF÷ 
.×	-Ð	-ú÷< 6×5Ð5ú÷, :×9Ð9ús]   Éb5É Ab:Ëb?Ë<'cÌ;'c	ÏBcÑ)$cÒ*cÒ9>cÕc"ÚAc6Û(c6ãc	ã"c3ã6d)r    r&   r   r   r�   )é   FN)'Ú__conditional_annotations__Ú
__future__r   r   Úcollections.abcr   r   r   r   Útyping_extensionsr   r	   r
   r$   r   Ú	torch.xpur   Ú_utilsr   Ú__all__r   r   ÚhasattrÚ_CÚ__dict__Útorch._Cr   r   r   r    r&   r   r   r  r  r�   r†   r…   r�   )r*  s   @r   Ú<module>r5     s1  øðß "Ð "ã Ý $ß 5Ñ 5ß 6Ñ 6ã Ý ÷ Ý&å  ò€ñ ˆTƒ]€Ùˆtƒ_€áˆu�x‰xÐ)×*Ò*á%0°Ó%=€E‡H�H×Ñ�kÑ"Ù2=Ð>VÓ2W€E‡H�H×ÑÐ.Ñ/Ù9DØ'ó:€E‡H�H×ÑÐ5Ñ6÷ VÑ Uõ+õ<ô
^,ˆyô ^,÷B3(ñ 3(ðl  %Ÿx™xŸ™°¸#¸v¸+Õ1FÕFÐ �9Ó Fð 
öó 
ðð 
ö(ó 
ð(÷nñ nr   