o
    ۷i                     @   s   d dl Z d dlmZ ddlmZ ddlmZ d dlm	Z	 e	e
Z										dded	ed
edededededededefddZdS )    N   )ENV)current_platform)init_loggerFTdescent_tuningcuda_graphsforce_disable_compile_cachesfx_graph_cachefx_graph_remote_cacheautotune_local_cacheuse_fast_mathcompute_comm_overlapcapture_scalar_outputs capture_dynamic_output_shape_opsc
                 K   s  dt jj_dt jj_|t jj_|t jj_|t jj_t	
 r7|o!tjt jj_t jjjr7dt v r2dndt jj_tt jjdrH|t jj_|	t jj_| sLd S tjrVtd d S dt jj_dt jj_|t jjj_d	t jjj_d
t jjj_d
t jj_d
t jj_d
t jj_d	t jj_ tj!s|
"dd	rd
t jj_ d
t jj_#d
t jj_$d
t jj_%|rd
t jj_&d	t jj_d	t jj_d	t jj_tt jjdr|t jj_'tt jjdr|t jjj(_'d S d S )Ni   i    L20@   i,  r   z`CACHE_DIT_FORCE_DISABLE_CUSTOM_COMPILE_CONFIG is set to 1. 
Force disable custom compile config.   FTepilogue_prologue_fusionr   zcuda.use_fast_math))torch_dynamoconfigrecompile_limitaccumulated_recompile_limit	_inductorr	   r
   r   distis_initializedr   -CACHE_DIT_ENABLE_COMPILE_COMPUTE_COMM_OVERLAP reorder_for_compute_comm_overlapr   get_device_nameintra_node_bwhasattrr   r   -CACHE_DIT_FORCE_DISABLE_CUSTOM_COMPILE_CONFIGloggerinfomax_fusion_sizemax_pointwise_cat_inputstriton
cudagraphsuse_block_ptrcodegen_upcast_to_fp32conv_1x1_as_mmcoordinate_descent_tuning'coordinate_descent_check_all_directionsepilogue_fusion"CACHE_DIT_EPILOGUE_PROLOGUE_FUSIONgetprologue_fusionepilogue_fusion_firstdceforce_disable_cachesr   cuda)r   r   r   r	   r
   r   r   r   r   r   kwargs r6   M/home/ubuntu/vllm_env/lib/python3.10/site-packages/cache_dit/compile/utils.pyset_compile_configs
   sZ   






















r8   )
FFFTFFFTFF)r   torch.distributeddistributedr   envsr   	platformsr   cache_dit.loggerr   __name__r"   boolr8   r6   r6   r6   r7   <module>   sJ    	
