File tree Expand file tree Collapse file tree 1 file changed +15
-16
lines changed
Expand file tree Collapse file tree 1 file changed +15
-16
lines changed Original file line number Diff line number Diff line change 44import gc
55import logging
66import os
7- import shutil
8- import subprocess
9- import sys
107import urllib .request
118import warnings
129from dataclasses import fields , replace
@@ -847,20 +844,22 @@ def download_plugin_lib_path(py_version: str, platform: str) -> str:
847844
848845 # Proceeding with the unzip of the wheel file
849846 # This will exist if the filename was already downloaded
850- if os . path . exists ( "./tensorrt_llm/libs/libnvinfer_plugin_tensorrt_llm.so" ) :
851- plugin_lib_path = "./tensorrt_llm/libs/" + "libnvinfer_plugin_tensorrt_llm.so"
847+ if "linux" in platform :
848+ lib_filename = "libnvinfer_plugin_tensorrt_llm.so"
852849 else :
853- try :
854- import zipfile
855- except :
856- raise ImportError (
857- "zipfile module is required but not found. Please install zipfile"
858- )
859- with zipfile .ZipFile (file_name , "r" ) as zip_ref :
860- zip_ref .extractall ("." ) # Extract to a folder named 'tensorrt_llm'
861- plugin_lib_path = (
862- "./tensorrt_llm/libs/" + "libnvinfer_plugin_tensorrt_llm.so"
863- )
850+ lib_filename = "libnvinfer_plugin_tensorrt_llm.dll"
851+ plugin_lib_path = os .path .join ("./tensorrt_llm/libs" , lib_filename )
852+ if os .path .exists (plugin_lib_path ):
853+ return plugin_lib_path
854+ try :
855+ import zipfile
856+ except :
857+ raise ImportError (
858+ "zipfile module is required but not found. Please install zipfile"
859+ )
860+ with zipfile .ZipFile (file_name , "r" ) as zip_ref :
861+ zip_ref .extractall ("." ) # Extract to a folder named 'tensorrt_llm'
862+ plugin_lib_path = "./tensorrt_llm/libs/" + lib_filename
864863 return plugin_lib_path
865864
866865
You can’t perform that action at this time.
0 commit comments