o
    پiB                     @   s   e d ksJ dd Ze  dS )__main__c                  C   s6  dd l } dd l}dd l}ddlm}m} ddlm} |  }|	d | | g| }|j
g dddd}|jd d	d }	|	d
\}
}ddd|
 | dddgdd |D  }d| d}|jdrz|d |d|  d S tdd}|| W d    n1 sw   Y  |	d d S )N    )find_dlpack_include_pathfind_include_path)DEFAULT_INCLUDEzGenerating .clangd file...)z
nvidia-smiz--query-gpu=compute_capz--format=csv,noheaderT)argscapture_outputcheckzutf-8
.z,
    z-xcudaz--cuda-gpu-arch=sm_z
-std=c++20z-Wallz-Wextrac                 S   s   g | ]}d | qS )z-isystem ).0pathr   r   N/home/ubuntu/.local/lib/python3.10/site-packages/sglang/jit_kernel/__main__.py
<listcomp>   s    z#generate_clangd.<locals>.<listcomp>z
CompileFlags:
  Add: [
    z
  ]
z.clangdz*.clangd file already exists, nothing done.zsuggested content: wz.clangd file generated.)loggingos
subprocesstvm_ffi.libinfor   r   sglang.jit_kernel.utilsr   	getLoggerinforunstdoutdecodestripsplitjoinr   existswarningopenwrite)r   r   r   r   r   r   loggerinclude_pathsstatuscompute_capmajorminorcompile_flagsclangd_contentfr   r   r   generate_clangd   sF   


r+   N)__name__r+   r   r   r   r   <module>   s    
,