
    [Th                     .    S SK r S SKJr    " S S5      rg)    Nc                       \ rS rSrSrSr/ SQr/ SQr\\-   rSS jr	 S r
 S	 r S
 r S r S r S r S r S rSrg)PythonDispatcher7   __test__foo)CPUAutogradCPUFPGAAutogradOtherXLAAutogradXLALazyAutogradLazy)CompositeExplicitAutogradAutogradCompositeImplicitAutogradNc                     [         R                  " U R                  5        [         R                  " SU R                  S5      U l        U R
                  R                  S5        g )NFRAGMENT zfoo(Tensor x) -> Tensor)C_dispatch_check_invariantsname_dispatch_library	namespacerefdef_selfs    P/var/www/auris/envauris/lib/python3.13/site-packages/torch/_python_dispatcher.py__init__PythonDispatcher.__init__I   s?    	$$TYY/&&z4>>2F/0    c                     U R                   $ N)supported_keysr   s    r   keysPythonDispatcher.keysS   s    """r"   c                 4   [        [        U5      5      [        U5      :w  a  [        SU S35      eSU;   a  SU;   a  [        S5      eU HK  nX R                  ;  a  [        U SU R                   S35      eU R                  R                  SUSU-   S	9  MM     g )
Nz1Overriden is not allowed but found duplicates in .r   r   z\Registration to both CompositeImplicitAutograd and CompositeExplicitAutograd is not allowed.z3 is not supported, please select a dispatch key in r   fn_)dispatchdebug)lensetRuntimeErrorr%   r   impl_t_t)r   dispatchKeyskeys      r   registerPythonDispatcher.register^   s    s< !S%66CL>QRS 
 (<7+|;n   C---"eNtObObNccde  HHecE  r"   c                     US SU S3$ )Nz<15 
 )r   r2   kernels      r   _format_linePythonDispatcher._format_linew   s    c!F82&&r"   c                 D    SU S3nX R                  SS5      -  nUS-  nU$ )Nr7   r2   r9   z---------------------------
)r:   )r   headerss      r   _format_headerPythonDispatcher._format_header~   s?     	 	
uh//	,,r"   c                 `    [         R                  " U R                   SU R                   35      $ N::)r   _dispatch_dumpr   r   r   s    r   rawRegistrations!PythonDispatcher.rawRegistrations   s'    4>>"2"TYYK @AAr"   c                 `    [         R                  " U R                   SU R                   35      $ rB   )r   _dispatch_dump_tabler   r   r   s    r   rawDispatchTable!PythonDispatcher.rawDispatchTable   s'    %%(8499+&FGGr"   c                 f  ^ U R                  S5      nU R                  5       nUR                  S5      nU Hw  nUR                  S5      S   m[        U4S jU R                   5       5      (       d  M=  UR                  S5      S   R                  S5      S   nXR                  TU5      -  nMy     U$ )	NzRegistered Kernelsr7   :r   c              3   F   >#    U  H  nTR                  U5      v   M     g 7fr$   )
startswith).0kfirsts     r   	<genexpr>1PythonDispatcher.registrations.<locals>.<genexpr>   s!     D0C15##A&&0Cs   !rC   r6      )r?   rE   splitanyr%   r:   )r   outputstatestate_entriesliner9   rQ   s         @r   registrationsPythonDispatcher.registrations   s    $$%9:%%'D)!DJJsOA&ED0C0CDDDD)!,2237:++E6::	 "
 r"   c                 `   U R                  S5      nU R                  5       nUR                  S5      n[        R                  " S5      nU H_  nUR                  S5      S   nX`R
                  ;   d  M(  UR                  SU5      nXR                  XgR                  S5      S   5      -  nMa     U$ )	NzComputed Dispatch Tabler7   z)registered at .*FallbackKernel\.cpp.*(\[)rL   r   [z: rT   )r?   rI   rU   recompileruntime_keyssubr:   )r   rW   tabletable_entriesregexrZ   rP   entrys           r   dispatchTablePythonDispatcher.dispatchTable   s    $$%>?%%'D)

GH!D

3"A%%%		#t,++A{{4/@/CDD	 "
 r"   )r   )returnN)__name__
__module____qualname____firstlineno__r   r   ra   
alias_keysr%   r    r&   r3   r:   r?   rE   rI   r[   rg   __static_attributes__r8   r"   r   r   r   7   s~    IDLJ
 "J.N1

#F*'
B
H
	
r"   r   )r_   torch._C_Cr   r   r8   r"   r   <module>rr      s    	 -` r"   