
    GjV                    H   U d dl mZ d dlZd dlmZ d dlmZmZmZ d dlm	Z	m
Z
mZ d dlZd dlmZ erd dlmZ dd	lmZ g d
Z ed          Z e	d          Z eej        d          sH ed          ej        j        d<    ed          ej        j        d<    ed          ej        j        d<   d dlmZmZmZ d/dZd0dZ G d de          Z G d d          Zej         j!        ede"f         z  Z#de$d<   e	 	 	 d1d2d(            Z%e	 	 	 d1d3d+            Z%	 	 	 d1d4d.Z%dS )5    )annotationsN)Callable)overloadTYPE_CHECKING	TypeAlias)	ParamSpecSelfTypeVar)Tensor)_POOL_HANDLE   )_dummy_type)is_current_stream_capturinggraph_pool_handleXPUGraphgraphmake_graphed_callables_R_P_XpuStreamBase	_XPUGraph_xpu_graph_pool_handle_xpu_isCurrentStreamCapturing)r   r   r   returnboolc                     t                      S )zReturn 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        S/var/www/html/Carbon-Document/venv/lib/python3.11/site-packages/torch/xpu/graphs.pyr   r   (   s    
 )***r   r   c                 X    t           j                            t                                S )zBReturn an opaque token representing the id of a graph memory pool.)torchxpur   r   r   r   r   r   r   0   s    9!!"8":":;;;r   c                       e Zd ZdZdd fdZdd fdZd fdZd fdZd fdZd fdZ	d fdZ
d fdZd  fdZd! fdZd! fdZ xZS )"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``.

    F
keep_graphr   r   r	   c                H    t                                          | |          S N)super__new__)clsr$   	__class__s     r   r(   zXPUGraph.__new__F   s    wwsJ///r   Npool_POOL_HANDLE | NoneNonec                L    t                                          |           dS )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.
        r+   N)r'   capture_begin)selfr+   r*   s     r   r0   zXPUGraph.capture_beginI   s&     	4(((((r   c                H    t                                                       dS )a  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r1   r*   s    r   r3   zXPUGraph.capture_endV   s!     	r   c                H    t                                                       dS )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'   instantiater4   s    r   r6   zXPUGraph.instantiate`   s!     	r   c                H    t                                                       dS )z+Replay the XPU work captured by this graph.N)r'   replayr4   s    r   r8   zXPUGraph.replayi   s    r   c                H    t                                                       dS )z1Delete the graph currently held by this instance.N)r'   resetr4   s    r   r:   zXPUGraph.resetm   s    r   r   c                D    t                                                      S )zReturn 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'   r+   r4   s    r   r+   zXPUGraph.poolq   s     ww||~~r   c                D    t                                                      S )z.Enable debugging mode for XPUGraph.debug_dump.)r'   enable_debug_moder4   s    r   r=   zXPUGraph.enable_debug_modey   s    ww((***r   
debug_pathstrc                F    t                                          |          S )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)r1   r>   r*   s     r   rA   zXPUGraph.debug_dump}   s     ww!!*---r   intc                D    t                                                      S )zReturns the underlying xpuGraph_t. ``keep_graph`` must be True.

        XPU doesn't provide APIs to manipulate this object.
        )r'   raw_xpu_graphr4   s    r   rD   zXPUGraph.raw_xpu_graph   s    
 ww$$&&&r   c                D    t                                                      S )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_execr4   s    r   rF   zXPUGraph.raw_xpu_graph_exec   s    
 ww))+++r   )F)r$   r   r   r	   r&   )r+   r,   r   r-   r   r-   r   r   )r>   r?   r   r-   )r   rB   )__name__
__module____qualname____doc__r(   r0   r3   r6   r8   r:   r+   r=   rA   rD   rF   __classcell__)r*   s   @r   r   r   5   s}         0 0 0 0 0 0 0) ) ) ) ) ) )                         + + + + + +. . . . . .' ' ' ' ' ', , , , , , , , , ,r   r   c                  @    e Zd ZU dZdZded<   	 	 ddd
ZddZddZdS )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_stream	xpu_graphr   r+   r,   streamc                   | j         j        (t          j                                        | j         _        |dn|f| _        ||n| j         j        | _        | j        t          d          | j        | _        || _	        d S )Nr   zcapture_stream must not be None)
r*   rP   r!   r"   Streamr+   capture_streamAssertionError
stream_ctxrQ   )r1   rQ   r+   rR   s       r   __init__zgraph.__init__   s     >0849I4D4D4F4FDN1;?<RRdW	(FFdn.S 	 & !BCCC-"r   r   r-   c                    t           j                                         t           j                                         | j                                          | j        j        | j          d S r&   )	r!   r"   synchronizeempty_cacherW   	__enter__rQ   r0   r+   )r1   s    r   r\   zgraph.__enter__   sX    		!!###$$di0000r   argsobjectc                V    | j                                           | j        j        |  d S r&   )rQ   r3   rW   __exit__)r1   r]   s     r   r`   zgraph.__exit__   s.    ""$$$  $''''r   )NN)rQ   r   r+   r,   rR   rO   rG   )r]   r^   r   r-   )	rI   rJ   rK   rL   rP   __annotations__rX   r\   r`   r   r   r   r   r      s}            7;::::
 %)*.	# # # # #*1 1 1 1( ( ( ( ( (r   r   .r   _ModuleOrCallable   F	callablessample_argstuple[Tensor, ...]num_warmup_itersrB   allow_unused_inputr+   r,   c                    d S r&   r   rd   re   rg   rh   r+   s        r   r   r      s	     r   tuple[_ModuleOrCallable, ...]tuple[tuple[Tensor, ...], ...]c                    d S r&   r   rj   s        r   r   r      s	     %(Cr   1_ModuleOrCallable | tuple[_ModuleOrCallable, ...]3tuple[Tensor, ...] | tuple[tuple[Tensor, ...], ...]c                  )* t          j                    r"t          j                    rt          d          d}t	          | t
                    s.d}| f} t          j        t
          t          df         |          f}n4t          j        t
          t
          t          df         df         |          }g )t          | |          D ]\  }}t	          |t           j
        j                  rt          |j                  dk    r0t          |j                  dk    rt          |j                  dk    st          d          t!          d |                                D                       st          d          t          j        j        j        | }	)                    t          |	                     t!          d	 |	D                       st-          d
          d )D             }
d | D             *)*fdt/          t          |                     D             }d t/          t          |                     D             }d t/          t          |                     D             }|t1                      n|}t           j                                         t           j                            t           j                                                  5  t          | ||          D ]\  }}}d\  }}}t/          |          D ]}t           j        j                             ||           }t          d |D                       }t          |          dk    rRt           j                            |t          d |D                       t          d |D                       d|          }|||fD ]}~	 ddd           n# 1 swxY w Y   t           j                                         g }g }t          | ||          D ]\  }}}t           j                             ||          5   || }ddd           n# 1 swxY w Y   t           j        j        !                    |          \  }}|                    t          |                     |                    |           g }g }t          tE          |          tE          |          tE          |                    D ]Z\  }}}t          d |D                       } t          d |D                       }d}t          |          dk    rt           j                             ||          5  t           j                            |t          d |D                       t          d | D                       d|          }ddd           n# 1 swxY w Y   g }!d}"|D ]A}#|#j#        r#|!|!                    ||"                    |"dz  }",|!                    d           Bt          |!          }!|                    |            |                    |!           \|$                                 |$                                 d6d-}$g }%tK          |           D ]\  }&} |$||&         ||&         *|&         |
|&         ||&         ||&         ||&         ||&         ||&         	  	        }'t	          |t           j
        j                  r7d7d5}( |(||j&        |'|j'                  |_'        |%                    |           |%                    |'           |r|%d         S t          |%          S )8a  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`.
    z_make_graphed_callables does not support the autocast caching. Please set `cache_enabled=False`.FT.r   zModules 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.c              3  (   K   | ]}|j         d u V  dS )FNrequires_grad.0bs     r   	<genexpr>z)make_graphed_callables.<locals>.<genexpr>F  s)      EEAq%/EEEEEEr   zIn any :class:`~torch.nn.Module` passed to :func:`~make_graphed_callables`, only parameters may be trainable. All buffers must have ``requires_grad=False``.c              3  J   K   | ]}t          |t          j                  V  d S r&   )
isinstancer!   r   )ru   args     r   rw   z)make_graphed_callables.<locals>.<genexpr>N  s.      HHS:c5<00HHHHHHr   zfIn the beta API, sample_args for each callable must contain only Tensors. Other types are not allowed.c                ,    g | ]}t          |          S r   )len)ru   r]   s     r   
<listcomp>z*make_graphed_callables.<locals>.<listcomp>V  s    !L!L!L#d))!L!L!Lr   c                    g | ]D}t          |t          j        j                  r!t	          |                                          nd ES )r   )ry   r!   nnModuletuple
parameters)ru   cs     r   r}   z*make_graphed_callables.<locals>.<listcomp>W  sP     " " " ",Aux!?!?GallnnR" " "r   c                2    g | ]}|         |         z   S r   r   )ru   iflatten_sample_argsper_callable_module_paramss     r   r}   z*make_graphed_callables.<locals>.<listcomp>[  s9     * * * 	A!;A!>>* * *r   c                J    g | ] }t           j                                        !S r   r!   r"   r   ru   _s     r   r}   z*make_graphed_callables.<locals>.<listcomp>`  &    FFF1%)$$&&FFFr   c                J    g | ] }t           j                                        !S r   r   r   s     r   r}   z*make_graphed_callables.<locals>.<listcomp>a  r   r   N)NNNc              3  (   K   | ]}|j         	|V  d S r&   rr   ru   os     r   rw   z)make_graphed_callables.<locals>.<genexpr>n  s)      $K$K11?$KQ$K$K$K$K$K$Kr   c              3  (   K   | ]}|j         	|V  d S r&   rr   ru   r   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>r  s=       % %"#q%% % % % % %r   c              3  L   K   | ]}|j         	t          j        |          V   d S r&   rs   r!   
empty_liker   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>u  sH       + +45AO+!,Q//+ + + + + +r   )outputsinputsgrad_outputsonly_inputsallow_unusedr/   c              3  P   K   | ]!}|j         rt          j        |          nd V  "d S r&   r   r   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>  sJ       $
 $
AB1?<EQ$
 $
 $
 $
 $
 $
r   c              3  (   K   | ]}|j         	|V  d S r&   rr   r   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>  s)      JJ1!/JQJJJJJJr   c              3  (   K   | ]}|j         	|V  d S r&   rr   r   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>  s)       T TqAO T T T T T T Tr   c              3     K   | ]}||V  	d S r&   r   r   s     r   rw   z)make_graphed_callables.<locals>.<genexpr>  s"      &W&WQq&W&Wr      	fwd_graphr   	bwd_graphmodule_paramstuple[torch.nn.Parameter, ...]len_user_argsrB   output_unflatten_spectorch.utils._pytree.TreeSpecstatic_input_surfacerf   static_outputsstatic_grad_outputstuple[Tensor | None, ...]static_grad_inputsr   Callable[..., object]c	           	     t    
  G  fddt           j        j                  
d
fd}	|	S )Nc                      e Zd Zedfd            Zeej        j        j        d fd	                        Z	d
S )Omake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphedctxr^   r   r   r   rf   c                x   t                    D ]Y}|                                         ||                                         k    r!|                             ||                    Z                                 t	          t
                    st          d          t          d D                       S )Nzstatic_outputs must be a tuplec              3  >   K   | ]}|                                 V  d S r&   detachr   s     r   rw   zjmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.forward.<locals>.<genexpr>  s*      @@AQXXZZ@@@@@@r   )rangedata_ptrcopy_r8   ry   r   RuntimeError)r   r   r   r   r   r   r   s      r   forwardzWmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.forward  s     }-- A AA+A.7799VAY=O=O=Q=QQQ,Q/55fQi@@@  """!.%88 I&'GHHH@@@@@@@@r   gradsc                   t          |          t                    k    r/t          dt                     dt          |                     t          |          D ]F\  }}|?|                                |                                k    r|                    |           G                                 t          t                    st          d          t          d D                       S )Nz	Expected z gradients but got z"static_grad_inputs must be a tuplec              3  F   K   | ]}||                                 n|V  d S r&   r   rt   s     r   rw   zkmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.backward.<locals>.<genexpr>  sC        ;<!-AHHJJJQ     r   )r|   r   zipr   r   r8   ry   r   )r   r   ggradr   r   r   s       r   backwardzXmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.Graphed.backward  s
    u::%8!9!999&]C(;$<$<]]QTUZQ[Q[]]    ##6>> * *GAt}::<<4==??::GGDMMM  """!"4e<< M&'KLLL  @R     r   N)r   r^   r   r   r   rf   )r   r^   r   r   r   rf   )
rI   rJ   rK   staticmethodr   r!   autogradfunctiononce_differentiabler   )r   r   r   r   r   r   r   s   r   Graphedr     s        A A A A A A A A \A ^$8       98 \  r   r   	user_argsr^   r   c                     t          j        j        j        |  } j        t          |          z    }t           j        j                            |          S r&   )r!   utils_pytreearg_tree_leavesapplyr   tree_unflatten)r   flatten_user_argsoutr   r   r   s      r   functionalizedzVmake_graphed_callables.<locals>.make_graphed_autograd_function.<locals>.functionalized  sN     % 3 CY O'-%(9":":]"JLC;&55c;PQQQr   )r   r^   r   r^   )r!   r   Function)r   r   r   r   r   r   r   r   r   r   r   s   ````````` @r   make_graphed_autograd_functionz>make_graphed_callables.<locals>.make_graphed_autograd_function  s    	 	 	 	 	 	 	 	 	 	 	 	 	en- 	 	 	B	R 	R 	R 	R 	R 	R 	R 	R r   functorch.nn.Modulegraph_training_stater   graphedCallable[_P, _R]orig_fwdc                      d fd}|S )	Nr   _P.argsuser_kwargs	_P.kwargsr   r   c                 :    j         k    r | i |S  | i |S r&   )training)r   r   r   r   r   r   s     r   new_fwdzEmake_graphed_callables.<locals>.make_graphed_forward.<locals>.new_fwd  s;    }(<<<&w	A[AAA'xBkBBBr   )r   r   r   r   r   r   r   )r   r   r   r   r   s   ```` r   make_graphed_forwardz4make_graphed_callables.<locals>.make_graphed_forward  sC    C C C C C C C C C r   )r   r   r   r   r   r   r   rB   r   r   r   rf   r   rf   r   r   r   rf   r   r   )
r   r   r   r   r   r   r   r   r   r   )(r!   is_autocast_enabledis_autocast_cache_enabledr   ry   r   typingcastr   r   r   r   r|   _backward_hooks_forward_hooks_forward_pre_hooksallbuffersr   r   r   append	TypeErrorr   r   r"   rZ   rR   rT   tree_leavesr   r   r   tree_flattenreversedrs   reverse	enumerater   r   )+rd   re   rg   rh   r+   just_one_callable_sample_argsr   r]   flatten_argper_callable_len_user_args"per_callable_static_input_surfaces
fwd_graphs
bwd_graphsmempoolr   r   grad_inputsr   outputs_gradr   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_idxrz   r   retr   r   r   r   r   s+                                            @@r   r   r      s	   N  "" 
u'F'H'H 
m
 
 	
  i'' P L	E&#+$6DDF{5vs{);S)@#A;OOy,//  4a)) 	A%&&!++())Q..,--22"a   EEEEEEE "1  
 k)94@""5#5#5666HHKHHHHH 	^  	 "M!L8K!L!L!L" "" " "* * * * *s9~~&&* * *&
 GFc)nn0E0EFFFJFFc)nn0E0EFFFJ%)\!!!tG 
I			%)**,,	-	-  03|%G1
 1
 	 	,D$, 2B.K,+,,  +-99$$+FF$$K$K$K$K$KKK|$$q(("'."5"5 ,$ % %';% % %     &+ + +9@+ + + & & %)%7 #6 
# 
#K |[9  A'	              . 
I #%)+&!$Yj!I!I 8 8dIY__YW_55 	' 	'4;L	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' !& 3 @ @ N N#**5+A+ABBB*11$7777 (*$&(#;>344,--< <  C  C7ni
 $ $
 $
FT$
 $
 $
 
 
 JJJJJJJ|q  99  #n11(  T T,@ T T TTT!&&W&W2E&W&W&W!W!W $!3 2                  ' 	0 	0C  0[%<"))+h*?@@@A"))$////"#566(//0CDDD'../ABBBB %,,...#++---2 2 2 2h $&CY'' "  " 400qMqM&q)&q).q1.q1'*,Q/+A.

 

 dEHO,, 	     0/dmWdl DL JJtJJw 1v::s8   COOO&P88P<	?P<	AV,,V0	3V0	)r   r   rH   )rc   FN)rd   rb   re   rf   rg   rB   rh   r   r+   r,   r   rb   )rd   rk   re   rl   rg   rB   rh   r   r+   r,   r   rk   )rd   rn   re   ro   rg   rB   rh   r   r+   r,   r   rn   )&
__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^   rb   ra   r   r   r   r   <module>r     s   " " " " " " "  $ $ $ $ $ $ 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6         '&&&&&&               WT]]Yt__wux)** %0[%=%=EHk"2=+>V2W2WEH./9D': :EH56 V U U U U U U U U U+ + + +< < < <
^, ^, ^, ^, ^,y ^, ^, ^,B3( 3( 3( 3( 3( 3( 3( 3(l  %x#v+1FF  F F F F 
 $ $    
 
 $ $( ( ( ( 
( $ $n n n n n n nr   