
    JTh              
         S SK Jr  S SKrS SKrS SKJrJrJrJrJ	r	J
r
  S SKJr  S SKJrJrJrJrJr  S SKJrJrJr  \(       a  S SKJr  \	" S\\\\
\\4   \
\\4   5      r\	" S\\\\   \\5      r\	" S	\\\4   \\   5      r\R@                      SS
 j5       r!SS jr"SS jr#SS jr$    SS jr%    SS jr&    SS jr'g)    )annotationsN)AnyCallableOptionalTYPE_CHECKINGTypeVarUnion)BackendIndexDispatchKeyNativeFunctionNativeFunctionsGroupNativeFunctionsViewGroup)contextST)IteratorFF2F3c              #  z  ^#    [        U [        5      (       a  U R                  mO$[        U [        5      (       a  U R                  mOU m[        U4S j5         [        R                  " TR                  TR                  S9   S v   S S S 5        S S S 5        g ! , (       d  f       N= f! , (       d  f       g = f7f)Nc                 <   > ST R                    ST R                   3$ )Nzin native_functions.yaml line z:
  )locfunc)fs   H/var/www/auris/envauris/lib/python3.13/site-packages/torchgen/context.py<lambda>)native_function_manager.<locals>.<lambda><   s    9!%%affXN    )!use_const_ref_for_mutable_tensorsuse_ilistref_for_tensor_lists)

isinstancer   outr   viewr   localparametrizer   part_of_structured_group)gr   s    @r   native_function_managerr(   -   s      !)**
 EE	A/	0	0FF	N	O./.Q.Q*+*D*D
 	
 
P	O
 
 
P	Os6   AB;*B*BB*	B;
B'	#B**
B84B;c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                `   > [        U 5         T" U 5      sS S S 5        $ ! , (       d  f       g = fNr(   )r   r   s    r   wrapper%with_native_function.<locals>.wrapperJ   s    $Q'7 (''   
-)r   r   returnr   	functoolswrapsr   r-   s   ` r   with_native_functionr5   I   s%    __T  Nr   c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                `   > [        U 5         T" X5      sS S S 5        $ ! , (       d  f       g = fr+   r,   )r   f2r   s     r   r-   )with_native_function_and.<locals>.wrapperS   s      %Q'; (''r/   )r   r   r8   r   r0   r   r1   r4   s   ` r   with_native_function_andr:   R   s%    __T 
 Nr   c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                `   > [        U5         T" X5      sS S S 5        $ ! , (       d  f       g = fr+   r,   slfr   r   s     r   r-   ,method_with_native_function.<locals>.wrapper]   s    $Q'< (''r/   )r>   r   r   r   r0   r   r1   r4   s   ` r   method_with_native_functionr@   \   s%    __T    Nr   c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                f   > [        US   5         T" X5      sS S S 5        $ ! , (       d  f       g = f)Nr   r,   r=   s     r   r-   3method_with_nested_native_function.<locals>.wrapperh   s"    $QqT*< +**s   "
0)r>   r   r   r   r0   r   r1   r4   s   ` r   "method_with_nested_native_functionrD   e   s'     __T    Nr   c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                `   > [        U 5         T" X5      sS S S 5        $ ! , (       d  f       g = fr+   r,   )r   backend_indexr   s     r   r-   /with_native_function_and_index.<locals>.wrapperu   s    $Q') (''r/   )r   r   rG   r
   r0   r   r1   r4   s   ` r   with_native_function_and_indexrI   r   s'     __T* * Nr   c                J   ^  [         R                  " T 5      SU 4S jj5       nU$ )Nc                `   > [        U 5         T" X5      sS S S 5        $ ! , (       d  f       g = fr+   r,   )r   backend_indicesr   s     r   r-   1with_native_function_and_indices.<locals>.wrapper   s    $Q'+ (''r/   )r   r   rL   zdict[DispatchKey, BackendIndex]r0   r   r1   r4   s   ` r    with_native_function_and_indicesrN   ~   s'     __T, , Nr   )r'   z@NativeFunctionsGroup | NativeFunctionsViewGroup | NativeFunctionr0   zIterator[None])r   Callable[[F], T]r0   rO   )r   Callable[[F, F2], T]r0   rP   )r   Callable[[S, F], T]r0   rQ   )r   Callable[[S, F3], T]r0   rR   )r   Callable[[F, BackendIndex], T]r0   rS   )r   1Callable[[F, dict[DispatchKey, BackendIndex]], T]r0   rT   )(
__future__r   
contextlibr2   typingr   r   r   r   r   r	   torchgen.localr$   torchgen.modelr
   r   r   r   r   torchgen.utilsr   r   r   collections.abcr   r   boolstrr   tuplelistr   contextmanagerr(   r5   r:   r@   rD   rI   rN    r   r   <module>rb      s   "   I I   ) ( (
 	..
./	.2
23 ^ T5,-tN/CD G 6

(#
;6r   