ó
    Eñi   ã                  óì  • S SK Jr  S SKrS SKrS SKrS SKJr  S SKJrJ	r	J
r
  S SKJrJr  \
(       a
  S SKrS SKJr  \R"                  R%                  S5      S:X  a  \" S5      S#S	 j5       rOS#S
 jr " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r g)$é    )ÚannotationsN)Ú	lru_cache)ÚAnyÚOptionalÚTYPE_CHECKING)ÚBackendCompilerFailedÚShortenTraceback)Ú_CudaDevicePropertiesÚTORCHINDUCTOR_WRITE_MISSING_OPSÚ1c                ó¶   • [        [        R                  " 5        S3S5       nUR                  [	        U 5      S-   5        S S S 5        g ! , (       d  f       g = f)Nz/missing_ops.txtÚaÚ
)ÚopenÚtempfileÚ
gettempdirÚwriteÚstr)ÚtargetÚfds     ÚP/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/_inductor/exc.pyÚ_record_missing_opr      sB   € ä”X×(Ò(Ó*Ð+Ð+;Ð<¸cÔBÀbØ�H‰H”S˜“[ 4Ñ'Ô(÷ C×BÖBús   £A
Á

Ac                ó   • g ©N© )r   s    r   r   r      s   € Øó    c                  ó(   • \ rS rSr\SS j5       rSrg)ÚOperatorIssueé   c           	     óê   • SU  3/[        U5       VVs/ s H  u  p4SU SU 3PM     snn-   nU(       a  UR                  SU 35        [        R                  " SR	                  U5      S5      $ s  snnf )Nztarget: zargs[z]: zkwargs: r   z  )Ú	enumerateÚappendÚtextwrapÚindentÚjoin)r   ÚargsÚkwargsÚiÚargÚliness         r   Úoperator_strÚOperatorIssue.operator_str   sw   € à˜F˜8Ð$Ð%Ü.7¸¬oô)
Ú.=¡F Aˆe�A�3�c˜#˜Ó©oò)
ñ 
ˆö Ø�L‰L˜8 F 8Ð,Ô-Ü�Š˜tŸy™y¨Ó/°Ó6Ð6ùó)
s   ”A/r   N)r   r   r&   ú	list[Any]r'   údict[str, Any]Úreturnr   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ústaticmethodr+   Ú__static_attributes__r   r   r   r   r      s   † Øó7ó ó7r   r   c                  ó,   ^ • \ rS rSrSU 4S jjrSrU =r$ )ÚMissingOperatorWithoutDecompé)   c                ó`   >• [        U5        [        TU ]	  SU R                  XU5       35        g )Nzmissing lowering
)r   ÚsuperÚ__init__r+   ©Úselfr   r&   r'   Ú	__class__s       €r   r;   Ú%MissingOperatorWithoutDecomp.__init__*   s.   ø€ Ü˜6Ô"Ü‰ÑÐ-¨d×.?Ñ.?ÀÈfÓ.UÐ-VÐWÕXr   r   ©r   r   r&   r-   r'   r.   r/   ÚNone©r0   r1   r2   r3   r;   r5   Ú__classcell__©r>   s   @r   r7   r7   )   s   ø† ÷Yõ Yr   r7   c                  ó,   ^ • \ rS rSrSU 4S jjrSrU =r$ )ÚMissingOperatorWithDecompé/   c                ó–   >• [        U5        [        TU ]	  SU R                  XU5       3[        R
                  " SU S35      -   5        g )Nzmissing decomposition
z9

                There is a decomposition available for z° in
                torch._decomp.get_decompositions().  Please add this operator to the
                `decompositions` list in torch._inductor.decomposition
                )r   r:   r;   r+   r#   Údedentr<   s       €r   r;   Ú"MissingOperatorWithDecomp.__init__0   sV   ø€ Ü˜6Ô"Ü‰ÑØ% d×&7Ñ&7¸ÀfÓ&MÐ%NÐOÜ�oŠoð8à8>°xð @ðóñõ
	
r   r   r@   rB   rD   s   @r   rF   rF   /   s   ø† ÷
õ 
r   rF   c                  óH   ^ • \ rS rSr S           SU 4S jjjrSrU =r$ )ÚLoweringExceptioné?   c           	     óž   >• [        U5      R                   SU SU R                  X#U5       3nU(       a	  Xf SU 3-  n[        TU ]  U5        g )Nú: r   z
Found from : 
 )Útyper0   r+   r:   r;   )r=   Úexcr   r&   r'   Ústack_traceÚmsgr>   s          €r   r;   ÚLoweringException.__init__@   sX   ø€ ô �c“×#Ñ#Ð$ B s e¨2¨d×.?Ñ.?ÀÈfÓ.UÐ-VÐWˆÞØ�UÐ,¨[¨MÐ:Ñ:ˆCÜ‰Ñ˜Õr   r   r   )rQ   Ú	Exceptionr   r   r&   r-   r'   r.   rR   zOptional[str]r/   rA   rB   rD   s   @r   rL   rL   ?   sL   ø† ð &*ðàðð ðð ð	ð
 ðð #ðð 
÷ö r   rL   c                  ó   • \ rS rSrSrg)ÚSubgraphLoweringExceptionéN   r   N©r0   r1   r2   r3   r5   r   r   r   rW   rW   N   ó   † Úr   rW   c                  ó,   ^ • \ rS rSrSU 4S jjrSrU =r$ )ÚInvalidCxxCompileréR   c                óx   >• SSK Jn  [        TU ]  SUR                   SUR
                  R                   35        g )Né   )Úconfigz!No working C++ compiler found in z
.cpp.cxx: )Ú r`   r:   r;   r0   ÚcppÚcxx)r=   r`   r>   s     €r   r;   ÚInvalidCxxCompiler.__init__S   s1   ø€ Ýä‰ÑØ/°·±Ð/@À
È6Ï:É:Ï>É>ÐJZÐ[õ	
r   r   )r/   rA   rB   rD   s   @r   r\   r\   R   s   ø† ÷
õ 
r   r\   c                  ó,   ^ • \ rS rSrSU 4S jjrSrU =r$ )ÚCppWrapperCodegenErroré[   c                ó*   >• [         TU ]  SU 35        g )NzC++ wrapper codegen error: ©r:   r;   )r=   rS   r>   s     €r   r;   ÚCppWrapperCodegenError.__init__\   s   ø€ Ü‰ÑÐ6°s°eÐ<Õ=r   r   )rS   r   r/   rA   rB   rD   s   @r   rf   rf   [   s   ø† ÷>õ >r   rf   c                  ó6   ^ • \ rS rSrSU 4S jjrSS jrSrU =r$ )ÚCppCompileErroré`   c                ó  >• [        U[        5      (       a  UR                  S5      nXl        X l        [
        TU ]  [        R                  " S5      R                  5       R                  SR                  U5      US95        g )Nzutf-8z©
                    C++ compile error

                    Command:
                    {cmd}

                    Output:
                    {output}
                Ú ©ÚcmdÚoutput)Ú
isinstanceÚbytesÚdecoderq   rr   r:   r;   r#   rI   ÚstripÚformatr%   )r=   rq   rr   r>   s      €r   r;   ÚCppCompileError.__init__a   se   ø€ Ü�fœe×$Ñ$Ø—]‘] 7Ó+ˆFàŒØŒä‰ÑÜ�OŠOðó
÷ ‰U‹Wß‰V˜Ÿ™ ›¨fˆVÐ5õ	
r   c                óJ   • U R                   U R                  U R                  44$ r   )r>   rq   rr   )r=   s    r   Ú
__reduce__ÚCppCompileError.__reduce__x   s   € Ø—‘ §¡¨4¯;©;Ð 7Ð8Ð8r   rp   )rq   z	list[str]rr   r   r/   rA   )r/   z"tuple[type, tuple[list[str], str]])r0   r1   r2   r3   r;   rz   r5   rC   rD   s   @r   rl   rl   `   s   ø† ÷
÷.9ò 9r   rl   c                  ó   • \ rS rSrSrg)ÚCUDACompileErroré|   r   NrY   r   r   r   r}   r}   |   rZ   r   r}   c                  ó,   ^ • \ rS rSrSU 4S jjrSrU =r$ )ÚTritonMissingé€   c                ó"   >• [         TU ]  SUS9  g )Nz½Cannot find a working triton installation. Either the package is not installed or it is too old. More information on installing Triton can be found at: https://github.com/triton-lang/triton©Úfirst_useful_frameri   )r=   r„   r>   s     €r   r;   ÚTritonMissing.__init__�   s    ø€ Ü‰Ñðkð  2ð	 	ò 	
r   r   )r„   úOptional[types.FrameType]r/   rA   rB   rD   s   @r   r€   r€   €   s   ø† ÷
õ 
r   r€   c                  ó8   ^ • \ rS rSr      SU 4S jjrSrU =r$ )ÚGPUTooOldForTritonéŠ   c                óp   >• [         TU ]  SUR                   SUR                   SUR                   3US9  g )NzFound zº which is too old to be supported by the triton GPU compiler, which is used as the backend. Triton only supports devices of CUDA Capability >= 7.0, but your device is of CUDA capability Ú.rƒ   )r:   r;   ÚnameÚmajorÚminor)r=   Údevice_propsr„   r>   s      €r   r;   ÚGPUTooOldForTriton.__init__‹   sN   ø€ ô 	‰ÑØ�\×&Ñ&Ð'ð (5à5A×5GÑ5GÐ4HÈÈ,×J\ÑJ\ÐI]ð_ð  2ð	 	ò 	
r   r   )r�   r
   r„   r†   r/   rA   rB   rD   s   @r   rˆ   rˆ   Š   s+   ø† ð
ð ,ð
ð 6ð	
ð
 
÷
õ 
r   rˆ   c                  ó.   • \ rS rSrSr      SS jrSrg)ÚInductorErroré™   Úinductorc                ól   • Xl         [        R                  " U [        U5      R                   SU 3US9  g )NrO   rƒ   )Úinner_exceptionr	   r;   rP   r0   )r=   r–   r„   s      r   r;   ÚInductorError.__init__œ   s9   € ð
  /ÔÜ×!Ò!ØÜ�OÓ$×-Ñ-Ð.¨b°Ð0AÐBØ1ó	
r   )r–   N)r–   rU   r„   r†   r/   rA   )r0   r1   r2   r3   Úbackend_namer;   r5   r   r   r   r’   r’   ™   s(   † Ø€Lð

à"ð

ð 6ð

ð 
÷	

r   r’   )r   r   r/   rA   )!Ú
__future__r   Úosr   r#   Ú	functoolsr   Útypingr   r   r   Útorch._dynamo.excr   r	   ÚtypesÚ
torch.cudar
   ÚenvironÚgetr   ÚRuntimeErrorr   r7   rF   rL   rW   r\   rf   rl   r}   r€   rˆ   r’   r   r   r   Ú<module>r£      sî   ðÝ "ã 	Û Û Ý ß /Ñ /ç Eö Ûå0à‡:�:‡>�>Ð3Ó4¸Ó;áˆtƒ_ó)ó ñ)ôô7�Lô 7ôY =ô Yô
 ô 
ô ˜ô ô	 ô 	ô
˜ô 
ô>˜\ô >ô
9�lô 9ô8	�ô 	ô
Ð$ô 
ô
Ð)ô 
ô
Ð)õ 
r   