a
    {þdm  ã                   @   sÎ  d dl Z d dlZd dlZd dlm  m  mZ edkrÊg d¢Ze  ¡ Z	e	j
ddd e	j
ddd	d
 e¡ d e	j
dedd e	j
dedd e	 ¡ Zejevr¼edej ƒ e d ¡ ej ¡ Zej eje¡Zee_ej e¡Zejdkr
ee ¡ ƒ e d ¡ ejse  dd¡‚ejjeddejdZejdkrVee ¡ ƒ e d ¡ ejjedejdZejdkrˆeeƒ e d ¡ ejsœe  dd¡‚ejjeejejdZejdksÂJ ‚eeƒ dS )é    NÚ__main__)ú	triton-irútriton-gpu-irúllvm-irÚptxÚsrczSource file to compile)Úhelpz--targetTzTarget format, one of: z, )Úrequiredr   z--smz!Compute capability to compile for)Útyper   z--ptx-versionzPTX version to compile forzInvalid target format: r   z%Must specify --sm for PTX compilationé   é   )Z	num_warpsZ
num_stagesÚcompute_capabilityr   )Zextern_libsr   r   z.Must specify --ptx-version for PTX compilation)r   Úptx_versionr   ) ÚargparseÚsysZtritonZtriton._C.libtriton.tritonZ_CZ	libtritonÚ__name__ZVALID_FORMATSÚArgumentParserÚparserÚadd_argumentÚjoinÚintÚ
parse_argsÚargsÚtargetÚprintÚexitZirÚcontextZparse_mlir_moduler   ÚmoduleÚcompilerZoptimize_triton_irÚstrÚsmÚArgumentErrorZttir_to_ttgirZttgir_to_llirr   Zllir_to_ptx© r"   r"   úY/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/triton/tools/aot.pyÚ<module>   sL   
ÿ





