Ë
    P/æjhX  ã                   ó¼  — d dl Z d dlZd dlmZmZ d dlmZmZmZm	Z	m
Z
mZmZmZmZmZmZmZ d dlmZ g d¢Zdej*                  deej*                  geej*                     f   fd„Zdej*                  de	ej*                  e	eef   f   d	ed
eej*                  geej*                     f   fd„Zdej*                  deeej*                        deej*                     de	eef   de	ej*                  e	eef   f   f
d„Zd
efd„Z G d„ de«      Zdej*                  dededeeej*                        d
ef
d„Z G d„ de«      Z G d„ de«      Z dej*                  dededed
ef
d„Z!dej*                  dededeeej*                        d
ef
d„Z"dej*                  dee#   defd„Z$dej*                  deded
efd „Z% ed!«      ddfdej*                  deded"ed#eeeej*                           d$eeeej*                           d
efd%„Z&ejN                  ejP                  he&_)        ejT                  he&_+        e jX                  d&ed'ed
e
d(   fd)„«       Z-dej*                  d*ed
ej*                  fd+„Z.dej*                  d&ed
ej*                  fd,„Z/	 d4dej*                  d-ed&edeej*                     d.eej`                     d/ed0ed
eej*                  ef   fd1„Z1 G d2„ d3«      Z2y)5é    N)ÚABCÚabstractmethod)ÚAnyÚCallableÚcastÚDictÚ	GeneratorÚIterableÚOptionalÚSequenceÚSetÚTupleÚTypeÚUnion)Úalways_wrap_policyÚlambda_auto_wrap_policyÚtransformer_auto_wrap_policyÚsize_based_auto_wrap_policyÚenable_wrapÚwrapÚCustomPolicyÚModuleWrapPolicyÚroot_moduleÚfnc                 óŽ   ‡‡‡— | hŠdt         j                  dt        dt        t         j                     fˆˆˆfd„Š ‰| dd«       y)aQ  
    This applies ``fn`` to every module in the module tree of ``root_module``
    following a post-order traversal. If ``fn`` returns an :class:`nn.Module`,
    then this replaces the original module with the newly returned one in the
    tree. Otherwise, ``fn`` should return ``None``, in which case the module is
    not changed.
    ÚmoduleÚmodule_nameÚparent_modulec                 óT  •— | j                  «       D ]%  \  }}|‰vsŒ‰j                  |«        ‰||| «       Œ'  ‰| «      }|�et        |t        j                  «      sJ d|› d| › �«       ‚|s
J d| › �«       ‚t        |t        j                  «      s
J d|› �«       ‚t        |||«       y y )Nz=Non-root modules should have their parent module set but got z for zTNon-root modules should have their module name set but got an empty module name for z.fn should return None or an nn.Module but got )Únamed_childrenÚaddÚ
isinstanceÚnnÚModuleÚsetattr)	r   r   r   Úchild_module_nameÚchild_moduleÚoptional_moduleÚ_post_order_apply_innerr   Úvisited_moduless	         €€€ú^/root/repos/pocs/video-evals/.venv/lib/python3.12/site-packages/torch/distributed/fsdp/wrap.pyr)   z2_post_order_apply.<locals>._post_order_apply_inner9   sé   ø€ ð
 06×/DÑ/DÓ/Fò 	QÑ+Ð˜|Ø ?Ò2Ø×#Ñ# LÔ1Ù'¨Ð6GÈÕPð	Qñ ˜V›*ˆØÐ&Ü˜m¬R¯Y©YÔ7ð ØOØ �/  v hð0óÐ7ñ ð ð,Ø,2¨8ð5ó�;ô Ø¤§¡ôð Rà?ÀÐ?PÐQóRð ô �M ;°Õ@ð 'ó    Ú N)r#   r$   Ústrr   )r   r   r)   r*   s    `@@r+   Ú_post_order_applyr/   +   sJ   ú€ ð (3 m€OðAÜ—	‘	ðAäðAô  ¤§	¡	Ñ*÷Añ0 ˜K¨¨TÕ2r,   Útarget_module_to_kwargsÚfsdp_fnÚreturnc                 ój   ‡ ‡‡— dt         j                  dt        t         j                     fˆˆ ˆfd„}|S )z¶
    This constructs the "wrap" function to pass to :func:`_post_order_apply`
    based on ``target_module_to_kwargs``, which should be constructed from the
    wrapping policy.
    r   r2   c                 ó2   •— | ‰v r| ‰ur‰|    } ‰| fi |¤ŽS y ©N© )r   Úkwargsr1   r   r0   s     €€€r+   r   z_construct_wrap_fn.<locals>.fn_   s2   ø€ ð Ð,Ñ,°¸{Ñ1JØ,¨VÑ4ˆFÙ˜6Ñ, VÑ,Ð,Ør,   )r#   r$   r   )r   r0   r1   r   s   ``` r+   Ú_construct_wrap_fnr8   T   s*   ú€ ð”2—9‘9ð ¤¬"¯)©)Ñ!4÷ ð €Ir,   Úmodule_classesÚignored_modulesÚroot_kwargsc                 óž   — t        t        |«      «      }| j                  «       D ]%  }||v rŒt        ||«      sŒ||vr|||<   d ||   d<   Œ' |S )NÚmixed_precision)ÚtupleÚsetÚmodulesr"   )r   r9   r:   r;   r0   Úmodule_classes_tupler   s          r+   Ú$_run_mixed_precision_override_policyrB   j   sq   € ô !¤ ^Ó!4Ó5ÐØ×%Ñ%Ó'ò FˆØ�_Ñ$ØÜ˜Ð 4Õ5àÐ4Ñ4à2=Ð'¨Ñ/ØAEÐ# FÑ+Ð,=Ò>ðFð #Ð"r,   c                   ó   — y)zª
    A simple recursive wrap policy that always returns ``True``. This means
    that every submodule is wrapped by the wrapper class in
    :func:`_recursive_wrap`.
    Tr6   )Úargsr7   s     r+   r   r   ~   s   € ð r,   c                   ó’   — e Zd ZdZedej                  deej                     dee	e
f   deej                  ee	e
f   f   fd„«       Zy)Ú_Policyzk
    This defines an abstract base class that represents a policy for applying
    a module-level API.
    r   r:   r;   r2   c                  ó   — y)zˆ
        This should return a dict ``target_module_to_kwargs`` that maps from
        each target module to wrap to its kwargs.
        Nr6   )Úselfr   r:   r;   s       r+   Ú_run_policyz_Policy._run_policy�   s   € ð 	r,   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r#   r$   r   r   r.   r   rI   r6   r,   r+   rF   rF   ‡   sk   „ ñð
 ð
à—Y‘Yð
ð ˜RŸY™Y™ð
ð ˜#˜s˜(‘^ð	
ð
 
ˆb�i‰i˜˜c 3˜h™Ð'Ñ	(ò
ó ñ
r,   rF   r   ÚrecurseÚnonwrapped_numelc                 ó2   — |ryt        | t        |«      «      S )a   
    This auto wrap policy wraps every module that is an instance of any type in
    ``module_classes`` as its own FSDP instance. The root module given by
    ``module`` is always wrapped as an FSDP instance regardless. Since the
    wrapping proceeds bottom up, each FSDP instance manages the parameters in
    its subtree excluding any already managed by a child FSDP instance.

    Args:
        module (nn.Module): Current module being considered.
        recurse (bool): If ``False``, then this function must decide whether
            ``module`` should be wrapped as an FSDP instance or not. If
            ``True``, then the function is still recursing down the module
            tree as a part of the DFS.
        nonwrapped_numel (int): Parameter numel not yet wrapped.
        module_classes (Set[Type[nn.Module]]): Set of module classes that are
            wrapped as FSDP instances.

    Returns:
        ``True`` if ``recurse=True``, and whether ``module`` should be wrapped
        if ``recurse=False``.
    T©r"   r>   )r   rN   rO   r9   s       r+   Ú_module_wrap_policyrR   ›   s   € ñ6 ØÜ�fœe NÓ3Ó4Ð4r,   c                   óÒ   ‡ — e Zd ZdZdeeej                        fd„Zdej                  de	ej                     de
eef   de
ej                  e
eef   f   fd„Zd	„ Zdefˆ fd
„Zˆ xZS )r   z{
    This policy applies to every module of the specified module classes,
    passing in the kwargs given to the root.
    r9   c                 óH   — t        |«      }|| _        t        |«      | _        y r5   )r?   Ú_module_classesr.   Ú_module_classes_str)rH   r9   Úmodule_classes_sets      r+   Ú__init__zModuleWrapPolicy.__init__Á   s#   € Ü  Ó0ÐØ1ˆÔÜ#&Ð'9Ó#:ˆÕ r,   r   r:   r;   r2   c                 ó²   — t        | j                  «      }i }|j                  «       D ],  }||v rŒt        ||«      sŒt	        j                  |«      ||<   Œ. |S r5   )r>   rU   r@   r"   Úcopy)rH   r   r:   r;   r9   r0   r   s          r+   rI   zModuleWrapPolicy._run_policyÆ   se   € ô ˜t×3Ñ3Ó4ˆØCEÐØ!×)Ñ)Ó+ò 	IˆFØ˜Ñ(ØÜ˜F NÕ3ä26·)±)¸KÓ2HÐ'¨Ò/ð	Ið 'Ð&r,   c                 ó4   — t        ||d| j                  ¬«      S )Néÿÿÿÿ)rO   r9   )rR   rU   )rH   r   rN   rD   r7   s        r+   Ú__call__zModuleWrapPolicy.__call__Ö   s   € ä"Ø�G¨bÀ×AUÑAUô
ð 	
r,   c                 óB   •— t         ‰| �  «       d| j                  › d�z   S )Nú(ú))ÚsuperÚ__repr__rV   )rH   Ú	__class__s    €r+   rb   zModuleWrapPolicy.__repr__Ü   s&   ø€ Ü‰wÑÓ! a¨×(@Ñ(@Ð'AÀÐ$CÑCÐCr,   )rJ   rK   rL   rM   r
   r   r#   r$   rX   r   r   r.   r   rI   r]   rb   Ú__classcell__)rc   s   @r+   r   r   »   s�   ø„ ñð
; x°°R·Y±Y±Ñ'@ó ;ð
'à—Y‘Yð'ð ˜RŸY™Y™ð'ð ˜#˜s˜(‘^ð	'ð
 
ˆb�i‰i˜˜c 3˜h™Ð'Ñ	(ó'ò 
ðD˜#÷ Dñ Dr,   r   c                   óÈ   — e Zd ZdZdeej                  geee	e
ef   f   f   fd„Zdej                  deej                     de	e
ef   de	ej                  e	e
ef   f   fd„Zy	)
r   aý  
    This policy takes in a lambda function that maps a given ``nn.Module`` to
    either ``False``, ``True``, or a kwarg dictionary.
    - If the function returns ``False`` or an empty dictionary, then the module
      does not have the API applied.
    - If the function returns ``True``, then the module has the API applied
      with the root's kwargs.
    - If the function returns a non-empty dictionary, then the module has the
      API applied, and the dictionary overrides the root's kwargs.

    Example::

        >>> # xdoctest: +SKIP("undefined variables")
        >>> model = init_transformer_model(...)
        >>> def lambda_fn(module: nn.Module):
        >>>     if module is model.lm_head:
        >>>         return {"sharding_strategy": ShardingStrategy.SHARD_GRAD_OP}
        >>>     elif isinstance(module, TransformerBlock):
        >>>         return True
        >>>     return False
        >>> policy = CustomPolicy(lambda_fn)
        >>> fsdp_model = FSDP(model, auto_wrap_policy=policy)
    Ú	lambda_fnc                 ó   — || _         y r5   )Ú
_lambda_fn)rH   rf   s     r+   rX   zCustomPolicy.__init__ù   s	   € Ø#ˆ�r,   r   r:   r;   r2   c                 ó$  — i }|j                  «       D ]z  }||v rŒ| j                  |«      }t        |t        t        f«      st        d|› �«      ‚|sŒ@t        j                  |«      }t        |t        «      r|j                  |«       |||<   Œ| |S )Nz_The lambda_fn passed to CustomPolicy should return False/True or a kwarg dict, but it returned )r@   rh   r"   ÚdictÚboolÚ
ValueErrorrZ   Úupdate)rH   r   r:   r;   r0   r   Úresr7   s           r+   rI   zCustomPolicy._run_policyü   sª   € ð DFÐØ!×)Ñ)Ó+ò 	5ˆFØ˜Ñ(ØØ—/‘/ &Ó)ˆCÜ˜c¤D¬$ <Ô0Ü ðCØCFÀ%ðIóð ñ ØÜ—Y‘Y˜{Ó+ˆFÜ˜#œtÔ$ð —‘˜cÔ"Ø.4Ð# FÒ+ð!	5ð" 'Ð&r,   N)rJ   rK   rL   rM   r   r#   r$   r   rk   r   r.   r   rX   r   rI   r6   r,   r+   r   r   à   sŠ   „ ñð0$ (¨B¯I©I¨;¸¸dÀDÈÈcÈÁNÐ>RÑ8SÐ+SÑ"Tó $ð'à—Y‘Yð'ð ˜RŸY™Y™ð'ð ˜#˜s˜(‘^ð	'ð
 
ˆb�i‰i˜˜c 3˜h™Ð'Ñ	(ô'r,   r   rf   c                 ó   — |ry || «      S )aU  
    A convenient auto wrap policy to wrap submodules based on an arbitrary user
    function. If `lambda_fn(submodule) == True``, the submodule will be wrapped as
    a `wrapper_cls` unit.

    Return if a module should be wrapped during auto wrapping.

    The first three parameters are required by :func:`_recursive_wrap`.

    Args:
        module (nn.Module): Current module being considered.
        recurse (bool): If ``False``, then this function must decide whether
            ``module`` should be wrapped as an FSDP instance or not. If
            ``True``, then the function is still recursing down the module
            tree as a part of the DFS.
        nonwrapped_numel (int): Parameter numel not yet wrapped.

        lambda_fn (Callable[[nn.Module], bool]): If this returns ``True``, then
            this module will be wrapped.
    Tr6   )r   rN   rO   rf   s       r+   r   r     s   € ñ. ØÙ�VÓÐr,   Útransformer_layer_clsc                 ó   — t        | |||«      S )a-  
    See :func:`_module_wrap_policy`, where ``transformer_layer_cls`` is the
    same as ``module_classes``. Note that shared parameters must be wrapped in
    the same FSDP instance, so this auto wrap policy can help wrap shared
    embeddings into the same FSDP instance for transformer models.
    )rR   )r   rN   rO   rp   s       r+   r   r   3  s   € ô ˜v wÐ0@ÐBWÓXÐXr,   c                 ó2   — |ryt        | t        |«      «      S )NTrQ   )r   r9   rN   rD   r7   s        r+   Ú_wrap_module_cls_individuallyrs   B  s   € ñ àô ˜&¤%¨Ó"7Ó8Ð8r,   c                 ó4   ‡ ‡‡— t        ˆ ˆˆfd„|D «       «      S )zv
    A policy that wraps ``module`` if any policy in the passed in iterable of
    ``policies`` returns ``True``.
    c              3   ó4   •K  — | ]  } |‰‰‰¬ «      –— Œ y­w)©r   rN   rO   Nr6   )Ú.0Úpolicyr   rO   rN   s     €€€r+   ú	<genexpr>z_or_policy.<locals>.<genexpr>X  s&   øè ø€ ò àñ 	�f gÐ@P×QÐQñùs   ƒ)Úany)r   rN   rO   Úpoliciess   ``` r+   Ú
_or_policyr|   N  s   ú€ ô õ àôó ð r,   g    „×—AÚmin_num_paramsÚforce_leaf_modulesÚexclude_wrap_modulesc                 óÌ   — |€t         j                  n|}|€t         j                  n|}|}||k\  }|r|xr t        | t	        |«      «       S |xr t        | t	        |«      «       S )a¯  
    A size-based auto wrap policy.

    Args:
        module (nn.Module): Current module being considered.
        recurse (bool): If ``False``, then this function must decide whether
            ``module`` should be wrapped as an FSDP instance or not. If
            ``True``, then the function is still recursing down the module
            tree as a part of the DFS.
        nonwrapped_numel (int): Parameter numel not yet wrapped.

        min_num_params (int): Customizable policy input that controls the size
            threshold over which a module is ready to be wrapped. This is in
            units of numel.
        force_leaf_modules (Set[Type[nn.Module]]): Set of module types to keep
            as leaves, i.e. their children will never be wrapped.
        exclude_wrap_modules (Set[Type[nn.Module]]): Set of module types to be
            excluded in wrapping.

    Returns:
        Whether ``module`` should be wrapped.
    )r   ÚFORCE_LEAF_MODULESÚEXCLUDE_WRAP_MODULESr"   r>   )r   rN   rO   r}   r~   r   Úmin_nonwrapped_numelÚis_larges           r+   r   r   ^  s‡   € ðB Ð%ô 	$×6Ò6àð ð  Ð'ô 	$×8Ò8à!ð ð *ÐØÐ#7Ñ7€HÙàÒM¤
¨6´5Ð9KÓ3LÓ MÐMÐMð ÒO¤
¨6´5Ð9MÓ3NÓ OÐOÐOr,   Úwrapper_clsÚwrapper_kwargs)NNNc              +   ó`   K  — d| i|¥}t        di |¤Ž5  d–— ddd«       y# 1 sw Y   yxY w­w)aÑ  
    Context manager to wrap modules using a wrapper.

    Useful for when you'd like to apply the same configuration arguments to all
    child modules that you wrap. A particularly important use case is wrapping
    large layers so that they get sharded (in-place) during initialization, to
    avoid running out of system memory. Large layers can indicate that they
    should be sharded via the ``wrap`` annotation and this context manager can
    provide the exact configuration for these nested instances.

    Usage::

        with enable_wrap(wrapper_cls, **params):
            # Wraps layer in FSDP by default if within context
            self.l1 = wrap(torch.nn.Linear(5, 5))

    Args:
        wrapper_cls:
            Class that `wrap` annotation will `wrap` modules with, such as
            `FullyShardedDataParallel`.
        **wrapper_kwargs:
            Configuration settings that will be passed to all ``wrap``
            instances inside the context
    r…   Nr6   )Ú_ConfigAutoWrap)r…   r†   r7   s      r+   r   r   ™  s@   è ø€ ð: 	�{ðà
ð€Fô 
Ñ	"˜6Ñ	"ñ Û÷÷ ñ üs   ‚.”"™	.¢+§.Úwrap_overridesc                 ó¨   — t         j                  rAt         j                  €J ‚i t         j                  ¥|¥}t	        | t         j                  fi |¤ŽS | S )a  
    Annotate that a module should be wrapped. Annotated modules will only be
    wrapped if inside of an :func:`enable_wrap` context manager. This allows
    a module to be initialized both with and without a wrapper without code
    change.

    The class that this function wraps the passed in ``nn.Module`` with is the
    passed in ``wrapper_cls`` argument into ``enable_wrap``. Both
    ``enable_wrap`` and ``wrap`` can take in kwargs specifying how to construct
    the ``wrapper_cls`` instance. In the case of duplicate kwargs in
    ``enable_wrap`` and ``wrap``, the argument passed into ``wrap`` will be
    respected.

    Usage::

        with enable_wrap(wrapper_cls=FSDP, **fsdp_config):
            # Wraps layer in FSDP by default if within context
            self.l1 = wrap(torch.nn.Linear(5, 5))

    Args:
        module (nn.Module): module to wrap (if in :func:`enable_wrap` context)
        **wrap_overrides: configuration overrides that will take priority over
            the values provided by the :func:`enable_wrap` context
    )rˆ   Úin_autowrap_contextr…   r7   Ú_wrap)r   r‰   s     r+   r   r   ½  s^   € ô2 ×*Ò*Ü×*Ñ*Ð6Ð6Ð6àEœO×2Ñ2ÐE°nÐEˆÜØÜ×'Ñ'ñ
ð ñ
ð 	
ð
 €Mr,   c                 óf   — |€J ‚t        | d«      ri |¥| j                  ¥} || fi |¤ŽS  || fi |¤ŽS )NÚ_wrap_overrides)ÚhasattrrŽ   )r   r…   r7   Ú	overridess       r+   rŒ   rŒ   â  sP   € ØÐ"Ð"Ð"ÜˆvÐ(Ô)ð
 9�vÐ8 ×!7Ñ!7Ð8ˆ	Ù˜6Ñ/ YÑ/Ð/á�vÑ( Ñ(Ð(r,   Úauto_wrap_policyÚignored_paramsÚonly_wrap_childrenr7   c           
      óø  ‡— |€J d«       ‚|€J d«       ‚| j                  «       D ]'  \  }}||v rŒ	 t        |t        t        |«      «      rJ ‚Œ) t        ˆfd„| j                  «       D «       «      }	|€J ‚ || d|	¬«      rjd}
| j                  «       D ]0  \  }}||v rŒt        d	||||‰dœ|¤Ž\  }}t        | ||«       |
|z  }
Œ2 |	|
z
  }|s || d|¬«      rt        | |fi |¤Ž|	fS | |
fS | dfS # t        $ r Y ŒÔw xY w)
aÚ  
    Wraps submodules of ``module`` for which ``auto_wrap_policy`` returns
    ``True`` with ``wrapper_cls``.

    Args:
        module (nn.Module): Module to recursively wrap.
        auto_wrap_policy (Callable): A callable representing a policy that
            determines which modules to recursively wrap with ``wrapper_cls``.
        ignored_modules (Set[torch.nn.Module]): Modules to ignore when
            wrapping.
        ignored_params (Set[torch.nn.Parameter]): Parameters to ignore when
            wrapping; these should be the parameters contained in the modules
            in ``ignored_modules``.
    Returns:
        (nn.Module, int):
            ``module`` after wrapping and the numel recursively wrapped.
    zMust specify auto_wrap_policy.zMust specify wrapper_clsc              3   óH   •K  — | ]  }|‰vsŒ|j                  «       –— Œ y ­wr5   )Únumel)rw   Úpr’   s     €r+   ry   z"_recursive_wrap.<locals>.<genexpr>  s#   øè ø€ ò Ø°!¸>Ò2Iˆ�‰�	ñùs   ƒ	"�"Trv   r   )r   r‘   r…   r:   r’   Fr6   )Únamed_modulesr"   r   ÚtypeÚ	TypeErrorÚsumÚ
parametersr    Ú_recursive_wrapr%   rŒ   )r   r‘   r…   r:   r’   r“   r7   Ú_ÚchildrO   Útotal_wrapped_numelÚnameÚwrapped_childÚnum_wrapped_paramsÚ	remainders       `          r+   r�   r�   ï  s†  ø€ ð4 Ð'ÐIÐ)IÓIÐ'ØÐ"Ð>Ð$>Ó>Ð"à×(Ñ(Ó*ò ‰ˆˆ5Ø�OÑ#Øð	Ü! %¬¬d°KÓ)@ÔAÐAÐAÐAð	ô ó Ø!×,Ñ,Ó.ôó Ðð Ð'Ð'Ð'Ù˜v¨tÐFVÕWØÐà!×0Ñ0Ó2ò 	6‰KˆD�%Ø˜Ñ'ØÜ0?ð 1ØØ!1Ø'Ø /Ø-ñ1ð ñ1Ñ-ˆMÐ-ô �F˜D -Ô0àÐ#5Ñ5Ñð	6ð  %Ð':Ñ:ˆ	Ù!Ñ&6Ø 5¸9õ'
ô ˜ Ñ7°Ñ7Ð9IÐIÐIàÐ.Ð.Ð.Ø�1ˆ9ÐøôK ò 	áð	ús   °C-Ã-	C9Ã8C9c                   ó®   — e Zd ZU dZdZeed<   dZee	   ed<   i Z
eeef   ed<   deeef   fd„Zededdfd	„«       Zedd
„«       Zdd„Zdedededdfd„Zy)rˆ   zŒ
    Helper class to wrap modules based on default config args via a context manager.
    See :func:`enable_wrap` for more information.
    Fr‹   Nr…   r7   c                 ó   — || _         y r5   ©r7   )rH   r7   s     r+   rX   z_ConfigAutoWrap.__init__C  s	   € Øˆ�r,   r2   c                 óÖ   — t         j                  rt        d«      ‚dt         _        d| j                  «       v sJ d«       ‚t	        t
        | d   «      t         _        | d= | t         _        y )Nz]You are already within an autowrap context and we currently do not supported nested autowrap.Tr…   z9Expected to pass in wrapper_cls arg into _ConfigAutoWrap.)rˆ   r‹   ÚNotImplementedErrorÚkeysr   r   r…   r7   r§   s    r+   Úenable_autowrap_contextz'_ConfigAutoWrap.enable_autowrap_contextF  sk   € ä×.Ò.Ü%Øoóð ð /3ŒÔ+ð ˜VŸ[™[›]Ñ*ð	GàFó	GØ*ä&*¬8°V¸MÑ5JÓ&KŒÔ#Ø�=Ð!à!'ŒÕr,   c                  óF   — dt         _        d t         _        i t         _        y )NF)rˆ   r‹   r…   r7   r6   r,   r+   Údisable_autowrap_contextz(_ConfigAutoWrap.disable_autowrap_contextV  s   € à.3ŒÔ+Ø&*ŒÔ#Ø!#ŒÕr,   c                 ó:   — | j                  | j                  «       y r5   )r«   r7   )rH   s    r+   Ú	__enter__z_ConfigAutoWrap.__enter__\  s   € Ø×$Ñ$ T§[¡[Õ1r,   Úexc_typeÚexc_valÚexc_tbc                 ó$   — | j                  «        y r5   )r­   )rH   r°   r±   r²   s       r+   Ú__exit__z_ConfigAutoWrap.__exit___  s   € Ø×%Ñ%Õ'r,   )r2   N)rJ   rK   rL   rM   r‹   rk   Ú__annotations__r…   r   r   r7   r   r.   r   rX   Ústaticmethodr«   r­   r¯   r´   r6   r,   r+   rˆ   rˆ   9  s¥   … ñð
 !&Ð˜Ó%Ø&*€K�˜(Ñ#Ó*Ø€FˆD��c�‰NÓð  c¨3 h¡ó ð ð(¨ð (°ò (ó ð(ð ò$ó ð$ó
2ð( ð (¨sð (¸Cð (ÀDô (r,   rˆ   )F)3Ú
contextlibrZ   Úabcr   r   Útypingr   r   r   r   r	   r
   r   r   r   r   r   r   Útorch.nnr#   Ú__all__r$   r/   r.   r8   rB   rk   r   rF   ÚintrR   r   r   r   r   r™   rs   r|   r   Ú
ModuleListÚ
ModuleDictr‚   ÚMultiheadAttentionr�   Úcontextmanagerr   r   rŒ   Ú	Parameterr�   rˆ   r6   r,   r+   ú<module>rÂ      s*  ðó Û ß #÷÷ ÷ ó õ ò	€ð&3Ø—‘ð&3à�"—)‘)�˜h r§y¡yÑ1Ð1Ñ2ó&3ðRØ—‘ðà! "§)¡)¨T°#°s°(©^Ð";Ñ<ðð ðð ˆr�y‰yˆk˜8 B§I¡IÑ.Ð.Ñ/ó	ð,#Ø—‘ð#à˜T "§)¡)™_Ñ-ð#ð ˜Ÿ™‘^ð#ð �c˜3�h‘ð	#ð
 " "§)¡)¨T°#°s°(©^Ð";Ñ<ó#ð(¨4ó ôˆcô ð(5Ø�I‰Ið5àð5ð ð5ð ˜˜RŸY™Y™Ñ(ð	5ð
 
ó5ô@"D�wô "DôJ4'�7ô 4'ðnØ�I‰IðØ $ðØ8;ðØHPðà	óð8YØ�I‰IðYàðYð ðYð ˜t B§I¡I™Ñ/ð	Yð
 
óYð	9Ø�I‰Ið	9Ø'/°¡~ð	9Ø@Dó	9ðØ�I‰Iðàðð ðð
 
óñ* ˜c›(Ø9=Ø;?ñ3PØ�I‰Ið3Pàð3Pð ð3Pð
 ð3Pð !  T¨"¯)©)¡_Ñ!5Ñ6ð3Pð # 3 t¨B¯I©I¡Ñ#7Ñ8ð3Pð 
ó3Pðn 57·M±MÀ2Ç=Á=Ð3QÐ Ô 0Ø24×2GÑ2GÐ1HÐ Ô .ð ×Ñð Øð Ø+.ð àÐÑ ò ó ð ðF"�—‘ð "¨cð "°b·i±ió "ðJ
)�"—)‘)ð 
)¨(ð 
)ÀÇÁó 
)ð&  %ñGØ�I‰IðGàðGð ðGð ˜Ÿ™‘^ð	Gð
 ˜Ÿ™Ñ%ðGð ðGð ðGð ˆ2�9‰9�cˆ>ÑóG÷T'(ò '(r,   