o
    Ơi                  
   @   s  d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlZd dl	m
Z
mZ d dlmZ ejdk r7edd dlZeeZd dlZdZzdd	lmZ ejZed
ejd W n% ey Z zede  edejd  ede dZ[ww dddZd dlmZmZ e e  e  d dl!m"Z" d dl#m$Z$m%Z%m&Z&m'Z'm(Z( d dl)m*Z* d dl+T ej,rd dl-m.Z. ej/rd dl-m0Z0 ej1rd dl2m3Z3 d dl-m4Z4 d dl5T d dl6m7Z7 dS )    N)DictList)__cuda_version____version__)version)   zGPython 2 has reached end-of-life and is not supported by Torch-TensorRT    )_TensorRTProxyModulez0You are using _TensorRTProxyModule.package_name= z@import error when try to import _TensorRTProxyModule, got error z2make sure tensorrt lib is in the LD_LIBRARY_PATH: LD_LIBRARY_PATHreturnc                  C   s   t jt} t jdtjdrdnd}t jdtjdr!dnd}t j| |}t j| |}t j|rJt	j
s=J t	jsBJ tj| d S t j|r]t	jsUJ tj| d S d S )Nlibwinztorchtrt.dllzlibtorchtrt.soztorchtrt_runtime.dllzlibtorchtrt_runtime.so)ospathdirname__file__joinsysplatform
startswithisfileENABLED_FEATUREStorchscript_frontendtorch_tensorrt_runtimetorchopsload_library)trtorch_dirlinked_filelinked_file_runtimelinked_file_full_pathlinked_file_runtime_full_path r$   K/home/ubuntu/.local/lib/python3.10/site-packages/torch_tensorrt/__init__.py_register_with_torch/   s(   



r&   )r   _enabled_features_str)Device)
DeviceTypeEngineCapabilityPlatformdtypememory_format)Input)*)ts)fx)backend)dynamo)MutableTorchTensorRTModule)r   N)8ctypesloggingr   r   r   typingr   r   r   torch_tensorrt._versionr   r   	packagingr   version_info	Exception	getLogger__name___LOGGERtensorrt_package_namer   r
   package_nameinfoeprintenvirongetr&   torch_tensorrt._featuresr   r'   debugtorch_tensorrt._Devicer(   torch_tensorrt._enumsr)   r*   r+   r,   r-   torch_tensorrt._Inputr.   torch_tensorrt.runtimer   torch_tensorrtr0   fx_frontendr1   dynamo_frontendtorch_tensorrt.dynamor2   r3   torch_tensorrt._compile9torch_tensorrt.dynamo.runtime._MutableTorchTensorRTModuler4   r$   r$   r$   r%   <module>   s`    



