+
    &jy                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
tHt  ^ RItRt]! R. R.O4      t. R/Ot. R0Ot. R1Ot. R2Ot. R3OtR tR tR	 tR
 tR4R ltR tR t R t!R t"R t#R t$R t%R t&R t'R t(R t)R t*R t+R t,R t-R t.R t/R t0R t1R t2R  t3R! t4R4R" lt5R# R$ lt6R% t7R& t8R' t9R(Pu                  4       t;R) t<R* t=R+ R, lt>]?R-8X  d
   ]>! 4        R# R#   ]]]]3 d    Rt Li ; i)5    N)
namedtuple)castDictTF	SystemEnvc                   \        V 4      \        J p\        P                  ! V \        P                  \        P                  VR7      pVP                  4       w  r4VP                  p\        4       R8X  d   RpM\        P                  ! 4       pVP                  V4      pVP                  V4      pWWP                  4       VP                  4       3# )z%Return (return-code, stdout, stderr).)stdoutstderrshellwin32oem)typestr
subprocessPopenPIPEcommunicate
returncodeget_platformlocalegetpreferredencodingdecodestrip)	commandr
   p
raw_outputraw_errrcencoutputerrs	   &        o/Users/jameslopez/projects/CWCArchive/cwc-podcast/.venv/lib/python3.14/site-packages/torch/utils/collect_env.pyrunr"   x   s    MS E

u	A --/J	
B~ ))+s#F
..
C||~syy{**    c                .    V ! V4      w  r#pV^ 8w  d   R# V# )zIRun command using run_lambda; reads and returns entire output if rc is 0.N 
run_lambdar   r   out_s   &&   r!   run_and_read_allr*      s    G$JBQ	QwJr#   c                    V ! V4      w  r4pV^ 8w  d   R# \         P                  ! W$4      pVf   R# VP                  ^4      # )zIRun command using run_lambda, returns the first regex match if it exists.N)researchgroup)r'   r   regexr   r(   r)   matchs   &&&    r!   run_and_parse_first_matchr1      s>    G$JBQ	QwIIe!E};;q>r#   c                Z    V ! V4      w  r#pV^ 8w  d   R# VP                  R4      ^ ,          # )zKRun command using run_lambda and returns first line if output is not empty.N
)splitr&   s   &&   r!   run_and_return_first_liner5      s-    G$JBQ	Qw99T?1r#   c                 .  a Sf(   \         \        ,           \        ,           \        ,           o\        P
                  P                  RR4      p\        V RP                  V4      4      pVf   V# RP                  V3R lVP                  4        4       4      # )N	CONDA_EXEcondaz{} listr3   c              3      <a"   T Fb  oSP                  R 4      '       d   K  \        ;QJ d    V3R lS 4       F  '       g   K   RM	  RM! V3R lS 4       4      '       g   K^  Sx  Kd  	  R# 5i)#c              3   ,   <"   T F	  qS9   x  K  	  R # 5iNr%   .0namelines   & r!   	<genexpr>/get_conda_packages.<locals>.<genexpr>.<genexpr>   s     +NXTDLX   TFN)
startswithanyr>   r@   patternss   &@r!   rA   %get_conda_packages.<locals>.<genexpr>   sI      $Ds# 	(++NX+N+NX+N(N 	$s   A.
A.A.A.$
A.)CONDA_PATTERNSCOMMON_PATTERNSNVIDIA_PATTERNSONEAPI_PATTERNSosenvirongetr*   formatjoin
splitlines)r'   rG   r8   r(   s   &f  r!   get_conda_packagesrS      sw    !O3oEWJJNN;0E
:y'7'7'>
?C
{
99 NN$  r#   c                     \        V R R4      # )zgcc --versionzgcc (.*)r1   r'   s   &r!   get_gcc_versionrW      s    $Z+NNr#   c                     \        V R R4      # )zclang --versionzclang version (.*)rU   rV   s   &r!   get_clang_versionrY      s    $%'< r#   c                     \        V R R4      # )zcmake --versionz
cmake (.*)rU   rV   s   &r!   get_cmake_versionr[      s    $Z1BMRRr#   c                 h    \        4       R 8X  d   Rp\        WR4      # \        4       p\        WR4      # )darwinzkextstat | grep -i cudazcom[.]nvidia[.]CUDA [(](.*?)[)]zDriver Version: (.*?) )r   r1   get_nvidia_smi)r'   cmdsmis   &  r!   get_nvidia_driver_versionra      s<    ~!'(?
 	
 
C$Z6OPPr#   c                    \        4       R 8X  gJ   \        '       Ed   \        \        P                  R4      '       d   \        P                  P
                  e   \        '       d   \        P                  P                  4       '       d   \        P                  P
                  eQ   \        P                  P                  ^ 4      p\        VR4      '       d   RP                  VP                  4      pMRpMRp\        P                  P                  R4      V,           # R# \        4       p\        P                  ! R4      pV ! VR,           4      w  rVpV^ 8w  d   R# \        P                  ! VRV4      # )	r]   hipNgcnArchNamez ({})NoGCNArchNameOnOldPyTorch z \(UUID: .+?\)z -L)r   TORCH_AVAILABLEhasattrtorchversionrc   cudais_availableget_device_propertiesrP   rd   get_device_namer^   r,   compilesub)r'   propgcnArchr`   
uuid_regexr   r(   r)   s   &       r!   get_gpu_infort      s    ~!EMM5))MM)?uzz6688}}  ,zz77:4//%nnT-=-=>G9G::--d3g==

C-.JC%K(JBQ	Qw66*b#&&r#   c                     \        V R R4      # )znvcc --versionzrelease .+ V(.*)rU   rV   s   &r!   get_running_cuda_versionrv      s    $Z1ACVWWr#   c                   \        4       R8X  dt   \        P                  P                  RR4      p\        P                  P                  RR4      p\        P                  P                  VRR4      pRP                  W24      pM\        4       R	8X  d   R
pMRpV ! V4      w  rVp\        V4      ^ 8X  g   V^8w  dq   V^ 8w  dj   \        P                  P                  R4      pVeE   \        P                  P                  V4      '       d    \        P                  P                  V4      # R# \        4       p	VP                  R4       FZ  p
\        P                  P                  V
4      p
\        P                  P                  V
4      '       g   KI  V	P                  V
4       K\  	  V	'       g   R# \        V	4      p\        V4      ^8X  d
   V^ ,          # RP                  V4      pRP                  V4      # )zHReturn a list of libcudnn.so; it's hard to tell which one is being used.r   
SYSTEMROOT
C:\Windows	CUDA_PATHz%CUDA_PATH%System32wherez{} /R "{}\bin" cudnn*.dllr]   z ls /usr/local/cuda/lib/libcudnn*z7ldconfig -p | grep libcudnn | rev | cut -d" " -f1 | revCUDNN_LIBRARYNr3   z!Probably one of the following:
{})r   rM   rN   rO   pathrQ   rP   lenisfilerealpathsetr4   addsorted)r'   system_root	cuda_path	where_cmd	cudnn_cmdr   r(   r)   l	files_setfnfilesresults   &            r!   get_cudnn_versionr      sg   ~ jjnn\=AJJNN;>	GGLLj'B	077	M		8	#
 7	M	I&JBQ
3x1}qR1WJJNN?+=RWW^^A..77##A&&IiioWWb!77>>"MM"  9E
5zQQxYYuF/66v>>r#   c                     R p \        4       R8X  d   \        P                  P                  RR4      p\        P                  P                  RR4      p\        P                  P                  VRRV 4      p\        P                  P                  VRV 4      pWC.pV F<  p\        P                  P                  V4      '       g   K*  R	P                  V4      p  V # 	  V # )
z
nvidia-smir   rx   ry   PROGRAMFILESzC:\Program FileszNVIDIA CorporationNVSMIr{   z"{}")r   rM   rN   rO   r~   rQ   existsrP   )r`   r   program_files_rootlegacy_pathnew_pathsmiscandidate_smis          r!   r^   r^     s    
C~ jjnn\=AZZ^^N<OPggll 4gs
 77<<Z=&!Mww~~m,,mmM2J	 " Jr#   c                  t    \        4       R 8w  d   R# R F   p \        RV  24      w  p pV^ 8X  g   K  V u # 	  R# )linuxN/Azwhich )dpkgdnfyumzypper)r   r"   )mgr_namer   r)   s      r!   _detect_linux_pkg_managerr      sA    ~ 4z*+Aq7O 5 r#   c                    \        4       pVR 8X  d   R # RR^RR/RR^RR/RR^RR/R	R^RR
//p\        \        \        W2,          R,          4      4      p\        W2,          R,          4      pVP	                  V4      p\        W4      pVe   VR8X  d   R # \        P                  ! RRV4      P                  R4      p\        V4      V8:  d   R # Wt,          # )r   r   field_indexr   zdpkg -l | grep {}r   zdnf list | grep {}r   zyum list | grep {}r   zzypper info {} | grep Versionrf   z + )
r   int_castr   rP   r*   r,   rp   r4   r   )r'   pkg_namepkg_mgrgrep_versionr   r_   retlsts   &&      r!   get_linux_pkg_versionr   *  s    ')G% 	1*
 	1+
 	1+
 	16
L& 5l&;M&JKLK<(34C
**X
C
:
+C
{cRi
&&sC
 
&
&s
+C
3x;r#   c           
         . p\        4       pVR 8X  d_   R0 RmRRR0RRR0RRR0/P                  \        4       / 4      pV F.  p\        W4      pVR8w  g   K  VP	                  RV R	V 24       K0  	  VR9   d   \        V R
4      p \        P                  ! V4      p\        V4      \        J d;   V F3  pVP	                  RVR,           RVR,           RVR,           R24       K5  	  M'VP	                  RVR,           RVR,           R24        RP                  V4      #   \         d6   p	TP	                  T4       TP	                  \        T	4      4        Rp	?	LLRp	?	ii ; i)r   r   
level-zeror   zintel-openclr   r   r   * z:	zpowershell.exe "gwmi -Class Win32_PnpSignedDriver | where{$_.DeviceClass -eq \"DISPLAY\"            -and $_.Manufacturer -match \"Intel\"} | Select-Object -Property DeviceName,DriverVersion,DriverDate            | ConvertTo-Json"
DeviceName: DriverVersion (
DriverDate)Nr3   >   libze1r   intel-opencl-icdr   cygwin)r   rO   r   r   appendr*   jsonloadsr   list
ValueErrorr   rQ   )
r'   r   platformpkgspkgvertxtobjoes
   &         r!   get_intel_gpu_driver_versionr   N  s   
C~H7 
   
$ #')2
.% 	& C'
8Ce|

RuCu-.  &&
	**S/CCyD AJJQ|_-R/0B/C2aoEVVWX 
 

RO 45RL8I7J!LM 99S>  	JJsOJJs1v	s   A"D! )&D! !E!,+EE!c                    . p\        4       pVR 8X  d   \        V R4      pV'       ds    \        P                  ! V4      pVP	                  R. 4      p\        V\        4      '       d"   V'       d   VP                  R V 4       4       M#VP                  R4       MVP                  R4       VR9   d   \        V R4      pV'       dt    \        P                  ! V4      p\        V\        4      '       d"   V'       d   VP                  R V 4       4       M6VP                  RVP	                  R	R4       24       MVP                  R4       R
P                  V4      #   \        \        3 d6   pTP                  T4       TP                  \        T4      4        Rp?LRp?ii ; i  \         d6   pTP                  T4       TP                  \        T4      4        Rp?LRp?ii ; i)r   zxpu-smi discovery -jdevice_listc              3   :   "   T F  pR VR,           2x  K  	  R# 5i)r   device_nameNr%   r>   devices   & r!   rA   (get_intel_gpu_onboard.<locals>.<genexpr>  s     V+F=$9#:;+   r   Nzpowershell.exe "gwmi -Class Win32_PnpSignedDriver | where{$_.DeviceClass -eq \"DISPLAY\"            -and $_.Manufacturer -match \"Intel\"} | Select-Object -Property DeviceName | ConvertTo-Json"c              3   :   "   T F  pR VR,           2x  K  	  R# 5i)r   r   Nr%   r   s   & r!   rA   r     s     MvF<$8#9:r   r   r   r3   r   )r   r*   r   r   rO   
isinstancer   extendr   r   	TypeErrorr   rQ   )r'   r   r   r   r   r   r   s   &      r!   get_intel_gpu_onboardr     sv   C~H7z+AB	#jjo!ggmR8k400[JJV+VVJJu%
 JJu&&m

 #jjoc4((SJJMMMJJCGGL%$@#ABC
 JJu99S>/ 	* #

3

3q6""#$  #

3

3q6""#sH   AE /E E 3F$ ;F$ $F$ F!,+FF!$G$/+GG$c           	      >   \         '       d   \        \        R 4      '       g   R# \        P                  P	                  4       pV^ 8X  d   R# \        V4       Uu. uF(  pRV R\        P                  P                  V4       2NK*  	  ppRP                  V4      # u upi )xpur   z* [z] r3   )rg   rh   ri   r   device_countrangerm   rQ   )r'   r   idevicess   &   r!   get_intel_gpu_detectedr     s    ?'%"7"799))+Lq BG|ATATA#aS599221567AT   99Ws   .Bc           
         ^ RRr2p\        4       R8X  d   V ! R4      w  rpEM\        4       R8X  d   V ! R4      w  rpV^ 8X  d   . p \        P                  ! V4      p\        V4      \        J dT   V FL  pVP                  R4       TP                  VP                  4        UUu. uF  w  rxV RV 2NK  	  upp4       KN  	  M9TP                  VP                  4        UUu. uF  w  rxV RV 2NK  	  upp4        R	P                  V4      pM\        4       R
8X  d   V ! R4      w  rpRp
V^ 8X  d   Tp
V
# Tp
V
# u uppi u uppi   \         d6   p	TP                  T4       TP                  \        T	4      4        Rp	?	LRp	?	ii ; i)r   rf   r   lscpur   zpowershell.exe "gwmi -Class Win32_Processor | Select-Object -Property Name,Manufacturer,Family,            Architecture,ProcessorType,DeviceID,CurrentClockSpeed,MaxClockSpeed,L2CacheSize,L2CacheSpeed,Revision            | ConvertTo-Json"z----------------------r   Nr3   r]   z"sysctl -n machdep.cpu.brand_stringNone)r   r   r   r   r   r   r   itemsr   r   rQ   )r'   r   r(   r    r   r   r   kvr   cpu_infos   &          r!   get_cpu_infor      se   b"SB~ !'*	7	"!

 7C
#jjo9$ 

#;<

aggi#HiFQqcA3Ki#HI ! JJ#))+F+1#Rs+FG ))C.C	8	#!"FGH	Qw O O $IF #

3

3q6""#s=   AE #D85E E  D>
2E 8E F+E??Fc                  Z   \         P                  P                  R 4      '       d   R # \         P                  P                  R4      '       d   R# \         P                  P                  R4      '       d   R# \         P                  P                  R4      '       d   R# \         P                  # )r   r   r   r]   )sysr   rD   r%   r#   r!   r   r   "  sl    
||w''		 	 	)	)		 	 	*	*		 	 	*	*||r#   c                     \        V R R4      # )zsw_vers -productVersionz(.*)rU   rV   s   &r!   get_mac_versionr   /  s    $Z1JGTTr#   c                     \        V R 4      p \        P                  ! V4      pVR,           RVR,           RVR,           R2pV#   \         d!   pTR\	        T4       2,          p Rp?T# Rp?ii ; i)	zpowershell.exe "gwmi -Class Win32_OperatingSystem | Select-Object -Property Caption,        OSArchitecture,Version | ConvertTo-Json"Captionr   Versionr   OSArchitecturer   r3   N)r*   r   r   r   r   )r'   r   r   r   s   &   r!   get_windows_versionr   3  s    
	2C
jjoY 3y>"2!C8H4I3J!L J  CF8}Js   6A A1A,,A1c                     \        V R R4      # )zlsb_release -azDescription:\t(.*)rU   rV   s   &r!   get_lsb_versionr   A  s    $$&; r#   c                     \        V R R4      # )zcat /etc/*-releasezPRETTY_NAME="(.*)"rU   rV   s   &r!   check_release_filer   G  s    $(*? r#   c                 t   ^ RI Hp \        4       pVR9   d   \        V 4      # VR8X  d(   \	        V 4      pVf   R# RP                  W1! 4       4      # VR8X  da   \        V 4      pVe   RP                  WA! 4       4      # \        V 4      pVe   RP                  WA! 4       4      # RP                  W!! 4       4      # V# )r   )machiner]   NzmacOS {} ({})r   z{} ({})r   )r   r   r   r   r   rP   r   r   )r'   r   r   rj   descs   &    r!   get_osr   M  s     ~H&&":..8!*-?%%gwy997z*##D')44 "*-##D')44')44 Or#   c                  *    ^ RI p V P                  4       # )r   Nr   r   s    r!   get_python_platformr   l  s    r#   c                  j    ^ RI p \        4       R8w  d   R# RP                  V P                  4       4      # )r   Nr   r   -)r   r   rQ   libc_verr   s    r!   get_libc_versionr   r  s*    ~ 88H%%'((r#   c                h  a Sf(   \         \        ,           \        ,           \        ,           o\        P
                  P                  ^8X  d   RMRpR\        P                  R&   \        V \        P                  RRR.4      pVf   W#3# RP                  V3R	 lVP                  4        4       4      pW$3# )
zZReturn `pip list` output. Note: will also find conda-installed pytorch and numpy packages.pip3pip1PIP_DISABLE_PIP_VERSION_CHECKz-mpipr   z--format=freezer3   c              3      <a"   T FI  o\         ;QJ d    V3R  lS 4       F  '       g   K   RM	  RM! V3R  lS 4       4      '       g   KE  Sx  KK  	  R# 5i)c              3   ,   <"   T F	  qS9   x  K  	  R # 5ir<   r%   r=   s   & r!   rA   -get_pip_packages.<locals>.<genexpr>.<genexpr>  s     0S($(rC   TFN)rE   rF   s   &@r!   rA   #get_pip_packages.<locals>.<genexpr>  s4      )SS0S(0SSSS0S(0S-S)s   AAA
A)PIP_PATTERNSrJ   rK   rL   r   version_infomajorrM   rN   r*   
executablerQ   rR   )r'   rG   pip_versionr(   filtered_outs   &f   r!   get_pip_packagesr
  z  s    /1OCoU,,22a7&UK25BJJ./ S^^Wf6GHC {99 ) L $$r#   c                F    V ^8  d   QhR\         \        \        3,          /# )   return)_Dictr   )rP   s   "r!   __annotate__r    s      U38_ r#   c                     R U u/ uFJ  p \         P                  P                  V 4      '       g   K*  V \         P                  P                  V 4      bKL  	  up # u up i )zKReturn the caching allocator configuration from environment variables.
    )PYTORCH_CUDA_ALLOC_CONFPYTORCH_HIP_ALLOC_CONFPYTORCH_ALLOC_CONF)rM   rN   rO   )vars    r!   get_cachingallocator_configr    sS    

C
 ::>># 	!RZZ^^C  
  s
   'A$Ac                      \         '       de   \        P                  P                  4       '       dA   \        P                  P	                  4        \
        P                  P                  R R4      p V # R# )CUDA_MODULE_LOADINGrf   r   )rg   ri   rk   rl   initrM   rN   rO   )configs    r!   get_cuda_module_loading_configr    sD    5::2244

 5r:r#   c                  x    \         '       d.   ^ RIp \        V P                  P                  P
                  4      # R# )r   Nr   )rg   torch.backends.xnnpackr   backendsxnnpackenabled)ri   s    r!   is_xnnpack_availabler     s(    %5>>))1122r#   c            
     @   \         p \        V 4      w  r\        '       Ed   \        P                  p\        \        P                  P                  4      p\        \        P                  P                  4       4      p\        P                  P                  p\        \        P                  P                  4       4      p\        P                  P                  4       '       dd   V R2R\        P                  P                   R2,           R\        V 4       R2,           R\        V 4       R2,           R\        V 4       2,           p\        \        P                  R4      '       d   \        P                  P                  f   R;p;rMmR p\        P                   P#                  4       P%                  R4      pV! VR	4      p	V! VR
4      p
Rp\        P                  P                  pMR;p;p;p;rgR;p;r\&        P                  P)                  RR4      p\+        V 4      p\-        R'/ RVbRVbRRP/                  V\&        P0                  P3                  4       ^,           4      bR\5        4       bRVbRVbR\7        V 4      bR\9        4       bR\;        V 4      bR\=        V 4      bR\?        V 4      bRVbRVbRV	bRV
bRVbRVbRVbR\A        V 4      bR \C        4       bR!\E        V 4      bR"\G        V 4      bR#\I        V 4      bR$\K        4       bR%\M        4       bR&\O        V 4      b # )(a  
Collects environment information to aid in debugging.

The returned environment information contains details on torch version, is debug build
or not, cuda compiled version, gcc version, clang version, cmake version, operating
system, libc version, python version, python platform, CUDA availability, CUDA
runtime version, CUDA module loading config, GPU model and configuration, Nvidia
driver version, cuDNN version, pip version and versions of relevant pip and
conda packages, HIP runtime version, MIOpen runtime version,
Caching allocator config, XNNPACK availability and CPU information.

Returns:
    SystemEnv (namedtuple): A tuple containing various environment details
        and system information.
r3   zXPU used to build PyTorch: zIntel GPU driver version:
zIntel GPU models onboard:
zIntel GPU models detected:
rc   r   c                     V  Uu. uF$  q!V9   g   K  VP                  R ^4      R,          NK&  	  ppV'       d
   V^ ,          # R# u upi )Nr   )rsplit)cfgprefixs_lsts   &&  r!   get_version_or_na'get_env_info.<locals>.get_version_or_na  sG    7:Js!k-q)"--sJ"&tAw1E1 Ks
   AAzHIP RuntimeMIOpenr   torch_versionis_debug_buildpython_versionz{} ({}-bit runtime)python_platformis_cuda_availablecuda_compiled_versioncuda_runtime_versioncuda_module_loadingnvidia_gpu_modelsnvidia_driver_versioncudnn_versionis_xpu_availablehip_compiled_versionhip_runtime_versionmiopen_runtime_versionr  pip_packagesconda_packagesrM   libc_versiongcc_versionclang_versioncmake_versioncaching_allocator_configr   r   r%   )(r"   r
  rg   ri   __version__r   rj   debugrk   rl   r   r   r   r   rh   rc   _C_show_configr4   r   replacerS   r   rP   maxsize
bit_lengthr   rv   r  rt   ra   r   r   r   rW   rY   r[   r  r   r   )r'   r  pip_list_outputversion_strdebug_mode_strcuda_available_strcuda_version_strxpu_available_strr8  r9  r:  r)  r%  sys_versionr<  s                  r!   get_env_inforP    sD     J#3J#? K''U]]001 !8!8!:; ==--		 6 6 8999!!##$%R(/0A0A/B"EF/0LZ0X/YY[\] 00Ej0Q/RRTUV 11G
1S0TU	V  u--1B1B1JRWW W#69O2 (('')//5C"3C"G%6sH%E"$#(==#4#4 chhhnh'9h<LNSSS2++%%dC0K'
3N !% -33//1A5
 ,- - / 6jA ;< 'z2 8
C (
3 + 2  0!"  6#$  %& %'( &)* *+, &'-. $J//0 (
312 (
334 "=!>56 2378 j)9 r#   a  
PyTorch version: {torch_version}
Is debug build: {is_debug_build}
CUDA used to build PyTorch: {cuda_compiled_version}
ROCM used to build PyTorch: {hip_compiled_version}

OS: {os}
GCC version: {gcc_version}
Clang version: {clang_version}
CMake version: {cmake_version}
Libc version: {libc_version}

Python version: {python_version}
Python platform: {python_platform}
Is CUDA available: {is_cuda_available}
CUDA runtime version: {cuda_runtime_version}
CUDA_MODULE_LOADING set to: {cuda_module_loading}
GPU models and configuration: {nvidia_gpu_models}
Nvidia driver version: {nvidia_driver_version}
cuDNN version: {cudnn_version}
Is XPU available: {is_xpu_available}
HIP runtime version: {hip_runtime_version}
MIOpen runtime version: {miopen_runtime_version}
Is XNNPACK available: {is_xnnpack_available}
Caching allocator config: {caching_allocator_config}

CPU:
{cpu_info}

Versions of relevant libraries:
{pip_packages}
{conda_packages}
c                 v  a
 RR lpRR lpRR lpRR lpR pV P                  4       o
V! V P                  4      S
R&   . ROpVR.,           p\        ;QJ d    V
3R lV 4       F  '       d   K   R	M	  R
M! V
3R lV 4       4      p\        '       dN   \        P
                  P                  4       '       g*   V'       d"   V F  p	RS
V	&   K
  	  V P                  f   RS
R&   V! S
4      o
V! S
4      o
V! S
R,          4      S
R&   V! S
R,          4      S
R&   S
R,          '       d-   V! S
R,          RP                  V P                  4      4      S
R&   S
R,          '       d   V! S
R,          R4      S
R&   V P                  S
R&   V P                  S
R&   V P                  '       g   RS
R&   \        P                  ! R/ S
B # )Could not collectc                 8    V  F  pW,          e   K  WV&   K  	  V # r<   r%   )dctreplacementkeys   && r!   replace_nones!pretty_str.<locals>.replace_nones.  s%    Cx#"H  
r#   c                 `    V  F'  pW,          R J d   WV&   K  W,          RJ g   K#  W V&   K)  	  V # )TFr%   )rT  truefalserV  s   &&& r!   replace_bools!pretty_str.<locals>.replace_bools5  s5    Cx4CU" C	 
 
r#   c                 ~    V P                  R 4      pV Uu. uF  q1V,           NK  	  ppR P                  V4      # u upi )r3   )r4   rQ   )texttaglinesr@   updated_liness   &&   r!   prependpretty_str.<locals>.prepend=  s<    

4 056t6yy'' 7s   :c                 2    V e   \        V 4      ^ 8X  d   V# V # r<   )r   )r_  rU  s   &&r!   replace_if_empty$pretty_str.<locals>.replace_if_emptyB  s    D	Qr#   c                 n    V e1   \        V P                  R4      4      ^8  d   RP                  V 4      # V # )Nr3   z
{}
)r   r4   rP   )strings   &r!   maybe_start_on_next_line,pretty_str.<locals>.maybe_start_on_next_lineG  s1    #fll4&8"9A"=??6**r#   r4  r6  c              3   :   <"   T F  pSV,          R J x  K  	  R # 5ir<   r%   )r>   fieldmutable_dicts   & r!   rA   pretty_str.<locals>.<genexpr>[  s      *1DUt#1Ds   FTzNo CUDAr   r1  r;  r<  z[{}] z[conda] r   rA  r   )rR  )YesNo)z	[prepend])zNo relevant packages)r2  r4  r5  r%   )_asdictr4  allrg   ri   rk   rl   r1  rP   r  r   rA  env_info_fmt)envinforW  r\  rc  rf  rj  dynamic_cuda_fieldsall_cuda_fieldsall_dynamic_cuda_fields_missingrm  rn  s   &         @r!   
pretty_strry  -  s   (

 ??$L )A!!)L$%

 *_,==O&)c *1D*ccc *1D* '# 	

''))+$E"+L %((04:L01 !.L !.L $4L4P#QL %5lCS6T%UL!" N##'.('..9L9L*M(
^$ $%%)0)*J*
%&  '//L/6/O/OL+,+++38/0...r#   c                 (    \        \        4       4      # )a  
Returns a pretty string of environment information.

This function retrieves environment information by calling the `get_env_info` function
and then formats the information into a human-readable string. The retrieved environment
information is listed in the document of `get_env_info`.
This function is used in `python collect_env.py` that should be executed when reporting a bug.

Returns:
    str: A pretty string of the environment information.
)ry  rP  r%   r#   r!   get_pretty_env_infor{    s     ln%%r#   c                    V ^8  d   QhRR/# )r  r  Nr%   )rP   s   "r!   r  r    s     ( (d (r#   c                  z   \        R 4       \        4       p \        V 4       \        '       Ed   \        \        R4      '       Edp   \        \        P
                  R4      '       EdM   \        P
                  P                  P                  p\        P                  R8X  Ed   \        P                  P                  V4      '       d   \        P                  ! V4       Uu. uF"  p\        P                  P                  W4      NK$  	  pp\        V\        P                  P                   R7      p\        P                  P!                  V4      p\"        P"                  P%                  V4      P'                  R4      pRP)                  WF4      R,           p\        V\        P*                  R7       R	# R	# R	# R	# R	# R	# u upi )
z%Collecting environment information...utils_crash_handlerr   )rV  z%Y-%m-%d %H:%M:%Sz.
*** Detected a minidump at {} created on {}, zKif this is related to your bug please include it when you file a report ***)fileN)printr{  rg   rh   ri   r~  r  DEFAULT_MINIDUMP_DIRr   r   rM   r~   r   listdirrQ   maxgetctimedatetimefromtimestampstrftimerP   r	   )r   minidump_dirdumpdumpslatestctimecreation_timemsgs           r!   mainr    sH   	
12 "F	&M 	E7##EKK!122{{11FF<<7"rww~~l'C'C=?ZZ=U=UT\0=U   BGG$4$45FGG$$V,E$--;;EBKK#M BHH ``  #CJJ' (D" 3 $ 	s   (F8__main__)r,  r-  r1  r>  r?  r@  rM   r=  r.  r/  r0  r2  r3  r5  r4  r6  r7  r  r;  r<  r8  r9  r:  rA  r   r   )ri   numpytritonoptree)zcuda-cudartz
cuda-cuptizcuda-librarieszcuda-openclz
cuda-nvrtczcuda-runtimecublascudnncufftcurandcusolvercusparsenccl	nvjitlinknvtx)zdpcpp-cpp-rtzintel-cmplr-lib-rtzintel-cmplr-lib-urzintel-cmplr-lic-rtzintel-opencl-rtzintel-sycl-rtmklzonemkl-sycl-blaszonemkl-sycl-dftzonemkl-sycl-lapackzonemkl-sycl-rngzonemkl-sycl-sparsezintel-openmptbbzimpi-rtz
impi-develonecclzoneccl-develz	intel-ptiumftcmlib)cudatoolkitsoumithr  magma)mypyflake8onnxr<   )@r  r   r   rM   r,   r   r   collectionsr   typingr   r   r   r  ri   rg   ImportError	NameErrorAttributeErrorOSErrorr   rJ   rK   rL   rI   r  r"   r*   r1   r5   rS   rW   rY   r[   ra   rt   rv   r   r^   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r
  r  r  r   rP  r   rt  ry  r{  r  __name__r%   r#   r!   <module>r     so      	 	  
 " /O
 	@$0+"OSQ'4X"?J$!H.b$NtD
U>)%.Up @ 
EGA FS/l&(: zF u 	Y8 Os   C& &C65C6