
    3Ki                         S SK Jr  S SKJrJrJrJrJrJrJ	r	J
r
JrJrJr   " S S5      r " S S5      r " S S5      r " S	 S
5      rg)    )Any)
AnnotationArgument	ArgumentsBaseOperatorNameBaseTyBaseTypeCustomClassTypeFunctionSchemaListTypeOperatorNameReturnc                       \ rS rSr\\R                  \\R                  \\R                  \\R                  0r	\
S\S\\-  \-  4S j5       rSrg)TypeGen   objreturnc                    SS K n[        XR                  R                  5      (       a  [	        [
        R                  5      $ [        XR                  5      (       a  [	        [
        R                  5      $ [        XR                  5      (       a  [	        [
        R                  5      $ [        XR                  5      (       a  [	        [
        R                  5      $ [        XR                  5      (       a'  [        U R                  5       R                  5       5      $ [        U [        [        45      (       au  [        U 5      S:  d   eU  Vs/ s H  n[         R#                  U5      PM     nn[        [%        U5      5      S:  a  ['        SU S35      e[)        US   [        U 5      5      $ [+        U 5      nU[         R,                  ;  a  ['        SU 35      e[	        [         R,                  U   5      $ s  snf )Nr      zFCannot generate schema for a sequence of args of heterogeneous types: zc. Consider unpacking the argument and give proper names to them if possible instead of using *args.zunsupported type )torch
isinstancefxGraphModuler	   r   TensorSymIntSymBoolScriptObjectr
   _typenamelisttuplelenr   from_examplesetRuntimeErrorr   typeconvert_to_base_ty)r   r   xall_base_tystps        [/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/torchgen/gen_schema_utils.pyr#   TypeGen.from_example   s   c88//00F..//\\**FMM**\\**FMM**]]++FNN++//00"399;#3#3#566dE]++s8a<<=@ASG003SLA3|$%)"\]i\j k. . 
 LOSX66#YW///!22$788222677 Bs   G5 N)__name__
__module____qualname____firstlineno__intr   floatstrboolr'   staticmethodr   r	   r   r
   r#   __static_attributes__r-       r+   r   r      sZ    VZZv||VZZfkk	 8# 8(X"5"G 8 8r8   r   c            	       D    \ rS rSr\S\S-  S\S\S-  S\4S j5       r	Sr
g)		ReturnGen=   r   Nr   
annotationr   c                 B    [        U [        R                  U5      U5      $ N)r   r   r#   )r   r   r<   s      r+   r#   ReturnGen.from_example>   s     dG005zBBr8   r-   )r.   r/   r0   r1   r6   r4   r   r   r   r#   r7   r-   r8   r+   r:   r:   =   sC    CDjC"C0:T0AC	C Cr8   r:   c                   H    \ rS rSr\S\S\S\S-  S\S-  S\4
S j5       r	S	r
g)
ArgumentGenE   r   r   defaultNr<   r   c                 >    [        U [        R                  U5      X#S9$ )N)rC   r<   )r   r   r#   )r   r   rC   r<   s       r+   r#   ArgumentGen.from_exampleF   s#     '&&s+W
 	
r8   r-   )r.   r/   r0   r1   r6   r4   r   r   r   r#   r7   r-   r8   r+   rA   rA   E   sE    


&)Dj
>H4>O
	
 
r8   rA   c            	       V    \ rS rSr\S\S\\\\4   S4   S\\S4   S\4S j5       r	Sr
g	)
FunctionSchemaGenO   op_nameexample_inputs.example_outputsr   c           
      H   / nU H+  u  pEUR                  [        R                  XES S 5      5        M-     [        [	        5       S [	        U5      [	        5       S [	        5       [	        5       5      n[	        S U 5       5      n[        [        U SSS5      S5      n [        XU5      $ )Nc              3   P   #    U  H  n[         R                  S US 5      v   M     g 7fr>   )r:   r#   ).0outs     r+   	<genexpr>1FunctionSchemaGen.from_example.<locals>.<genexpr>]   s%      
?NI""4d33s   $&F )appendrA   r#   r   r!   r   r   r   )rI   rJ   rK   argsr   inp	argumentsreturnss           r+   r#   FunctionSchemaGen.from_exampleP   s     'IDKK00D$GH ( GT5;uw
	  
?N
 
 /uMrRg'::r8   r-   N)r.   r/   r0   r1   r6   r4   r!   r   r   r#   r7   r-   r8   r+   rG   rG   O   sR    ;;eCHos23; sCx; 
	; ;r8   rG   N)typingr   torchgen.modelr   r   r   r   r   r	   r
   r   r   r   r   r   r:   rA   rG   r-   r8   r+   <module>r[      sG       (#8 #8LC C
 
; ;r8   