
     Ng                     &    d dl Z d dlZd dlZddZdS )    NFc                     t           j                            d          st          j        d           d S d |h}ddfd|D             }d |D             S )Nlinuxz(find_cudart_versions only works on Linuxc                 n   d}| r|dz   | z   }	 t          j        |          }t          |j        _        t          j        t           j                  g|j        _        t          j                    }|                    t          j        |                    }|dk    rd S n# t          $ r Y d S w xY w|j
        S )Nzlibcudart.so.r   )ctypesCDLLintcudaRuntimeGetVersionrestypePOINTERc_intargtypesbyref	Exceptionvalue)find_cudart_versioncudart_lib_filenamecudartversionstatuss        k/var/www/html/ai-engine/env/lib/python3.11/site-packages/onnxruntime/capi/onnxruntime_collect_build_info.pyget_cudart_versionz0find_cudart_versions.<locals>.get_cudart_version   s    , 	R"5";>Q"Q		[!455F36F(05;^FL5Q5Q4RF(1lnnG11&,w2G2GHHF{{t  	 	 	44	 }s   BB 
B-,B-c                 &    h | ]} |          S  r   ).0cudart_versionr   s     r   	<setcomp>z'find_cudart_versions.<locals>.<setcomp>,   s%    oooN//??ooo    c                     g | ]}||S r   r   )r   vers     r   
<listcomp>z(find_cudart_versions.<locals>.<listcomp>/   s    888CC8C888r   )N)sysplatform
startswithwarningswarn)	build_envbuild_cuda_versioncudart_possible_versionscudart_found_versionsr   s       @r   find_cudart_versionsr+   
   s     <""7++ @AAAt $&89   & poooVnooo 9808888r   )FN)r   r"   r%   r+   r   r   r   <module>r,      s@   
  



 %9 %9 %9 %9 %9 %9r   