ó
    Eñi�  ã                   óF  • % S SK Jr  S SKJr  S SKrS SKJr  S SKJr  S SK	J
r
  / SQr\" SS9S	\S
\S\4S j5       r\R                  R                  R                   R"                  SSS/\4\R                  R                  R$                  R&                  S/ SQ\4\R                  R                  R(                  R*                  S/ SQ\4\R                  R                  R,                  R.                  S/ \4\R                  R                  R,                  R0                  S/ SQ\4\R                  R                  R2                  R4                  SS/\40r\\\\\\   \\\/\4   4   4   \ S'   \" SS9S\RB                  S\\\4   4S j5       r"\" SS9S\
SS4S j5       r#g)é    )ÚCallable)ÚAnyN)Úcompatibility)ÚGraphModule)Údefault_matchingÚextract_attrs_for_loweringÚlift_lowering_attrs_to_nodesF)Úis_backward_compatibleÚnameÚtarget_versionÚreturnc                 ó   • U $ )zDefault matching method© )r   r   s     ÚX/home/mande/repo/quber/.venv/lib/python3.13/site-packages/torch/fx/passes/param_fetch.pyr   r      s	   € ð €Kó    é   ÚweightÚbias)r   r   Úkernel_sizeÚstrideÚpaddingÚdilationÚgroupsÚpadding_modeé   )r   r   Úrunning_meanÚrunning_varÚeps)r   r   r   r   Úreturn_indicesÚ	ceil_modeÚinplaceÚmodule_fetch_bookÚmodc           	      ó   • 0 n[         R                  " U 5      US'   [        U 5      [        ;   a  [        [        U 5         u  p#nX R                  :  a3  [        SU S[         R                  " U 5       SU R                   S35      eU H   n[        X" XPR                  5      5      X'   M"     U$ [        [         R                  " U 5       S35      e)z«If `mod` is in `module_fetch_book`, fetch the mod's attributes that in the `module_fetch_book`
after checking module's version is compatible with the `module_fetch_book`.
r   zFetcher version z try to fetch z	 version zl, please upgrade the module_fetch_book, open an issue and @842974287 or report a bug to AIACC team directly.z’ is not in the module_fetch_book yet, please add it to the module_fetch_book, open an issue and @842974287 or report a bug to AIACC team directly.)ÚtorchÚtypenameÚtyper"   Ú_versionÚRuntimeErrorÚgetattr)r#   Úattrs_for_loweringÚversionÚparam_to_fetchÚmatching_methodÚattrs         r   r   r   :   sÚ   € ð
 *,ÐÜ!&§¢°Ó!4Ð�vÑäˆCƒyÔ%Ó%Ü3DÄTÈ#ÃYÑ3OÑ0ˆ Ø—\‘\Ó!ÜØ" 7 )¨>¼%¿.º.ÈÓ:MÐ9NÈiÐX[×XdÑXdÐWeð f:ð :óð ó
 #ˆDÜ'.¨s°OÀDÏ,É,Ó4WÓ'XÐÓ$ñ #ð Ðô Ü�~Š~˜cÓ"Ð#ð $6ð 6ó
ð 	
r   Ú	fx_modulec                 ó@  • [        U R                  5       5      nU R                  R                   Hk  nUR                  S:X  d  M  [        XR                     [        5      (       a  [        XR                     5        MO  [        XR                     5      Ul
        Mm     g)zjRecursively traverse all `fx_module` nodes and fetch the module's attributes if the node is a leaf module.Úcall_moduleN)ÚdictÚnamed_modulesÚgraphÚnodesÚopÚ
isinstanceÚtargetr   r	   r   r+   )r0   Ú
submodulesÚnodes      r   r	   r	   U   sq   € ô �i×-Ñ-Ó/Ó0€Jà—‘×%Ô%ˆØ�7‰7�mÕ#Ü˜*§[¡[Ñ1´;×?Ñ?Ü,¨Z¿¹Ñ-DÖEä*DØŸ{™{Ñ+ó+�Ö'ò &r   )$Úcollections.abcr   Útypingr   r%   Útorch.nnÚnnÚtorch.fx._compatibilityr   Útorch.fx.graph_moduler   Ú__all__ÚstrÚintr   ÚmodulesÚlinearÚLinearÚconvÚConv2dÚ	batchnormÚBatchNorm2dÚpoolingÚAdaptiveAvgPool2dÚ	MaxPool2dÚ
activationÚReLUr"   r3   r'   ÚtupleÚlistÚ__annotations__ÚModuler   r	   r   r   r   Ú<module>rU      sÎ  ðÞ $Ý ã Ý Ý 1Ý -ò€ñ  eÑ,ð˜3ð °ð ¸ó ó -ðð 
‡H�H×Ñ×Ñ×"Ñ" Q¨°6Ð(:Ð<LÐ$MØ	‡H�H×Ñ×Ñ× Ñ Ø	ò		
ð 	ð#ð 
‡H�H×Ñ×Ñ×*Ñ*Ø	Ú@Øð-ð
 
‡H�H×Ñ×Ñ×.Ñ.°°BÐ8HÐ0IØ	‡H�H×Ñ×Ñ×&Ñ&Ø	ÚWØð)ð
 
‡H�H×Ñ×Ñ×$Ñ$ q¨9¨+Ð7GÐ&Hð7SÐ �4˜˜e C¨¨c©°H¸cÀ3¸ZÈ¸_Ñ4MÐ$MÑNÐNÑOó ñ>  eÑ,ð B§I¡Ið °$°s¸C°x±.ó ó -ðñ4  eÑ,ð¨Kð ¸Dó ó -ñr   