o
    k9:j
                    @   sh  U d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
mZmZmZ ddlmZmZ ddlmZmZ ddlZddlmZ ddlmZ ddlmZmZ ddlmZ dd	lmZ dd
lm Z m!Z! ddl"m#Z#m$Z$m%Z% ddl&m'Z'm(Z(m)Z)m*Z* ddl+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2m3Z3m4Z4 ddl5m6Z6 ddl7m8Z8m9Z9m:Z: ddl;m<Z<m=Z= ddl>m?Z? ddl@mAZA edZBe$ aCe!ejDjE_Fe ejDjG_FejDjGZGdeG_ deG_HdeG_Ie?eGd dd ZJeJeG_Ke,reLdddgZMndd ZMd eM_ d!d" ZNd#d$ ZOd%d& ZPG d'd( d(ZQG d)d* d*eQZRG d+d, d,eSZTG d-d. d.ZUG d/d0 d0eVZWd1d2 ZXG d3d4 d4ZYd5e=d6eZd7ej[j6fd8d9Z\e,rg d:Z]G d;d< d<Z^e]D ]Z_d=d> Z`eae^e_e` qSG d?d@ d@e6eTdAZbG dBdC dCebZcecjde D ]&\ZfZgehegseiegejsqxefkdDselebefrqxeaebefeg qxdEdF Zmh dGZndHdI Zoemej[j6D ]'\ZfZpefkdDsefqdJrÐqefecjdvrefenvreaecepjHeoef qnG dKd< d<Z^G dLd@ d@ej[j6ZbG dMdC dCebZcdNdO ZrdPdQ ZsdRdS ZtddTdUZudVavewexdW< 				ddXeyez e{e
eyez f B dB fdYdZZ|				dd[ed\dd]e}d^e
eZgef dB dXeyez e{e
eyez f B dB d7efd_d`Z~dadb Zdcdd Zdedf Zdgdh Zd[eBd7eBfdidjZdkdl ZejDjZe?ed ddneZdoe}dpe}dqeZfdrdsZG dtdu duZG dvdw dwZG dxdy dyZdzd{ Zeed| eejd} ee8d~ ee9d~ ee:d~ dS )zTorchScript.

This module contains functionality to support the JIT's scripting frontend, notably:
    - torch.jit.script

This is not intended to be imported directly; please use the exposed
functionalities in `torch.jit`.
    N)CallableIteratorMappingSequence)AnyTypeVar)
deprecatedSelf)classes)_get_model_id_qualified_name)log_torchscript_usage)_register_builtin)
_graph_for_script_method_graph_for)JitTypeTraceConfigJitTypeTraceStoremonkeytype_trace)_compile_and_register_classinfer_methods_to_compileScriptMethodStubwrap_cpp_module)_enabled_set_jit_function_cache_set_jit_overload_cache_try_get_jit_cached_function_try_get_jit_cached_overloads)get_default_argsget_jit_class_defget_jit_def)Module)has_torch_functionhas_torch_function_unaryhas_torch_function_variadic)PackageExporterPackageImporter)
set_module   )validate_map_location_Tz
Functionally equivalent to a :class:`ScriptModule`, but represents a single
function and does not have any attributes or Parameters.
ScriptFunctiontorch.jit.ScriptFunctionz	torch.jitc                 C   
   t d)Nz ScriptFunction cannot be pickledpicklePickleErrorcls r2   X/home/nk/hobo-godmode/plappi-mvp/.venv/lib/python3.10/site-packages/torch/jit/_script.py_reduceO      
r4   	Attributevaluetypec                 C   s   | S Nr2   )r7   r8   r2   r2   r3   r6   Z   s   a  
    This method is a pass-through function that returns `value`, mostly
    used to indicate to the TorchScript compiler that the left-hand side
    expression is a class instance attribute with type of `type`. Note that
    `torch.jit.Attribute` should only be used in `__init__` method of `jit.ScriptModule`
    subclasses.

    Though TorchScript can infer correct type for most Python expressions, there are some cases where
    type inference can be wrong, including:

    - Empty containers like `[]` and `{}`, which TorchScript assumes to be container of `Tensor`
    - Optional types like `Optional[T]` but assigned a valid value of type `T`, TorchScript would assume
      it is type `T` rather than `Optional[T]`

    In eager mode, it is simply a pass-through function that returns `value`
    without other implications.

    Example:

    .. testcode::

        import torch
        from typing import Dict

        class AttributeModule(torch.jit.ScriptModule):
            def __init__(self) -> None:
                super().__init__()
                self.foo = torch.jit.Attribute(0.1, float)

                # we should be able to use self.foo as a float here
                assert 0.0 < self.foo

                self.names_ages = torch.jit.Attribute({}, Dict[str, int])
                self.names_ages["someone"] = 20
                assert isinstance(self.names_ages["someone"], int)

        m = AttributeModule()
        # m will contain two attributes
        # 1. foo of type float
        # 2. names_ages of type Dict[str, int]

    .. testcleanup::

        del AttributeModule
        del m

    Note: it's now preferred to instead use type annotations instead of `torch.jit.Attribute`:

    .. testcode::

        import torch
        from typing import Dict

        class AttributeModule(torch.nn.Module):
            names: Dict[str, int]

            def __init__(self) -> None:
                super().__init__()
                self.names = {}

        m = AttributeModule()

    .. testcleanup::

        del AttributeModule
        del m

    Args:
        value: An initial value to be assigned to attribute.
        type: A Python type

    Returns:
        Returns `value`
c                   C   s   t S r9   )type_trace_dbr2   r2   r2   r3   _get_type_trace_db      r;   c                 C   s   t | |d S r9   )getattr)r1   namer2   r2   r3   _get_function_from_type      r?   c                 C   s$   t | drdt| v pt | dS d S )N	__class____dict__	__slots__)hasattrdirr0   r2   r2   r3   _is_new_style_class   s   
rF   c                   @   sT   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd ZdS )OrderedDictWrapperc                 C   
   || _ d S r9   )_c)selfrI   r2   r2   r3   __init__   r5   zOrderedDictWrapper.__init__c                 C      dd |   D S )Nc                 S   s   g | ]\}}|qS r2   r2   .0kvr2   r2   r3   
<listcomp>       z+OrderedDictWrapper.keys.<locals>.<listcomp>itemsrJ   r2   r2   r3   keys      zOrderedDictWrapper.keysc                 C   rL   )Nc                 S      g | ]\}}|qS r2   r2   rM   r2   r2   r3   rQ      rR   z-OrderedDictWrapper.values.<locals>.<listcomp>rS   rU   r2   r2   r3   values   rW   zOrderedDictWrapper.valuesc                 C   s   t |  S r9   )lenrY   rU   r2   r2   r3   __len__   r@   zOrderedDictWrapper.__len__c                 C   s   t d)Nz6cannot delete methods or parameters of a script moduleRuntimeErrorrJ   rO   r2   r2   r3   __delitem__   s   zOrderedDictWrapper.__delitem__c                 C   
   | j  S r9   )rI   rT   rU   r2   r2   r3   rT      r5   zOrderedDictWrapper.itemsc                 C   s(   || vrt d| | j|| d S )NzICan't add a new parameter after ScriptModule construction. Tried to add ')r]   rI   setattrrJ   rO   rP   r2   r2   r3   __setitem__   s
   zOrderedDictWrapper.__setitem__c                 C   s   | j |S r9   )rI   containsr^   r2   r2   r3   __contains__   r@   zOrderedDictWrapper.__contains__c                 C   s   || vrt || j|S r9   )KeyErrorrI   r=   r^   r2   r2   r3   __getitem__   s   zOrderedDictWrapper.__getitem__N)__name__
__module____qualname__rK   rV   rY   r[   r_   rT   rc   re   rg   r2   r2   r2   r3   rG      s    rG   c                       s<   e Zd Z fddZdd Zdd Zdd Zd	d
 Z  ZS )OrderedModuleDictc                    s   t  tj| || _d S r9   )superrK   torch_C
ModuleDict_python_modules)rJ   modulepython_dictrA   r2   r3   rK      s   
zOrderedModuleDict.__init__c                 C   s   | j  }|S r9   )rp   rT   rJ   rr2   r2   r3   rT      s   
zOrderedModuleDict.itemsc                 C   s
   || j v S r9   rp   r^   r2   r2   r3   re      r5   zOrderedModuleDict.__contains__c                 C   s:   t |tr| j|| || j|< d S td| d| )NzgCannot re-assign modules in a ScriptModule with non-scripted module, tried to replace existing module 'z': )
isinstanceScriptModulerI   ra   rp   r]   rb   r2   r2   r3   rc      s   

zOrderedModuleDict.__setitem__c                 C   
   | j | S r9   rv   r^   r2   r2   r3   rg     r5   zOrderedModuleDict.__getitem__)	rh   ri   rj   rK   rT   re   rc   rg   __classcell__r2   r2   rs   r3   rk      s    
rk   c                       s   e Zd Z fddZ  ZS )
ScriptMetac           	         s   i  _ tt dd _t|D ]"}t|di  D ]	\}}| j |< qt|dt } j| _qt| D ]\}}t|t	rNt
 | | j |jj< q9t ddr_t ||| d S t ddd	 t fd
d}| _t ||| d S )N__constants__r2   _methods_constants_set_disable_script_metaFrK   c                 S      d S r9   r2   rU   r2   r2   r3   <lambda>6  s    z%ScriptMeta.__init__.<locals>.<lambda>c           	         s   t  j}| g|R i | t  j|k}t|  u rWdd }tjjj| || d| jd< | jj	}|
 D ]}t| | q7| D ]	\}}t| | qCdD ]	}t| | qOd S d S )Nc                 S   s2   t | }t|drdd t|j D S t| S )Nr}   c                 S   rX   r2   r2   rM   r2   r2   r3   rQ   C  rR   zUScriptMeta.__init__.<locals>.init_then_script.<locals>.make_stubs.<locals>.<listcomp>)r8   rD   sortedr}   rT   r   )rq   r1   r2   r2   r3   
make_stubs@  s   
zAScriptMeta.__init__.<locals>.init_then_script.<locals>.make_stubs)share_types_actual_script_module)_parameters_buffers_modules)rZ   r}   r8   rm   jit
_recursivecreate_script_modulerB   r   _concrete_typeget_attributesdelattrget_modules)	rJ   argskwargsnum_methodsadded_methods_in_initr   concrete_typer>   _r1   original_initr2   r3   init_then_script8  s$   
	z-ScriptMeta.__init__.<locals>.init_then_script)r}   setr=   r~   reversedrT   unionr   rw   r   r   original_methodrh   rl   rK   	functoolswraps)	r1   r>   basesattrsbaserO   rP   base_constantsr   rs   r   r3   rK     s(   

zScriptMeta.__init__rh   ri   rj   rK   rz   r2   r2   rs   r3   r{     s    r{   c                   @   s   e Zd Zdd ZdS )_CachedForwardc                 C   
   |  dS )Nforward)__getattr__)rJ   objr1   r2   r2   r3   __get__]  r5   z_CachedForward.__get__N)rh   ri   rj   r   r2   r2   r2   r3   r   \  s    r   c                   @      e Zd ZdS )ScriptWarningNrh   ri   rj   r2   r2   r2   r3   r   a      r   c                 C   sT   t jdkrtdt ntdt ts| S tjdd}t| | j	dd}t
||| S )N      z}`torch.jit.script_method` is not supported in Python 3.14+ and may break. Please switch to `torch.compile` or `torch.export`.z\`torch.jit.script_method` is deprecated. Please switch to `torch.compile` or `torch.export`.   	frames_uprx   )	self_name)sysversion_infowarningswarnDeprecationWarningr   _jit_internal!createResolutionCallbackFromFramer   rh   r   )fn_rcbastr2   r2   r3   script_methode  s   
r   c                   @   s8   e Zd Zdeeef ddfddZdedefddZdS )	ConstMapconst_mappingreturnNc                 C   rH   r9   r   )rJ   r   r2   r2   r3   rK     r5   zConstMap.__init__attrc                 C   ry   r9   r   rJ   r   r2   r2   r3   r     r5   zConstMap.__getattr__)rh   ri   rj   r   strr   rK   r   r2   r2   r2   r3   r     s    r   importerscript_module_idr   c                 C   sH   t | jtjjstdtj }tj|| j| jt	| j
|}t|S )z
    Call by ``torch.package.PackageImporter``'s Pickler's ``persistent_load`` function.

    Performs work of loading and returning a ScriptModule from a ``torch.package`` archive.
    z{Loading ScriptObjects from a PackageImporter created from a directory is not supported. Use a package archive file instead.)rw   
zip_readerrm   rn   PyTorchFileReaderr]   CompilationUnit_import_ir_module_from_packagestorage_contextr(   last_map_locationr   )r   r   cu
cpp_moduler2   r2   r3   unpackage_script_module  s   
r   )__iter__r[   __neg____mul__re   __add____sub____pow____truediv____mod____ne____eq____lt____gt____le____ge____and____or____xor__rg   rc   __call____int__	__float____bool____str__	__enter____exit__c                       s   e Zd ZdZ fddZdedef fddZdededd	f fd
dZdedededefddZ	dd Z
dedefddZ  ZS )RecursiveScriptClassaX  Wrapper for a TorchScript class instance for use in Python.

        An analogue of RecursiveScriptModule for regular objects that are not modules.
        This class is a wrapper around a torch._C.ScriptObject that represents an instance
        of a TorchScript class and allows it to be used in Python.

        Attributes:
            _c [torch._C.ScriptObject]: The C++ object to which attribute lookups and method
                calls are forwarded.
            _props [Dict[str, property]]: A dictionary of properties fetched from self._c and
                exposed on this wrppaer.
        c                    s>   t    d| jd< || _dd | j D | _d| jd< d S )NT_initializingc                 S   s   i | ]}|j t|j|jqS r2   )r>   propertygettersetter)rN   propr2   r2   r3   
<dictcomp>  s    z1RecursiveScriptClass.__init__.<locals>.<dictcomp>F)rl   rK   rB   rI   _properties_props)rJ   	cpp_classrs   r2   r3   rK     s   

zRecursiveScriptClass.__init__r   r   c                    s<   | j drt |S || jv r| j|  S t| j|S Nr   )rB   getrl   r   r   fgetr=   rI   r   rs   r2   r3   r     s
   
z RecursiveScriptClass.__getattr__r7   Nc                    sF   | j drt ||S || jv r| j| |S t| j|| d S r   )rB   r   rl   __setattr__r   fsetra   rI   rJ   r   r7   rs   r2   r3   r     s
   
z RecursiveScriptClass.__setattr__method_namer   r   c                 O   s(   | j |st| |}||i |S r9   )rI   _has_method	TypeErrorr   rJ   r   r   r   self_methodr2   r2   r3   forward_magic_method  s   
z)RecursiveScriptClass.forward_magic_methodc                 C   r,   )NzScriptClasses cannot be pickledr-   rU   r2   r2   r3   __getstate__  r5   z!RecursiveScriptClass.__getstate__otherc                 C   s$   | j dr| d|S | d|S )N__iadd__r   )rI   r   r   )rJ   r  r2   r2   r3   r    s   zRecursiveScriptClass.__iadd__)rh   ri   rj   __doc__rK   r   r   r   r   r   r   r	   r  rz   r2   r2   rs   r3   r     s     	
	r   c                 O   s   | j tg|R i |S r9   )r   r   rJ   r   r   r2   r2   r3   method_template     r  c                       s   e Zd ZU dZg dZd fddZe Zede	f e
d< d	ede	f fd
dZd	ede	ddf fddZdd Zdd ZdefddZ  ZS )rx   a'  Wrapper for C++ torch::jit::Module with methods, attributes, and parameters.

        A wrapper around C++ ``torch::jit::Module``. ``ScriptModule``\s
        contain methods, attributes, parameters, and
        constants. These can be accessed the same way as on a normal ``nn.Module``.
        )codecode_with_constantsgraphinlined_graphoriginal_namer   Nc                       t    d S r9   rl   rK   rU   rs   r2   r3   rK   $     ScriptModule.__init__.r   r   c                    s"   d| j vrt |S t| j|S )Nr   )rB   rl   r   r=   r   r   rs   r2   r3   r   )  s   
zScriptModule.__getattr__r7   c                    sZ   d| j vr$t|trd| jj vri | j_|j| j|< |j}t ||S t	| j
|| d S )Nr   __annotations__)rB   rw   r6   rA   r  r8   r7   rl   r   ra   r   r   rs   r2   r3   r   .  s   

zScriptModule.__setattr__c                 C   sJ   d| j v r| j|S tjdd}tj|}t||d | j	|
 j
< d S )Nr   r'   r   )rB   r   definer   r   rm   rn   _parse_source_defr   r}   r>   )rJ   srcrcbr   r2   r2   r3   r  C  s
   
zScriptModule.definec                 C   r`   r9   )r   _replicate_for_data_parallelrU   r2   r2   r3   r  Y  r5   z)ScriptModule._replicate_for_data_parallelexporterc                 C   s&   |  }|j| jt| t|ffS )a  Save a ScriptModule inside of a ``torch.package`` archive.

            Called by ``torch.package.PackageExporter``'s Pickler's ``persistent_id`` when
            saving TorchScript objects. Performs act of saving a ScriptModule inside of
            a ``torch.package`` archive.

            Returns method to load the ScriptModule from a ``torch.package.PackageImporter``'s
            Pickler's ``persistent_load`` function.
            )get_unique_idscript_module_serializer	serializerI   intr   )rJ   r  r   r2   r2   r3   __reduce_package__\  s   

zScriptModule.__reduce_package__r   N)rh   ri   rj   r  __jit_unused_properties__rK   r   r   r   r   r  r   r   r   r  r  r$   r  rz   r2   r2   rs   r3   rx     s   
 rx   )	metaclassc                       s  e Zd ZdZdZ fddZedd Zedd Zd	d
 Z	e
dd Ze
dd Ze
dd Ze
dd Zdd Zeddd Zeddd ZdededefddZdededefdd Zdefd!d"Zdededefd#d$Ze
d%d& Zd'd( Zd)edef fd*d+Zd)ed,edd-f fd.d/Zdefd0d1Zd2ee ef d-B defd3d4Z!d5edededefd6d7Z"de#e fd8d9Z$d:e defd;d<Z%d=d> Z&d?d@ Z'de(e f fdAdBZ)dCdD Z*dEdF Z+  Z,S )GRecursiveScriptModuleaZ  Retain the existing isinstance(ScriptModule) behavior.

        The core data structure in TorchScript is the ``ScriptModule``. It is an
        analogue of torch's ``nn.Module`` and represents an entire model as a tree of
        submodules. Like normal modules, each individual module in a ``ScriptModule`` can
        have submodules, parameters, and methods. In ``nn.Module``\s methods are implemented
        as Python functions, but in ``ScriptModule``\s methods are implemented as
        TorchScript functions, a statically-typed subset of Python that contains all
        of PyTorch's built-in Tensor operations. This difference allows your
        ``ScriptModule``\s code to run without the need for a Python interpreter.

        ``ScriptModule``\s should not be created manually, instead use
        either :func:`tracing <torch.jit.trace>` or :func:`scripting <torch.jit.script>`.
        Tracing and scripting can be applied incrementally and :ref:`composed as necessary <Types>`.

        * Tracing records the tensor operations as executed with a set of example inputs and uses these
          operations to construct a computation graph. You can use the full dynamic behavior of Python with tracing,
          but values other than Tensors and control flow aren't captured in the graph.

        * Scripting inspects the Python code of the model
          and compiles it to TorchScript. Scripting allows the use of many `types`_ of values and supports dynamic control flow.
          Many, but not all features of Python are supported by the compiler, so changes to the source code may be necessary.
        Tc                    s(   d| j d< || _t   t| d d S )NTr   training)rB   rI   rl   rK   r   )rJ   r   rs   r2   r3   rK     s   

RecursiveScriptModule.__init__c                 C   s   t | }|| t | |S )a  
            Construct a RecursiveScriptModule that's ready for use.

            PyTorch code should use this to construct a RecursiveScriptModule instead
            of instead of calling `__init__` directly, as it makes sure the
            object is properly finalized (and in the future, we may take
            control of how the RecursiveScriptModule instance is created).

            Args:
                cpp_module:  The C++ Module that will hold the actual state of
                             this RecursiveScriptModule instance.
                init_fn:  Lambda that initializes the RecursiveScriptModule passed to it.
            )r  _finalize_scriptmodule)r   init_fnscript_moduler2   r2   r3   
_construct  s   
z RecursiveScriptModule._constructc                 C   sB   t tj| j| _t tj| j| _t| j| j	| _	d| _
d S )NF)rG   rm   rn   ParameterDictrI   r   
BufferDictr   rk   r   r   r$  r2   r2   r3   r"    s   
z,RecursiveScriptModule._finalize_scriptmodulec                 C   s   |  | tjj| j | _i }tj| j	 D ]
\}}t
|||< qt| j|| _ttj| j| _ttj| j| _dd | j	 D | _d| jd< dS )z
            Re-construct an instance of RecursiveScriptModule using an instance of a C++ module.

            Args:
                cpp_module: The C++ module that this RecursiveScriptModule will be rebuilt around.
            c                 S   s$   i | ]\}}t |tjjs||qS r2   )rw   rm   rn   ScriptMethodrM   r2   r2   r3   r     s    z6RecursiveScriptModule._reconstruct.<locals>.<dictcomp>Fr   N)rK   rm   rn   ConcreteModuleTypefrom_jit_typerI   _typer   ro   rT   r   rk   r   rG   r&  r   r'  r   rB   )rJ   r   modulesr>   r2   r2   r3   _reconstruct  s   
z"RecursiveScriptModule._reconstructc                 C   s   | j djS )zPReturn a string representation of the internal graph for the ``forward`` method.r   )rI   _get_methodr	  rU   r2   r2   r3   r	    s   zRecursiveScriptModule.graphc                 C      | j jS )z
            Return a string representation of the internal graph for the ``forward`` method.

            This graph will be preprocessed to inline all function and method calls.
            )r   r
  rU   r2   r2   r3   r
    s   z#RecursiveScriptModule.inlined_graphc                 C   r0  )z
            Return a pretty-printed representation (as valid Python syntax) of the internal graph for the ``forward`` method.

            )r   r  rU   r2   r2   r3   r    s   zRecursiveScriptModule.codec                 C   s   | j j}|d t|d fS )a|  Return a tuple.

            Returns a tuple of:

            [0] a pretty-printed representation (as valid Python syntax) of
            the internal graph for the ``forward`` method. See `code`.
            [1] a ConstMap following the CONSTANT.cN format of the output in [0].
            The indices in the [0] output are keys to the underlying constant's values.

            r   r'   )r   r  r   rt   r2   r2   r3   r    s   z)RecursiveScriptModule.code_with_constantsc                 K   s   | j jt|fi |S )am  Save with a file-like object.

            save(f, _extra_files={})

            See :func:`torch.jit.save <torch.jit.save>` which accepts a file-like object.
            This function, torch.save(), converts the object to a string, treating it as a path.
            DO NOT confuse these two functions when it comes to the 'f' parameter functionality.
            )rI   saver   )rJ   fr   r2   r2   r3   r1    s   	zRecursiveScriptModule.savezLite Interpreter is deprecated. Please consider switching to ExecuTorch.             https://docs.pytorch.org/executorch/stable/getting-started.htmlc                 O   "   t jdtdd | jj|i |S )az  Add (or update) the bytecode session to the script model.

            _save_for_lite_interpreter(f)

            The updated model is used
            in lite interpreter for mobile applications.

            Args:
                f: a string containing a file name.
                _extra_files: Map from filename to contents which will be stored as part of 'f'.

            Lite Interpreter is deprecated. Please consider switching to ExecuTorch.                 https://docs.pytorch.org/executorch/stable/getting-started.htmlr   
stacklevel)r   r   r   rI   _save_for_mobiler  r2   r2   r3   _save_for_lite_interpreter  s   z0RecursiveScriptModule._save_for_lite_interpreterc                 O   r3  )Nr4  r   r5  )r   r   r   rI   _save_to_buffer_for_mobiler  r2   r2   r3   $_save_to_buffer_for_lite_interpreter  s   z:RecursiveScriptModule._save_to_buffer_for_lite_interpreterr   r   r   c                 O   s   | j j|i |S r9   )rI   save_to_bufferr  r2   r2   r3   r;  ,  rW   z$RecursiveScriptModule.save_to_bufferc                 O   r`   r9   )rI   get_debug_stater  r2   r2   r3   r<  /  r5   z%RecursiveScriptModule.get_debug_statec                 C   s   d| j  S )Nzoriginal_name=)r  rU   r2   r2   r3   
extra_repr2  r@   z RecursiveScriptModule.extra_reprc                 O   s   | j j| g|R i |S r9   )r   	graph_forr  r2   r2   r3   r>  5  s   zRecursiveScriptModule.graph_forc                 C   s0   t | t| j  u rdS t| j  S )N )r8   r   rI   r,  r>   rU   r2   r2   r3   r  8  s   z#RecursiveScriptModule.original_namec                 C   s"   t jdd}| j| j|| d S )Nr'   r   )r   r   rI   _definer   )rJ   r  r  r2   r2   r3   r  ?  s   	zRecursiveScriptModule.definer   c                    s   d| j vr	td| jrt |S || jv r| j| S | j|r(| j|S | j	|r;| j
|}|| j |< |S t |S )Nr   zKScriptModule has not been initialized, did you forget to call super's init?)rB   r]   r   rl   r   r   rI   rD   r=   r   r/  )rJ   r   r   rs   r2   r3   r   K  s   



z!RecursiveScriptModule.__getattr__r7   Nc                    s   | j r
t ||S || jv r|| j|< d S | j|r%| j|| d S t| dr<|| j v r<t	d| d| dt ||S )Nr   z+Cannot mutate TorchScript constant value: 'z'. Value: '')
r   rl   r   r   rI   rD   ra   r   get_constantsAttributeErrorr   rs   r2   r3   r   c  s   
z!RecursiveScriptModule.__setattr__c                 C   s   t jjt| jS r9   )rm   r   r   r   copyrI   rU   r2   r2   r3   __copy__~  s   zRecursiveScriptModule.__copy__memoc                 C   s   t jjt| j|S r9   )rm   r   r   r   rD  deepcopyrI   )rJ   rF  r2   r2   r3   __deepcopy__  r  z"RecursiveScriptModule.__deepcopy__r   c                 O   s2   t | |}t |dd t t|krt||i |S )N__func__)r=   r  NotImplementedErrorr   r2   r2   r3   r     s   
z*RecursiveScriptModule.forward_magic_methodc                 C   r   )Nr   r   rU   r2   r2   r3   r     r5   zRecursiveScriptModule.__iter__idxc                 C      |  d|S )Nrg   rK  )rJ   rL  r2   r2   r3   rg     r@   z!RecursiveScriptModule.__getitem__c                 C   r   )Nr[   rK  rU   r2   r2   r3   r[     r5   zRecursiveScriptModule.__len__c                 C   rM  )Nre   rK  )rJ   keyr2   r2   r3   re     r@   z"RecursiveScriptModule.__contains__c                    s&   | j }|jttdu rt   S | S )N__dir__)rO  rI  r?   r  rl   rJ   r   rs   r2   r3   rO    s   
zRecursiveScriptModule.__dir__c                 C   s    | j }|jttdu rdS | S )Nr   T)r   rI  r?   r  rP  r2   r2   r3   r     s   zRecursiveScriptModule.__bool__c                 C   s   dd }t | j |S )Nc                 S   r   r9   r2   r(  r2   r2   r3   r#    r<   zCRecursiveScriptModule._replicate_for_data_parallel.<locals>.init_fn)r  r%  rI   r  )rJ   r#  r2   r2   r3   r    s   
z2RecursiveScriptModule._replicate_for_data_parallel)-rh   ri   rj   r  r   rK   staticmethodr%  r"  r.  r   r	  r
  r  r  r1  r   r8  r:  r   r;  r<  r   r=  r>  r  r  r   r   r	   rE  dictr  rH  r   r   r   rg   r[   re   r   rO  r   r  rz   r2   r2   rs   r3   r  j  sj    	

 





	


	r  __c                    s   dd l   j|  fdddS )Nr   c                    s     | p	 | S r9   )
isfunctionismethodxinspectr2   r3   r     rR   z_get_methods.<locals>.<lambda>)	predicate)rY  
getmembersr0   r2   rX  r3   _get_methods  s   r\  >%   tocpucudaevalhalfr8   applyfloattrain_applydoublebuffersr   r-  children	_get_name	zero_grad
add_moduler=  
parameters
state_dictshare_memory_slow_forward_tracing_namenamed_buffersnamed_modules_named_membersnamed_childrenget_extra_stateload_state_dictregister_bufferregister_moduleset_extra_statenamed_parametersregister_parameter_save_to_state_dict_load_from_state_dictc                    s    fdd}|S )Nc                    s   t  d )Nz" is not supported on ScriptModulesr\   r  r>   r2   r3   fail  r@   z_make_fail.<locals>.failr2   )r>   r  r2   r~  r3   
_make_fail  s   r  
_call_implc                   @   r   )r   Nr   r2   r2   r2   r3   r     r   c                          e Zd Zd fdd	Z  ZS )rx   Nc                    r  r9   r  rJ   argrs   r2   r3   rK     r  r  r9   r   r2   r2   rs   r3   rx         c                       r  )r  Nc                    r  r9   r  r  rs   r2   r3   rK     r  r!  r9   r   r2   r2   rs   r3   r    r  c                 C   s   t | tjjs	| S t| }||v r|t|  S t| dr |  n| } | ||< i }| j D ]5\}}|dkrJ| D ]\}}t	||||< q9|||< q-t |tjjr^t |t
s^t	||||< q-|||< q-| D ]}|| j|< qg| S )N__prepare_scriptable__r   )rw   rm   nnr    idrD   r  rB   rT   !call_prepare_scriptable_func_implrx   rY   )r   rF  obj_idnew_obj_dictr>   
sub_modulerO   rP   r2   r2   r3   r     s,   

r  c                 C   s   i }t | |S r9   )r  )r   rF  r2   r2   r3   call_prepare_scriptable_funcG  s   
r  c                 C      t j| S )a  
    Create a ``torch._C.ScriptDict`` instance with the data from ``obj``.

    Args:
        obj (dict): The Python dictionary that is used to initialize the ``ScriptDict``
                    returned by this function.

    Returns:
        An instance of ``torch._C.ScriptDict`` that has the same data as ``obj``
        and can be passed between Python and TorchScript with reference semantics and
        zero copy overhead.
    )rm   rn   
ScriptDict)r   r2   r2   r3   create_script_dictL  s   r  c                 C   r  )a  
    Create a ``torch._C.ScriptList`` instance with the data from ``obj``.

    Args:
        obj (dict): The Python list that is used to initialize the ``ScriptList``
                    returned by this function.
    Returns:
        An instance of ``torch._C.ScriptList`` that has the same data as ``obj``
        and can be passed between Python and TorchScript with reference semantics and
        zero copy overhead.
    )rm   rn   
ScriptList)r   	type_hintr2   r2   r3   create_script_list\  s   r  T	_TOPLEVELexample_inputsc                 C   s  |d urt jdtdd t| tr| S t| tr| S t| tr!| S |rst at	rlt
t}t	|3 t|trI| D ]\}}|D ]}||  q@q:nt|trX|D ]}	| |	  qPntdW d    n1 sfw   Y  nt jddd t| tjjrt| } tjj| tjjjS t| dr|  n| } t| trt| S t| trt| S t| rt| }
t| tjjrtd|  d	t| t j!r| S t"| std
t#| $ dkrtd|d u rt%&|d }t'| ||
 | S t(| st)| rVt| }
t| dr
| j*} t%+| }t| drtd| j, t-|  t.| }|r'| |_/|S t0| | j1}|d u r7t%+| }tj23|
||t4| }| j5|_5d|_1d|_6| |_/t7| | |S tjj8| S )Nz^`optimize` is deprecated and has no effect. Use `with torch.jit.optimized_execution()` insteadr   r5  zError: Unable to infer types. Please format the inputs to type `List[Tuple]` or `Dict[Callable, List[Tuple]]` to be run with MonkeyType.zWarning: monkeytype is not installed. Please install https://github.com/Instagram/MonkeyType to enable Profile-Directed Typing in TorchScript. Refer to https://github.com/Instagram/MonkeyType/blob/master/README.rst to install MonkeyType. r   r  zType 'zO' cannot be compiled since it inherits from nn.Module, pass an instance insteadzLTorchScript classes must be new-style classes. Please inherit from 'object'.z\TorchScript classes does not support inheritance yet. Please directly inherit from 'object'.r'   __script_if_tracing_wrapper__script_unsupportedzTorchScript error: r*   r+   )9r   r   FutureWarningrw   r   rx   r*   r   r:   r   r   rR  rT   list
ValueErrorrm   r  r    r  r   r   r   r   rD   r  r  r  rY  isclassr   
issubclassr]   enumEnumrF   rZ   mror   r   r   rT  rU  __original_fn#createResolutionCallbackFromClosurer  "_check_directly_compile_overloadedr   _torchdynamo_inliner   rh   rn   _jit_script_compiler   r  rj   r   create_script_class)r   optimize
_frames_upr   r  monkeytype_configrq   example_inputexampleexamplesqualified_namemaybe_already_compiled_fnr   r   r2   r2   r3   _script_impln  s   	

















r  r   r  r  r   c                 C   sp   t jdkrtdt ntdt ts| S zt}dat| ||d ||d}|r0tdt	|d |W |aS |aw )	a  Script the function.

    Scripting a function or ``nn.Module`` will inspect the source code, compile
    it as TorchScript code using the TorchScript compiler, and return a :class:`ScriptModule` or
    :class:`ScriptFunction`. TorchScript itself is a subset of the Python language, so not all
    features in Python work, but we provide enough functionality to compute on
    tensors and do control-dependent operations. For a complete guide, see the
    :ref:`language-reference`.

    Scripting a dictionary or list copies the data inside it into a TorchScript instance than can be
    subsequently passed by reference between Python and TorchScript with zero copy overhead.

    ``torch.jit.script`` can be used as a function for modules, functions, dictionaries and lists
     and as a decorator ``@torch.jit.script`` for torchscript-classes and functions.

    Args:
        obj (Callable, class, or nn.Module):  The ``nn.Module``, function, class type,
                                                  dictionary, or list to compile.
        example_inputs (Union[List[Tuple], Dict[Callable, List[Tuple]], None]): Provide example inputs
            to annotate the arguments for a function or ``nn.Module``.

    Returns:
        If ``obj`` is ``nn.Module``, ``script`` returns
        a :class:`ScriptModule` object. The returned :class:`ScriptModule` will
        have the same set of sub-modules and parameters as the
        original ``nn.Module``. If ``obj`` is a standalone function,
        a :class:`ScriptFunction` will be returned. If ``obj`` is a ``dict``, then
        ``script`` returns an instance of `torch._C.ScriptDict`. If ``obj`` is a ``list``,
        then ``script`` returns an instance of `torch._C.ScriptList`.

    **Scripting a function**
        The ``@torch.jit.script`` decorator will construct a :class:`ScriptFunction`
        by compiling the body of the function.

        Example (scripting a function):

        .. testcode::

            import torch

            @torch.jit.script
            def foo(x, y):
                if x.max() > y.max():
                    r = x
                else:
                    r = y
                return r

            print(type(foo))  # torch.jit.ScriptFunction

            # See the compiled graph as Python code
            print(foo.code)

            # Call the function using the TorchScript interpreter
            foo(torch.ones(2, 2), torch.ones(2, 2))

        .. testoutput::
            :hide:

            ...

    ****Scripting a function using example_inputs**
        Example inputs can be used to annotate a function arguments.

        Example (annotating a function before scripting):

        .. testcode::

            import torch

            def test_sum(a, b):
                return a + b

            # Annotate the arguments to be int
            scripted_fn = torch.jit.script(test_sum, example_inputs=[(3, 4)])

            print(type(scripted_fn))  # torch.jit.ScriptFunction

            # See the compiled graph as Python code
            print(scripted_fn.code)

            # Call the function using the TorchScript interpreter
            scripted_fn(20, 100)

        .. testoutput::
            :hide:

            ...

    **Scripting an nn.Module**
        Scripting an ``nn.Module`` by default will compile the ``forward`` method and recursively
        compile any methods, submodules, and functions called by ``forward``. If a ``nn.Module`` only uses
        features supported in TorchScript, no changes to the original module code should be necessary. ``script``
        will construct :class:`ScriptModule` that has copies of the attributes, parameters, and methods of
        the original module.

        Example (scripting a simple module with a Parameter):

        .. testcode::

            import torch

            class MyModule(torch.nn.Module):
                def __init__(self, N, M):
                    super().__init__()
                    # This parameter will be copied to the new ScriptModule
                    self.weight = torch.nn.Parameter(torch.rand(N, M))

                    # When this submodule is used, it will be compiled
                    self.linear = torch.nn.Linear(N, M)

                def forward(self, input):
                    output = self.weight.mv(input)

                    # This calls the `forward` method of the `nn.Linear` module, which will
                    # cause the `self.linear` submodule to be compiled to a `ScriptModule` here
                    output = self.linear(output)
                    return output

            scripted_module = torch.jit.script(MyModule(2, 3))

        Example (scripting a module with traced submodules):

        .. testcode::

            import torch
            import torch.nn as nn
            import torch.nn.functional as F

            class MyModule(nn.Module):
                def __init__(self) -> None:
                    super().__init__()
                    # torch.jit.trace produces a ScriptModule's conv1 and conv2
                    self.conv1 = torch.jit.trace(nn.Conv2d(1, 20, 5), torch.rand(1, 1, 16, 16))
                    self.conv2 = torch.jit.trace(nn.Conv2d(20, 20, 5), torch.rand(1, 20, 16, 16))

                def forward(self, input):
                    input = F.relu(self.conv1(input))
                    input = F.relu(self.conv2(input))
                    return input

            scripted_module = torch.jit.script(MyModule())

        To compile a method other than ``forward`` (and recursively compile anything it calls), add
        the :func:`@torch.jit.export <torch.jit.export>` decorator to the method. To opt out of compilation
        use :func:`@torch.jit.ignore <torch.jit.ignore>` or :func:`@torch.jit.unused <torch.jit.unused>`.

        Example (an exported and ignored method in a module)::

            import torch
            import torch.nn as nn


            class MyModule(nn.Module):
                def __init__(self) -> None:
                    super().__init__()

                @torch.jit.export
                def some_entry_point(self, input):
                    return input + 10

                @torch.jit.ignore
                def python_only_fn(self, input):
                    # This function won't be compiled, so any
                    # Python APIs can be used
                    import pdb

                    pdb.set_trace()

                def forward(self, input):
                    if self.training:
                        self.python_only_fn(input)
                    return input * 99


            scripted_module = torch.jit.script(MyModule())
            print(scripted_module.some_entry_point(torch.randn(2, 2)))
            print(scripted_module(torch.randn(2, 2)))

        Example ( Annotating forward of nn.Module using example_inputs)::

            import torch
            import torch.nn as nn
            from typing import NamedTuple

            class MyModule(NamedTuple):
            result: List[int]

            class TestNNModule(torch.nn.Module):
                def forward(self, a) -> MyModule:
                    result = MyModule(result=a)
                    return result

            pdt_model = TestNNModule()

            # Runs the pdt_model in eager model with the inputs provided and annotates the arguments of forward
            scripted_model = torch.jit.script(pdt_model, example_inputs={pdt_model: [([10, 20, ], ), ], })

            # Run the scripted_model with actual inputs
            print(scripted_model([20]))
    r   zv`torch.jit.script` is not supported in Python 3.14+ and may break. Please switch to `torch.compile` or `torch.export`.zU`torch.jit.script` is deprecated. Please switch to `torch.compile` or `torch.export`.Fr'   )r   r  r  r   r  script)model_id)
r   r   r   r   r   r   r  r  r   r   )r   r  r  r   r  prevretr2   r2   r3   r    s4    
Qr  c                 C   s@   |  D ]\}}|| vs| | |krtjj|d| qd S )NzDefault parameters on overloads do not affect the runtime so they must equal to the default parameter on the implementation function. Found on parameter )rT   rm   r   frontendFrontendError)impl_defaultsoverload_defaultslocr>   overload_valuer2   r2   r3   _check_overload_defaults  s   r  c           
      C   sz   t | | j }tjj| d d t| }t ||j}t	| }t	|}t
|}t|||  tj||||||}	|	S r9   )r   rh   declrm   r   annotationsget_signaturerY  rU  r   r   r  r  rangern   _jit_script_compile_overload)
overload_fn	qual_nameimpl_fnoverload_decloverload_signatureimpl_astr  implementation_defaultsr   r   r2   r2   r3   _compile_function_with_overload  s(   

r  c                    sv   t  }t t}|d u r|S  |v rttd  fdd|D }|r/|| }t | t |S )Nfunctionc                    s   g | ]}t | qS r2   )r  )rN   r  r   r  r2   r3   rQ     s    
z"_get_overloads.<locals>.<listcomp>)r   r   r   _get_fn_overloadsr]   ,get_overload_no_implementation_error_messager   _clear_fn_overloads)r   existing_compiled_fnsuncompiled_overloadscompiled_fnsr2   r  r3   _get_overloads  s"   



r  c                 C   s.   t | }t|st| rtd| dd S )Nz	Function z cannot be directly compiled because it is overloaded. It must be used in a context of a function where its inputs can determine which overload to call.)r   r   r  r   r]   r  r2   r2   r3   r  +  s   
r  c                 C   s   t dt t| stdt| stdt| tj	j
o%t|  dk}|s4t|  dkr4tdt| }td}t| | j}tj||||}|| _| S )a  Decorate to annotate classes or modules of different types.

    .. deprecated:: 2.5
        TorchScript is deprecated, please use ``torch.compile`` instead.

    This decorator can be used to define an interface that can be used to annotate
    classes or modules of different types. This can be used for to annotate a submodule
    or attribute class that could have different types that implement the same
    interface, or which could be swapped at runtime; or to store a list of modules or
    classes of varying types.

    It is sometimes used to implement "Callables" - functions or modules that implement
    an interface but whose implementations differ and which can be swapped out.

    Example:
    .. testcode::

        import torch
        from typing import List

        @torch.jit.interface
        class InterfaceType:
            def run(self, x: torch.Tensor) -> torch.Tensor:
                pass

        # implements InterfaceType
        @torch.jit.script
        class Impl1:
            def run(self, x: torch.Tensor) -> torch.Tensor:
                return x.relu()

        class Impl2(torch.nn.Module):
            def __init__(self) -> None:
                super().__init__()
                self.val = torch.rand(())

            @torch.jit.export
            def run(self, x: torch.Tensor) -> torch.Tensor:
                return x + self.val

        def user_fn(impls: List[InterfaceType], idx: int, val: torch.Tensor) -> torch.Tensor:
            return impls[idx].run(val)

        user_fn_jit = torch.jit.script(user_fn)

        impls = [Impl1(), torch.jit.script(Impl2())]
        val = torch.rand(4, 4)
        user_fn_jit(impls, 0, val)
        user_fn_jit(impls, 1, val)
    zH`torch.jit.interface` is deprecated. Please use `torch.compile` instead.z$interface must be applied to a classz1TorchScript interfaces must inherit from 'object'r   r   zmTorchScript interface does not support inheritance yet. Please directly inherit from 'object' or 'nn.Module'.r'   )r   r   r   rY  r  r]   rF   r  rm   r  r    rZ   r  r   r   r   r   rh   rn   _jit_script_interface_compile__torch_script_interface__)r   is_module_interfacer  r  r   mangled_classnamer2   r2   r3   	interface5  s*   3

r  c                 C   s,   t | }tj||}t| }t| ||S r9   )r   rm   rn   	CallStackr   'createResolutionCallbackForClassMethodsr   )r   r  
_qual_nameerror_stackr  r2   r2   r3   _recursive_compile_class  s   
r   spaddingoffsetcharc                    s<   |t | kr|t | 8 }d fddt|| D |  S )Nr?  c                    s   g | ]} qS r2   r2   )rN   r   r  r2   r3   rQ     s    zpad.<locals>.<listcomp>)rZ   joinr  )r  r  r  r  r2   r  r3   pad  s   $r  c                   @   s>   e Zd ZddededefddZded	efd
dZdd ZdS )_ScriptProfileColumn   r   header	alignmentr  c                 C   s   || _ || _|| _i | _d S r9   )r  r  r  rows)rJ   r  r  r  r2   r2   r3   rK     s   
z_ScriptProfileColumn.__init__linenor7   c                 C   s   || j |< d S r9   )r  )rJ   r  r7   r2   r2   r3   add_row  r  z_ScriptProfileColumn.add_rowc                    s   t j}g }j D ]\}}t|}|||f tt ||}qjdkr5|j    j 8  nd  fdd|D }tj j	|fS )Nr   c                    s"   g | ]\}}|t | jfqS r2   )r  r  )rN   rN  cellr  rJ   r2   r3   rQ     s   " z4_ScriptProfileColumn.materialize.<locals>.<listcomp>)
rZ   r  r  rT   r   appendmaxr  r  r  )rJ   
max_lengthr  rN  r7   r  r2   r  r3   materialize  s   


z _ScriptProfileColumn.materializeN)r  r   )	rh   ri   rj   r   r  rK   r   r  r  r2   r2   r2   r3   r    s    r  c                   @   s.   e Zd Zdee dee fddZdd ZdS )_ScriptProfileTablecolssource_rangec                 C   s   || _ || _d S r9   )r  r  )rJ   r  r  r2   r2   r3   rK     s   
z_ScriptProfileTable.__init__c           
      C   s   g }g }d}| j D ]}| \}}||7 }||t|f q	|| |tdt|dd | jD ]'}d}|D ]\}}||}	|	d u rP|tdt|7 }q9||	7 }q9|| q3d|S )Nr?  r   =
)	r  r  r  rR  r  rZ   r  r   r  )
rJ   outputscellsheader_buffercolr  r  line
row_bufferr  r2   r2   r3   dump_string  s$   





z_ScriptProfileTable.dump_stringN)rh   ri   rj   r  r  r  rK   r  r2   r2   r2   r3   r    s    r  c                   @   s<   e Zd ZdddZdd Zdd Zdefd	d
Zdd ZdS )_ScriptProfiler   Nc                 C   s   t j | _d S r9   )r
   	profilingr  profilerU   r2   r2   r3   rK        z_ScriptProfile.__init__c                 C      | j   d S r9   )r  enablerU   r2   r2   r3   r     r  z_ScriptProfile.enablec                 C   r  r9   )r  disablerU   r2   r2   r3   r    r  z_ScriptProfile.disablec                    s   g }| j  D ]}| }|  }tdd |D   fdd|D }| }|t| }t||}t	d}t	d}	t	d}
t	dd	d
}|
 }|D ]+}||| |||||   ||}|d urw|	||  |
||  qLt||	|
|gt|}||  qd|S )Nc                 s   s&    | ]}t |t |d  V  qdS )r  N)rZ   lstriprN   r  r2   r2   r3   	<genexpr>  s   $ z-_ScriptProfile.dump_string.<locals>.<genexpr>c                    s   g | ]}| d  qS r9   r2   r  dedentr2   r3   rQ     s    z._ScriptProfile.dump_string.<locals>.<listcomp>zLine #Hitsz	Time (ns)zLine Contentsr   r'   z

)r  _dump_statssourcetext
splitlinesminstarting_linenorZ   r  r  line_mapr  r   countduration_nsr  r  r  r  r  )rJ   r  source_stats
source_refsource_lines
start_lineend_liner  r  hitstime_nsline_contentsstatsr  stattabler2   r  r3   r    s6   


z_ScriptProfile.dump_stringc                 C   s   t |   d S r9   )printr  rU   r2   r2   r3   dump  r  z_ScriptProfile.dumpr  )	rh   ri   rj   rK   r   r  r   r  r  r2   r2   r2   r3   r    s    
r  c                 C   s   | d u rt d| S )NzUnwrapping null optional)AssertionErrorrV  r2   r2   r3   _unwrap_optional  s   r  zaten::_unwrap_optionalzaten::is_scriptingzaten::has_torch_functionr9   )Nr   NN)r   r  )r  collectionsrD  r  r   rY  r.   r   r   collections.abcr   r   r   r   typingr   r   typing_extensionsr   r	   rm   torch._jit_internalr   torch._classesr
   r   r   torch._utils_internalr   torch.jit._builtinsr   torch.jit._fuserr   r   torch.jit._monkeytype_configr   r   r   torch.jit._recursiver   r   r   r   torch.jit._stater   r   r   r   r   torch.jit.frontendr   r   r   torch.nnr    torch.overridesr!   r"   r#   torch.packager$   r%   torch.utilsr&   _serializationr(   r)   r:   rn   r)  r>  r*   rh   rj   r4   
__reduce__
namedtupler6   r;   r?   rF   rG   rk   r8   r{   r   Warningr   r   r   r   r  r   _magic_methodsr   r   r  ra   rx   r  rB   rT   r>   itemcallablerw   r   
startswithrD   r\  _compiled_methods_allowlistr  methodendswithr  r  r  r  r  boolr  r  tuplerR  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  is_scriptingr2   r2   r2   r3   <module>   s   	


L#1>
A
V  _(
'

 
 v
U	
,


